Leancrypto 0.12.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
lc_sha3.h File Reference
#include "lc_hash.h"
+ Include dependency graph for lc_sha3.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LC_SHA3_224_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_224 context without VLA.
 
#define LC_SHA3_256_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_256 context without VLA.
 
#define LC_SHA3_384_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_384 context without VLA.
 
#define LC_SHA3_512_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_512 context without VLA.
 
#define LC_SHAKE_128_CTX_ON_STACK(name)
 Allocate stack memory for the SHAKE-128 context without VLA.
 
#define LC_SHAKE_256_CTX_ON_STACK(name)
 Allocate stack memory for the SHAKE-256 context without VLA.
 
#define LC_CSHAKE_256_CTX_ON_STACK(name)
 Allocate stack memory for the cSHAKE-256 context without VLA.
 
#define LC_CSHAKE_128_CTX_ON_STACK(name)
 Allocate stack memory for the cSHAKE-256 context without VLA.
 
#define LC_SHA3_MAX_SIZE_BLOCK   LC_SHA3_224_SIZE_BLOCK
 

Variables

const struct lc_hashlc_sha3_224
 SHA3-224 algorithm reference.
 
const struct lc_hashlc_sha3_256
 SHA3-256 algorithm reference.
 
const struct lc_hashlc_sha3_384
 SHA3-384 algorithm reference.
 
const struct lc_hashlc_sha3_512
 SHA3-512 algorithm reference.
 
const struct lc_hashlc_shake128
 SHAKE128 algorithm reference.
 
const struct lc_hashlc_shake256
 SHAKE256 algorithm reference.
 
const struct lc_hashlc_cshake256
 cSHAKE256 algorithm reference
 
const struct lc_hashlc_cshake128
 cSHAKE128 algorithm reference
 

Macro Definition Documentation

◆ LC_CSHAKE_128_CTX_ON_STACK

#define LC_CSHAKE_128_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHAKE_128_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_CSHAKE_128_CTX(name); \
_Pragma("GCC diagnostic pop")
#define LC_ALIGNED_BUFFER(name, size, alignment)
Allocate aligned stack memory.

Allocate stack memory for the cSHAKE-256 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 362 of file lc_sha3.h.

◆ LC_CSHAKE_256_CTX_ON_STACK

#define LC_CSHAKE_256_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_256_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_CSHAKE_256_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the cSHAKE-256 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 332 of file lc_sha3.h.

◆ LC_SHA3_224_CTX_ON_STACK

#define LC_SHA3_224_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_224_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA3_224_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHA3_224 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 75 of file lc_sha3.h.

◆ LC_SHA3_256_CTX_ON_STACK

#define LC_SHA3_256_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_256_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA3_256_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHA3_256 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 123 of file lc_sha3.h.

◆ LC_SHA3_384_CTX_ON_STACK

#define LC_SHA3_384_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_384_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA3_384_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHA3_384 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 171 of file lc_sha3.h.

◆ LC_SHA3_512_CTX_ON_STACK

#define LC_SHA3_512_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHA3_512_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA3_512_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHA3_512 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 219 of file lc_sha3.h.

◆ LC_SHA3_MAX_SIZE_BLOCK

#define LC_SHA3_MAX_SIZE_BLOCK   LC_SHA3_224_SIZE_BLOCK

Definition at line 374 of file lc_sha3.h.

◆ LC_SHAKE_128_CTX_ON_STACK

#define LC_SHAKE_128_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHAKE_128_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHAKE_128_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHAKE-128 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 266 of file lc_sha3.h.

◆ LC_SHAKE_256_CTX_ON_STACK

#define LC_SHAKE_256_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
name##_ctx_buf, \
LC_SHA3_STATE_SIZE_ALIGN(LC_SHAKE_256_CTX_SIZE), \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHAKE_256_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHAKE-256 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 301 of file lc_sha3.h.

Variable Documentation

◆ lc_cshake128

const struct lc_hash* lc_cshake128
extern

cSHAKE128 algorithm reference

◆ lc_cshake256

const struct lc_hash* lc_cshake256
extern

cSHAKE256 algorithm reference

◆ lc_sha3_224

const struct lc_hash* lc_sha3_224
extern

SHA3-224 algorithm reference.

◆ lc_sha3_256

const struct lc_hash* lc_sha3_256
extern

SHA3-256 algorithm reference.

◆ lc_sha3_384

const struct lc_hash* lc_sha3_384
extern

SHA3-384 algorithm reference.

◆ lc_sha3_512

const struct lc_hash* lc_sha3_512
extern

SHA3-512 algorithm reference.

◆ lc_shake128

const struct lc_hash* lc_shake128
extern

SHAKE128 algorithm reference.

◆ lc_shake256

const struct lc_hash* lc_shake256
extern

SHAKE256 algorithm reference.