|
Botan 3.13.0
Crypto and TLS for C&
|
#include <botan/ffi.h>#include <botan/assert.h>#include <botan/internal/ffi_util.h>Go to the source code of this file.
Functions | |
| int | botan_key_unwrap3394 (const uint8_t wrapped_key[], size_t wrapped_key_len, const uint8_t kek[], size_t kek_len, uint8_t key[], size_t *key_len) |
| int | botan_key_wrap3394 (const uint8_t key[], size_t key_len, const uint8_t kek[], size_t kek_len, uint8_t wrapped_key[], size_t *wrapped_key_len) |
| int | botan_nist_kw_dec (const char *cipher_algo, int padded, const uint8_t wrapped_key[], size_t wrapped_key_len, const uint8_t kek[], size_t kek_len, uint8_t key[], size_t *key_len) |
| int | botan_nist_kw_enc (const char *cipher_algo, int padded, const uint8_t key[], size_t key_len, const uint8_t kek[], size_t kek_len, uint8_t wrapped_key[], size_t *wrapped_key_len) |
| int botan_key_unwrap3394 | ( | const uint8_t | wrapped_key[], |
| size_t | wrapped_key_len, | ||
| const uint8_t | kek[], | ||
| size_t | kek_len, | ||
| uint8_t | key[], | ||
| size_t * | key_len ) |
Key unwrapping as per RFC 3394
| wrapped_key | the wrapped key to unwrap |
| wrapped_key_len | length of wrapped_key in bytes |
| kek | the key encryption key |
| kek_len | length of kek in bytes |
| key | output buffer for the unwrapped key |
| key_len | on input the size of key, on output the number of bytes written or required |
Definition at line 104 of file ffi_keywrap.cpp.
References botan_nist_kw_dec().
| int botan_key_wrap3394 | ( | const uint8_t | key[], |
| size_t | key_len, | ||
| const uint8_t | kek[], | ||
| size_t | kek_len, | ||
| uint8_t | wrapped_key[], | ||
| size_t * | wrapped_key_len ) |
Key wrapping as per RFC 3394
Definition at line 93 of file ffi_keywrap.cpp.
References botan_nist_kw_enc().
| int botan_nist_kw_dec | ( | const char * | cipher_algo, |
| int | padded, | ||
| const uint8_t | wrapped_key[], | ||
| size_t | wrapped_key_len, | ||
| const uint8_t | kek[], | ||
| size_t | kek_len, | ||
| uint8_t | key[], | ||
| size_t * | key_len ) |
Key unwrapping as per NIST SP 800-38F
| cipher_algo | the block cipher to use, eg "AES-256" |
| padded | if non-zero use KWP (the padded variant), otherwise KW |
| wrapped_key | the wrapped key to unwrap |
| wrapped_key_len | length of wrapped_key in bytes |
| kek | the key encryption key |
| kek_len | length of kek in bytes |
| key | output buffer for the unwrapped key |
| key_len | on input the size of key, on output the number of bytes written or required |
Definition at line 57 of file ffi_keywrap.cpp.
References Botan_FFI::any_null_pointers(), BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan::BlockCipher::create_or_throw(), Botan_FFI::ffi_guard_thunk(), Botan::nist_key_unwrap(), Botan::nist_key_unwrap_padded(), and Botan_FFI::write_vec_output().
Referenced by botan_key_unwrap3394().
| int botan_nist_kw_enc | ( | const char * | cipher_algo, |
| int | padded, | ||
| const uint8_t | key[], | ||
| size_t | key_len, | ||
| const uint8_t | kek[], | ||
| size_t | kek_len, | ||
| uint8_t | wrapped_key[], | ||
| size_t * | wrapped_key_len ) |
Key wrapping as per NIST SP 800-38F
| cipher_algo | the block cipher to use, eg "AES-256" |
| padded | if non-zero use KWP (the padded variant), otherwise KW |
| key | the key to wrap |
| key_len | length of key in bytes |
| kek | the key encryption key |
| kek_len | length of kek in bytes |
| wrapped_key | output buffer for the wrapped key |
| wrapped_key_len | on input the size of wrapped_key, on output the number of bytes written or required |
Definition at line 22 of file ffi_keywrap.cpp.
References Botan_FFI::any_null_pointers(), BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan::BlockCipher::create_or_throw(), Botan_FFI::ffi_guard_thunk(), Botan::nist_key_wrap(), Botan::nist_key_wrap_padded(), and Botan_FFI::write_vec_output().
Referenced by botan_key_wrap3394().