Botan 3.10.0
Crypto and TLS for C&
Botan::KeccakPadding Struct Reference

#include <keccak_perm.h>

Static Public Member Functions

static constexpr KeccakPadding cshake ()
 NIST SP.800-185 Section 3.3.
static constexpr KeccakPadding keccak1600 ()
 Keccak submission, prior to the introduction of an algorithm specific padding.
static constexpr KeccakPadding sha3 ()
 The number of relevant bits in 'padding'.
static constexpr KeccakPadding shake ()
 NIST FIPS 202 Section 6.2.

Public Attributes

uint8_t bit_len
 The padding bits in little-endian order.
uint64_t padding

Detailed Description

Definition at line 19 of file keccak_perm.h.

Member Function Documentation

◆ cshake()

constexpr KeccakPadding Botan::KeccakPadding::cshake ( )
inlinestaticconstexpr

NIST SP.800-185 Section 3.3.

Definition at line 30 of file keccak_perm.h.

30{ return {.padding = 0b00, .bit_len = 2}; }

Referenced by Botan::cSHAKE_XOF::cSHAKE_XOF().

◆ keccak1600()

constexpr KeccakPadding Botan::KeccakPadding::keccak1600 ( )
inlinestaticconstexpr

Keccak submission, prior to the introduction of an algorithm specific padding.

Definition at line 33 of file keccak_perm.h.

33{ return {.padding = 0, .bit_len = 0}; }

Referenced by Botan::Keccak_1600::Keccak_1600().

◆ sha3()

constexpr KeccakPadding Botan::KeccakPadding::sha3 ( )
inlinestaticconstexpr

The number of relevant bits in 'padding'.

NIST FIPS 202 Section 6.1

Definition at line 24 of file keccak_perm.h.

24{ return {.padding = 0b10 /* little-endian */, .bit_len = 2}; }

Referenced by Botan::SHA_3::SHA_3().

◆ shake()

constexpr KeccakPadding Botan::KeccakPadding::shake ( )
inlinestaticconstexpr

NIST FIPS 202 Section 6.2.

Definition at line 27 of file keccak_perm.h.

27{ return {.padding = 0b1111, .bit_len = 4}; }

Referenced by Botan::SHAKE_128::SHAKE_128(), Botan::SHAKE_256::SHAKE_256(), Botan::SHAKE_Cipher::SHAKE_Cipher(), and Botan::SHAKE_XOF::SHAKE_XOF().

Member Data Documentation

◆ bit_len

uint8_t Botan::KeccakPadding::bit_len

The padding bits in little-endian order.

Definition at line 21 of file keccak_perm.h.

◆ padding

uint64_t Botan::KeccakPadding::padding

Definition at line 20 of file keccak_perm.h.


The documentation for this struct was generated from the following file: