Macros | Functions | Variables
gcm.c File Reference
#include <openssl/base.h>
#include <assert.h>
#include <string.h>
#include <openssl/mem.h>
#include <openssl/cpu.h>
#include "internal.h"
#include "../../internal.h"
Include dependency graph for gcm.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GCM_MUL(ctx, Xi)   gcm_gmult_nohw((ctx)->Xi.u, (ctx)->gcm_key.Htable)
 
#define GHASH(ctx, in, len)   gcm_ghash_nohw((ctx)->Xi.u, (ctx)->gcm_key.Htable, in, len)
 
#define GHASH_CHUNK   (3 * 1024)
 

Functions

int CRYPTO_gcm128_aad (GCM128_CONTEXT *ctx, const uint8_t *aad, size_t len)
 
int CRYPTO_gcm128_decrypt (GCM128_CONTEXT *ctx, const AES_KEY *key, const unsigned char *in, unsigned char *out, size_t len)
 
int CRYPTO_gcm128_decrypt_ctr32 (GCM128_CONTEXT *ctx, const AES_KEY *key, const uint8_t *in, uint8_t *out, size_t len, ctr128_f stream)
 
int CRYPTO_gcm128_encrypt (GCM128_CONTEXT *ctx, const AES_KEY *key, const uint8_t *in, uint8_t *out, size_t len)
 
int CRYPTO_gcm128_encrypt_ctr32 (GCM128_CONTEXT *ctx, const AES_KEY *key, const uint8_t *in, uint8_t *out, size_t len, ctr128_f stream)
 
int CRYPTO_gcm128_finish (GCM128_CONTEXT *ctx, const uint8_t *tag, size_t len)
 
void CRYPTO_gcm128_init_key (GCM128_KEY *gcm_key, const AES_KEY *aes_key, block128_f block, int block_is_hwaes)
 
void CRYPTO_gcm128_setiv (GCM128_CONTEXT *ctx, const AES_KEY *key, const uint8_t *iv, size_t len)
 
void CRYPTO_gcm128_tag (GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
 
void CRYPTO_ghash_init (gmult_func *out_mult, ghash_func *out_hash, u128 *out_key, u128 out_table[16], int *out_is_avx, const uint8_t gcm_key[16])
 

Variables

static const size_t kSizeTWithoutLower4Bits = (size_t) -16
 

Macro Definition Documentation

◆ GCM_MUL

#define GCM_MUL (   ctx,
  Xi 
)    gcm_gmult_nohw((ctx)->Xi.u, (ctx)->gcm_key.Htable)

Definition at line 66 of file gcm.c.

◆ GHASH

#define GHASH (   ctx,
  in,
  len 
)    gcm_ghash_nohw((ctx)->Xi.u, (ctx)->gcm_key.Htable, in, len)

Definition at line 67 of file gcm.c.

◆ GHASH_CHUNK

#define GHASH_CHUNK   (3 * 1024)

Definition at line 72 of file gcm.c.

Function Documentation

◆ CRYPTO_gcm128_aad()

int CRYPTO_gcm128_aad ( GCM128_CONTEXT ctx,
const uint8_t aad,
size_t  len 
)

Definition at line 281 of file gcm.c.

◆ CRYPTO_gcm128_decrypt()

int CRYPTO_gcm128_decrypt ( GCM128_CONTEXT ctx,
const AES_KEY key,
const unsigned char *  in,
unsigned char *  out,
size_t  len 
)

Definition at line 423 of file gcm.c.

◆ CRYPTO_gcm128_decrypt_ctr32()

int CRYPTO_gcm128_decrypt_ctr32 ( GCM128_CONTEXT ctx,
const AES_KEY key,
const uint8_t in,
uint8_t out,
size_t  len,
ctr128_f  stream 
)

Definition at line 603 of file gcm.c.

◆ CRYPTO_gcm128_encrypt()

int CRYPTO_gcm128_encrypt ( GCM128_CONTEXT ctx,
const AES_KEY key,
const uint8_t in,
uint8_t out,
size_t  len 
)

Definition at line 334 of file gcm.c.

◆ CRYPTO_gcm128_encrypt_ctr32()

int CRYPTO_gcm128_encrypt_ctr32 ( GCM128_CONTEXT ctx,
const AES_KEY key,
const uint8_t in,
uint8_t out,
size_t  len,
ctr128_f  stream 
)

Definition at line 517 of file gcm.c.

◆ CRYPTO_gcm128_finish()

int CRYPTO_gcm128_finish ( GCM128_CONTEXT ctx,
const uint8_t tag,
size_t  len 
)

Definition at line 693 of file gcm.c.

◆ CRYPTO_gcm128_init_key()

void CRYPTO_gcm128_init_key ( GCM128_KEY gcm_key,
const AES_KEY aes_key,
block128_f  block,
int  block_is_hwaes 
)

Definition at line 215 of file gcm.c.

◆ CRYPTO_gcm128_setiv()

void CRYPTO_gcm128_setiv ( GCM128_CONTEXT ctx,
const AES_KEY key,
const uint8_t iv,
size_t  len 
)

Definition at line 231 of file gcm.c.

◆ CRYPTO_gcm128_tag()

void CRYPTO_gcm128_tag ( GCM128_CONTEXT ctx,
unsigned char *  tag,
size_t  len 
)

Definition at line 717 of file gcm.c.

◆ CRYPTO_ghash_init()

void CRYPTO_ghash_init ( gmult_func out_mult,
ghash_func out_hash,
u128 out_key,
u128  out_table[16],
int out_is_avx,
const uint8_t  gcm_key[16] 
)

Definition at line 136 of file gcm.c.

Variable Documentation

◆ kSizeTWithoutLower4Bits

const size_t kSizeTWithoutLower4Bits = (size_t) -16
static

Definition at line 63 of file gcm.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:13