11#ifndef BOTAN_SP800_56A_H_
12#define BOTAN_SP800_56A_H_
14#include <botan/hash.h>
26 std::string
name()
const override;
28 std::unique_ptr<KDF>
new_object()
const override;
45 void kdf(uint8_t key[],
47 const uint8_t secret[],
51 const uint8_t label[],
52 size_t label_len)
const override;
60 std::unique_ptr<HashFunction> m_hash;
68 std::string
name()
const override;
70 std::unique_ptr<KDF>
new_object()
const override;
86 void kdf(uint8_t key[],
88 const uint8_t secret[],
92 const uint8_t label[],
93 size_t label_len)
const override;
101 std::unique_ptr<MessageAuthenticationCode> m_mac;
123 void kdf(uint8_t key[],
125 const uint8_t secret[],
127 const uint8_t salt[],
129 const uint8_t label[],
130 size_t label_len)
const override;
144 std::string
name()
const override {
return "SP800-56A(KMAC-128)"; }
146 std::unique_ptr<KDF>
new_object()
const override {
return std::make_unique<SP800_56C_One_Step_KMAC128>(); }
149 std::unique_ptr<MessageAuthenticationCode> create_kmac_instance(
size_t output_byte_len)
const override;
151 size_t default_salt_length()
const override {
return 164; }
159 std::string
name()
const override {
return "SP800-56A(KMAC-256)"; }
161 std::unique_ptr<KDF>
new_object()
const override {
return std::make_unique<SP800_56C_One_Step_KMAC256>(); }
164 std::unique_ptr<MessageAuthenticationCode> create_kmac_instance(
size_t output_byte_len)
const override;
166 size_t default_salt_length()
const override {
return 132; }
virtual std::unique_ptr< MessageAuthenticationCode > create_kmac_instance(size_t output_byte_len) const =0
void kdf(uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override
virtual size_t default_salt_length() const =0
See SP800-56C Section 4.1 - Implementation-Dependent Parameters 3.
SP800_56C_One_Step_HMAC(std::unique_ptr< MessageAuthenticationCode > mac)
void kdf(uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override
std::string name() const override
std::unique_ptr< KDF > new_object() const override
std::string name() const override
SP800_56C_One_Step_Hash(std::unique_ptr< HashFunction > hash)
std::unique_ptr< KDF > new_object() const override
void kdf(uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override
std::unique_ptr< KDF > new_object() const override
std::string name() const override
std::string name() const override
std::unique_ptr< KDF > new_object() const override
int(* final)(unsigned char *, CTX *)