Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::crypto::detail::aes_key_wrap Namespace Reference

Functions

expected< std::vector< uint8_t > > wrap (const std::array< uint8_t, 32 > &kek, const std::vector< uint8_t > &plaintext)
 AES Key Wrap — wraps plaintext key material under a KEK.
 
expected< std::vector< uint8_t > > unwrap (const std::array< uint8_t, 32 > &kek, const std::vector< uint8_t > &ciphertext)
 AES Key Unwrap — recovers plaintext key material from wrapped form.
 

Function Documentation

◆ unwrap()

expected< std::vector< uint8_t > > signet::forge::crypto::detail::aes_key_wrap::unwrap ( const std::array< uint8_t, 32 > &  kek,
const std::vector< uint8_t > &  ciphertext 
)
inline

AES Key Unwrap — recovers plaintext key material from wrapped form.

Parameters
kek256-bit Key Encryption Key
ciphertextWrapped key (must be multiple of 8 bytes, >= 24)
Returns
Unwrapped key material, or error if integrity check fails

Definition at line 118 of file hsm_client_stub.hpp.

◆ wrap()

expected< std::vector< uint8_t > > signet::forge::crypto::detail::aes_key_wrap::wrap ( const std::array< uint8_t, 32 > &  kek,
const std::vector< uint8_t > &  plaintext 
)
inline

AES Key Wrap — wraps plaintext key material under a KEK.

Parameters
kek256-bit Key Encryption Key
plaintextKey material to wrap (must be multiple of 8 bytes, >= 16)
Returns
Wrapped key (plaintext.size() + 8 bytes), or error

Definition at line 63 of file hsm_client_stub.hpp.