Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Macros | Variables
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. More...
 
#define LC_SHA3_256_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_256 context without VLA. More...
 
#define LC_SHA3_384_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_384 context without VLA. More...
 
#define LC_SHA3_512_CTX_ON_STACK(name)
 Allocate stack memory for the SHA3_512 context without VLA. More...
 
#define LC_SHAKE_128_CTX_ON_STACK(name)
 Allocate stack memory for the SHAKE-128 context without VLA. More...
 
#define LC_SHAKE_256_CTX_ON_STACK(name)
 Allocate stack memory for the SHAKE-256 context without VLA. More...
 
#define LC_SHAKE_512_CTX_ON_STACK(name)
 Allocate stack memory for the SHAKE-512 context without VLA. More...
 
#define LC_CSHAKE_256_CTX_ON_STACK(name)
 Allocate stack memory for the cSHAKE-256 context without VLA. More...
 
#define LC_CSHAKE_128_CTX_ON_STACK(name)
 Allocate stack memory for the cSHAKE-256 context without VLA. More...
 
#define LC_SHA3_MAX_SIZE_BLOCK   LC_SHA3_224_SIZE_BLOCK
 

Variables

const struct lc_hash * lc_sha3_224
 SHA3-224 algorithm reference. More...
 
const struct lc_hash * lc_sha3_256
 SHA3-256 algorithm reference. More...
 
const struct lc_hash * lc_sha3_384
 SHA3-384 algorithm reference. More...
 
const struct lc_hash * lc_sha3_512
 SHA3-512 algorithm reference. More...
 
const struct lc_hash * lc_shake128
 SHAKE128 algorithm reference. More...
 
const struct lc_hash * lc_shake256
 SHAKE256 algorithm reference. More...
 
const struct lc_hash * lc_shake512
 SHAKE512 algorithm reference. More...
 
const struct lc_hash * lc_cshake256
 cSHAKE256 algorithm reference More...
 
const struct lc_hash * lc_cshake128
 cSHAKE128 algorithm reference More...
 

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_HASH_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 390 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_HASH_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 360 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 74 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 122 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 170 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 218 of file lc_sha3.h.

◆ LC_SHA3_MAX_SIZE_BLOCK

#define LC_SHA3_MAX_SIZE_BLOCK   LC_SHA3_224_SIZE_BLOCK

Definition at line 402 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 265 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\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, 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 298 of file lc_sha3.h.

◆ LC_SHAKE_512_CTX_ON_STACK

#define LC_SHAKE_512_CTX_ON_STACK (   name)
Value:
_Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, LC_SHAKE_512_CTX_SIZE, \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHAKE_512_CTX(name); \
_Pragma("GCC diagnostic pop")

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

Parameters
[in]nameName of the stack variable

Definition at line 331 of file lc_sha3.h.

Variable Documentation

◆ lc_cshake128

lc_cshake128
extern

cSHAKE128 algorithm reference

◆ lc_cshake256

lc_cshake256
extern

cSHAKE256 algorithm reference

◆ lc_sha3_224

lc_sha3_224
extern

SHA3-224 algorithm reference.

◆ lc_sha3_256

lc_sha3_256
extern

SHA3-256 algorithm reference.

◆ lc_sha3_384

lc_sha3_384
extern

SHA3-384 algorithm reference.

◆ lc_sha3_512

lc_sha3_512
extern

SHA3-512 algorithm reference.

◆ lc_shake128

lc_shake128
extern

SHAKE128 algorithm reference.

◆ lc_shake256

lc_shake256
extern

SHAKE256 algorithm reference.

◆ lc_shake512

lc_shake512
extern

SHAKE512 algorithm reference.