other versions
- stretch 4.9.168-1
CRYPTO_BLKCIPHER_SET(9) | Programming Interface | CRYPTO_BLKCIPHER_SET(9) |
NAME¶
crypto_blkcipher_setkey - set key for cipherSYNOPSIS¶
int crypto_blkcipher_setkey(struct crypto_blkcipher * tfm, const u8 * key, unsigned int keylen);
ARGUMENTS¶
tfmcipher handle
key
buffer holding the key
keylen
length of the key in bytes
DESCRIPTION¶
The caller provided key is set for the block cipher referenced by the cipher handle.Note, the key length determines the cipher type. Many block ciphers implement different cipher modes depending on the key size, such as AES-128 vs AES-192 vs. AES-256. When providing a 16 byte key for an AES cipher handle, AES-128 is performed.
RETURN¶
0 if the setting of the key was successful; < 0 if an error occurredAUTHORS¶
Stephan Mueller <smueller@chronox.de>Author.
Marek Vasut <marek@denx.de>
Author.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |