#include <openssl/crypto.h>
#include "modes_lcl.h"
#include <string.h>
#include <assert.h>
Go to the source code of this file.
|
void | CRYPTO_gcm128_init (GCM128_CONTEXT *ctx, void *key, block128_f block) |
|
void | CRYPTO_gcm128_setiv (GCM128_CONTEXT *ctx, const unsigned char *iv, size_t len) |
|
int | CRYPTO_gcm128_aad (GCM128_CONTEXT *ctx, const unsigned char *aad, size_t len) |
|
int | CRYPTO_gcm128_encrypt (GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) |
|
int | CRYPTO_gcm128_decrypt (GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) |
|
int | CRYPTO_gcm128_encrypt_ctr32 (GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len, ctr128_f stream) |
|
int | CRYPTO_gcm128_decrypt_ctr32 (GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len, ctr128_f stream) |
|
int | CRYPTO_gcm128_finish (GCM128_CONTEXT *ctx, const unsigned char *tag, size_t len) |
|
void | CRYPTO_gcm128_tag (GCM128_CONTEXT *ctx, unsigned char *tag, size_t len) |
|
GCM128_CONTEXT * | CRYPTO_gcm128_new (void *key, block128_f block) |
|
void | CRYPTO_gcm128_release (GCM128_CONTEXT *ctx) |
|
#define GCM_MUL |
( |
|
ctx, |
|
|
|
Xi |
|
) |
| gcm_gmult_4bit(ctx->Xi.u,ctx->Htable) |
#define GHASH |
( |
|
ctx, |
|
|
|
in, |
|
|
|
len |
|
) |
| gcm_ghash_4bit((ctx)->Xi.u,(ctx)->Htable,in,len) |
#define GHASH_CHUNK (3*1024) |
#define PACK |
( |
|
s | ) |
((size_t)(s)<<(sizeof(size_t)*8-16)) |
Value:do { \
if (
sizeof(
size_t)==8) {
\
u64 T =
U64(0xe100000000000000) & (0-(V.lo&1)); \
V.lo = (V.hi<<63)|(V.lo>>1); \
V.hi = (V.hi>>1 )^T; \
} \
u32 T = 0xe1000000U & (0-(
u32)(V.lo&1)); \
V.lo = (V.hi<<63)|(V.lo>>1); \
V.hi = (V.hi>>1 )^((
u64)T<<32); \
} \
} while(0)
Definition at line 72 of file gcm128.c.
int CRYPTO_gcm128_aad |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
aad, |
|
|
size_t |
len |
|
) |
| |
int CRYPTO_gcm128_decrypt |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
in, |
|
|
unsigned char * |
out, |
|
|
size_t |
len |
|
) |
| |
int CRYPTO_gcm128_decrypt_ctr32 |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
in, |
|
|
unsigned char * |
out, |
|
|
size_t |
len, |
|
|
ctr128_f |
stream |
|
) |
| |
int CRYPTO_gcm128_encrypt |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
in, |
|
|
unsigned char * |
out, |
|
|
size_t |
len |
|
) |
| |
int CRYPTO_gcm128_encrypt_ctr32 |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
in, |
|
|
unsigned char * |
out, |
|
|
size_t |
len, |
|
|
ctr128_f |
stream |
|
) |
| |
int CRYPTO_gcm128_finish |
( |
GCM128_CONTEXT * |
ctx, |
|
|
const unsigned char * |
tag, |
|
|
size_t |
len |
|
) |
| |