facil.io

#./fio-stl/153 aes.h

4 public symbols.

#Functions

#fio_aes128_gcm_enc

c
void fio_aes128_gcm_enc(void *restrict mac, void *restrict data, size_t len, const void *ad, size_t adlen, const void *key, const void *nonce)

Performs in-place AES-128-GCM encryption with authentication.

  • mac MUST point to a buffer with (at least) 16 available bytes.
  • key MUST point to a 128 bit key (16 Bytes).
  • nonce MUST point to a 96 bit nonce (12 Bytes).
  • ad MAY be omitted, will NOT be encrypted.
  • data MAY be omitted, WILL be encrypted.

Symbol type: function

#fio_aes128_gcm_dec

c
int fio_aes128_gcm_dec(void *restrict mac, void *restrict data, size_t len, const void *ad, size_t adlen, const void *key, const void *nonce)

Performs in-place AES-128-GCM decryption with authentication verification.

  • mac MUST point to a buffer with the 16 byte MAC to verify.
  • key MUST point to a 128 bit key (16 Bytes).
  • nonce MUST point to a 96 bit nonce (12 Bytes).
  • ad MAY be omitted ONLY IF originally omitted.
  • data MAY be omitted, WILL be decrypted.

Returns -1 on error (authentication failed).

Symbol type: function

#fio_aes256_gcm_enc

c
void fio_aes256_gcm_enc(void *restrict mac, void *restrict data, size_t len, const void *ad, size_t adlen, const void *key, const void *nonce)

Performs in-place AES-256-GCM encryption with authentication.

  • mac MUST point to a buffer with (at least) 16 available bytes.
  • key MUST point to a 256 bit key (32 Bytes).
  • nonce MUST point to a 96 bit nonce (12 Bytes).
  • ad MAY be omitted, will NOT be encrypted.
  • data MAY be omitted, WILL be encrypted.

Symbol type: function

#fio_aes256_gcm_dec

c
int fio_aes256_gcm_dec(void *restrict mac, void *restrict data, size_t len, const void *ad, size_t adlen, const void *key, const void *nonce)

Performs in-place AES-256-GCM decryption with authentication verification.

  • mac MUST point to a buffer with the 16 byte MAC to verify.
  • key MUST point to a 256 bit key (32 Bytes).
  • nonce MUST point to a 96 bit nonce (12 Bytes).
  • ad MAY be omitted ONLY IF originally omitted.
  • data MAY be omitted, WILL be decrypted.

Returns -1 on error (authentication failed).

Symbol type: function