wpa_supplicant / hostapd
2.5
|
Crypto wrapper for internal crypto implementation - Cipher wrappers. More...
Data Structures | |
struct | crypto_cipher |
Functions | |
struct crypto_cipher * | crypto_cipher_init (enum crypto_cipher_alg alg, const u8 *iv, const u8 *key, size_t key_len) |
Initialize block/stream cipher function. More... | |
int | crypto_cipher_encrypt (struct crypto_cipher *ctx, const u8 *plain, u8 *crypt, size_t len) |
Cipher encrypt. More... | |
int | crypto_cipher_decrypt (struct crypto_cipher *ctx, const u8 *crypt, u8 *plain, size_t len) |
Cipher decrypt. More... | |
void | crypto_cipher_deinit (struct crypto_cipher *ctx) |
Free cipher context. More... | |
Crypto wrapper for internal crypto implementation - Cipher wrappers.
int crypto_cipher_decrypt | ( | struct crypto_cipher * | ctx, |
const u8 * | crypt, | ||
u8 * | plain, | ||
size_t | len | ||
) |
Cipher decrypt.
ctx | Context pointer from crypto_cipher_init() |
crypt | Ciphertext to decrypt |
plain | Resulting plaintext |
len | Length of the cipher text |
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
void crypto_cipher_deinit | ( | struct crypto_cipher * | ctx | ) |
Free cipher context.
ctx | Context pointer from crypto_cipher_init() |
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
int crypto_cipher_encrypt | ( | struct crypto_cipher * | ctx, |
const u8 * | plain, | ||
u8 * | crypt, | ||
size_t | len | ||
) |
Cipher encrypt.
ctx | Context pointer from crypto_cipher_init() |
plain | Plaintext to cipher |
crypt | Resulting ciphertext |
len | Length of the plaintext |
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.
struct crypto_cipher* crypto_cipher_init | ( | enum crypto_cipher_alg | alg, |
const u8 * | iv, | ||
const u8 * | key, | ||
size_t | key_len | ||
) |
Initialize block/stream cipher function.
alg | Cipher algorithm |
iv | Initialization vector for block ciphers or NULL for stream ciphers |
key | Cipher key |
key_len | Length of key in bytes |
This function is only used with internal TLSv1 implementation (CONFIG_TLS=internal). If that is not used, the crypto wrapper does not need to implement this.