Warning, file /include/nettle/siv-gcm.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 #ifndef NETTLE_SIV_GCM_H_INCLUDED
0035 #define NETTLE_SIV_GCM_H_INCLUDED
0036
0037 #include "nettle-types.h"
0038 #include "nettle-meta.h"
0039 #include "aes.h"
0040
0041 #ifdef __cplusplus
0042 extern "C" {
0043 #endif
0044
0045
0046 #define siv_gcm_encrypt_message nettle_siv_gcm_encrypt_message
0047 #define siv_gcm_decrypt_message nettle_siv_gcm_decrypt_message
0048 #define siv_gcm_aes128_encrypt_message nettle_siv_gcm_aes128_encrypt_message
0049 #define siv_gcm_aes128_decrypt_message nettle_siv_gcm_aes128_decrypt_message
0050 #define siv_gcm_aes256_encrypt_message nettle_siv_gcm_aes256_encrypt_message
0051 #define siv_gcm_aes256_decrypt_message nettle_siv_gcm_aes256_decrypt_message
0052
0053
0054 #define SIV_GCM_BLOCK_SIZE 16
0055 #define SIV_GCM_DIGEST_SIZE 16
0056 #define SIV_GCM_NONCE_SIZE 12
0057
0058
0059
0060
0061 void
0062 siv_gcm_encrypt_message (const struct nettle_cipher *nc,
0063 const void *ctx,
0064 void *ctr_ctx,
0065 size_t nlength, const uint8_t *nonce,
0066 size_t alength, const uint8_t *adata,
0067 size_t clength, uint8_t *dst, const uint8_t *src);
0068
0069 int
0070 siv_gcm_decrypt_message (const struct nettle_cipher *nc,
0071 const void *ctx,
0072 void *ctr_ctx,
0073 size_t nlength, const uint8_t *nonce,
0074 size_t alength, const uint8_t *adata,
0075 size_t mlength, uint8_t *dst, const uint8_t *src);
0076
0077
0078 void
0079 siv_gcm_aes128_encrypt_message (const struct aes128_ctx *ctx,
0080 size_t nlength, const uint8_t *nonce,
0081 size_t alength, const uint8_t *adata,
0082 size_t clength, uint8_t *dst, const uint8_t *src);
0083
0084 int
0085 siv_gcm_aes128_decrypt_message (const struct aes128_ctx *ctx,
0086 size_t nlength, const uint8_t *nonce,
0087 size_t alength, const uint8_t *adata,
0088 size_t mlength, uint8_t *dst, const uint8_t *src);
0089
0090
0091 void
0092 siv_gcm_aes256_encrypt_message (const struct aes256_ctx *ctx,
0093 size_t nlength, const uint8_t *nonce,
0094 size_t alength, const uint8_t *adata,
0095 size_t clength, uint8_t *dst, const uint8_t *src);
0096
0097 int
0098 siv_gcm_aes256_decrypt_message (const struct aes256_ctx *ctx,
0099 size_t nlength, const uint8_t *nonce,
0100 size_t alength, const uint8_t *adata,
0101 size_t mlength, uint8_t *dst, const uint8_t *src);
0102
0103 #ifdef __cplusplus
0104 }
0105 #endif
0106
0107 #endif