File indexing completed on 2025-01-18 10:02:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #ifndef NETTLE_NIST_KEYWRAP_H_INCLUDED
0038 #define NETTLE_NIST_KEYWRAP_H_INCLUDED
0039
0040 #include "nettle-types.h"
0041 #include "aes.h"
0042
0043 #ifdef __cplusplus
0044 extern "C" {
0045 #endif
0046
0047
0048 #define nist_keywrap16 nettle_nist_keywrap16
0049 #define nist_keyunwrap16 nettle_nist_keyunwrap16
0050 #define aes128_keywrap nettle_aes128_keywrap
0051 #define aes192_keywrap nettle_aes192_keywrap
0052 #define aes256_keywrap nettle_aes256_keywrap
0053 #define aes128_keyunwrap nettle_aes128_keyunwrap
0054 #define aes192_keyunwrap nettle_aes192_keyunwrap
0055 #define aes256_keyunwrap nettle_aes256_keyunwrap
0056
0057 void
0058 nist_keywrap16 (const void *ctx, nettle_cipher_func *encrypt,
0059 const uint8_t *iv, size_t ciphertext_length,
0060 uint8_t *ciphertext, const uint8_t *cleartext);
0061
0062 int
0063 nist_keyunwrap16 (const void *ctx, nettle_cipher_func *decrypt,
0064 const uint8_t *iv, size_t cleartext_length,
0065 uint8_t *cleartext, const uint8_t *ciphertext);
0066
0067 void
0068 aes128_keywrap (struct aes128_ctx *ctx,
0069 const uint8_t *iv, size_t ciphertext_length,
0070 uint8_t *ciphertext, const uint8_t *cleartext);
0071
0072 void
0073 aes192_keywrap (struct aes192_ctx *ctx,
0074 const uint8_t *iv, size_t ciphertext_length,
0075 uint8_t *ciphertext, const uint8_t *cleartext);
0076
0077 void
0078 aes256_keywrap (struct aes256_ctx *ctx,
0079 const uint8_t *iv, size_t ciphertext_length,
0080 uint8_t *ciphertext, const uint8_t *cleartext);
0081
0082 int
0083 aes128_keyunwrap (struct aes128_ctx *ctx,
0084 const uint8_t *iv, size_t cleartext_length,
0085 uint8_t *cleartext, const uint8_t *ciphertext);
0086
0087 int
0088 aes192_keyunwrap (struct aes192_ctx *ctx,
0089 const uint8_t *iv, size_t cleartext_length,
0090 uint8_t *cleartext, const uint8_t *ciphertext);
0091
0092 int
0093 aes256_keyunwrap (struct aes256_ctx *ctx,
0094 const uint8_t *iv, size_t cleartext_length,
0095 uint8_t *cleartext, const uint8_t *ciphertext);
0096
0097 #ifdef __cplusplus
0098 }
0099 #endif
0100
0101 #endif