35#ifndef MBEDTLS_NIST_KW_H
36#define MBEDTLS_NIST_KW_H
38#if !defined(MBEDTLS_CONFIG_FILE)
41#include MBEDTLS_CONFIG_FILE
59 MBEDTLS_KW_MODE_KW = 0,
60 MBEDTLS_KW_MODE_KWP = 1
61} mbedtls_nist_kw_mode_t;
63#if !defined(MBEDTLS_NIST_KW_ALT)
79#include "nist_kw_alt.h"
110 const unsigned char *key,
111 unsigned int keybits,
144 const unsigned char *input,
size_t in_len,
145 unsigned char *output,
size_t* out_len,
size_t out_size );
171 const unsigned char *input,
size_t in_len,
172 unsigned char *output,
size_t* out_len,
size_t out_size);
175#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
182int mbedtls_nist_kw_self_test(
int verbose );
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
Configuration options (set of defines)
mbedtls_cipher_id_t
Supported cipher types.
int mbedtls_nist_kw_setkey(mbedtls_nist_kw_context *ctx, mbedtls_cipher_id_t cipher, const unsigned char *key, unsigned int keybits, const int is_wrap)
This function initializes the key wrapping context set in the ctx parameter and sets the encryption k...
int mbedtls_nist_kw_wrap(mbedtls_nist_kw_context *ctx, mbedtls_nist_kw_mode_t mode, const unsigned char *input, size_t in_len, unsigned char *output, size_t *out_len, size_t out_size)
This function encrypts a buffer using key wrapping.
int mbedtls_nist_kw_unwrap(mbedtls_nist_kw_context *ctx, mbedtls_nist_kw_mode_t mode, const unsigned char *input, size_t in_len, unsigned char *output, size_t *out_len, size_t out_size)
This function decrypts a buffer using key wrapping.
void mbedtls_nist_kw_free(mbedtls_nist_kw_context *ctx)
This function releases and clears the specified key wrapping context and underlying cipher sub-contex...
void mbedtls_nist_kw_init(mbedtls_nist_kw_context *ctx)
This function initializes the specified key wrapping context to make references valid and prepare the...
The key wrapping context-type definition.
mbedtls_cipher_context_t cipher_ctx