SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
psa_key_derivation_operation_s Struct Reference

#include <crypto.h>

Data Fields

uint32_t state
 
psa_algorithm_t alg
 
psa_algorithm_t agreement_alg
 
uint32_t cost
 
uint32_t sp800108_counter
 
uint32_t sp800108_bits
 
size_t capacity
 
size_t info_length
 
uint8_t salt [128]
 
uint8_t prk [128]
 
uint8_t block [64]
 
uint8_t prf_a [64]
 
uint8_t other_secret [64]
 
uint8_t info [256]
 
uint16_t salt_length
 
uint8_t block_number
 
uint8_t block_offset
 
uint8_t prk_length
 
uint8_t other_secret_length
 
uint8_t flags
 
void * key_references
 
psa_key_id_t opaque_pbkdf2_key
 
psa_key_derivation_step_t opaque_pbkdf2_step
 
size_t opaque_salt_offset
 

Detailed Description

Key-derivation state.

agreement_alg holds the combined ECDH/KDF algorithm when applicable; alg holds the underlying KDF. HKDF information and PBKDF2 salt are limited to 256 bytes; TLS 1.2 seed is limited to 64 bytes, label to 256 bytes and PSK-to-MS other secret to 64 bytes. HKDF output is limited to 255 digest blocks, except HKDF-Extract, whose output is one digest. The other HMAC derivations support SHA-256/384/512 when enabled. SP 800-108 has a 128-byte label, 256-byte context and 32-bit counter; its initial capacity is 0x1fffffff bytes. The first output fixes L. Applications must treat the complete object as opaque.

Field Documentation

◆ agreement_alg

psa_algorithm_t psa_key_derivation_operation_s::agreement_alg

◆ alg

psa_algorithm_t psa_key_derivation_operation_s::alg

◆ block

uint8_t psa_key_derivation_operation_s::block[64]

◆ block_number

uint8_t psa_key_derivation_operation_s::block_number

◆ block_offset

uint8_t psa_key_derivation_operation_s::block_offset

◆ capacity

size_t psa_key_derivation_operation_s::capacity

◆ cost

uint32_t psa_key_derivation_operation_s::cost

◆ flags

uint8_t psa_key_derivation_operation_s::flags

◆ info

uint8_t psa_key_derivation_operation_s::info[256]

◆ info_length

size_t psa_key_derivation_operation_s::info_length

◆ key_references

void* psa_key_derivation_operation_s::key_references

◆ opaque_pbkdf2_key

psa_key_id_t psa_key_derivation_operation_s::opaque_pbkdf2_key

◆ opaque_pbkdf2_step

psa_key_derivation_step_t psa_key_derivation_operation_s::opaque_pbkdf2_step

◆ opaque_salt_offset

size_t psa_key_derivation_operation_s::opaque_salt_offset

◆ other_secret

uint8_t psa_key_derivation_operation_s::other_secret[64]

◆ other_secret_length

uint8_t psa_key_derivation_operation_s::other_secret_length

◆ prf_a

uint8_t psa_key_derivation_operation_s::prf_a[64]

◆ prk

uint8_t psa_key_derivation_operation_s::prk[128]

◆ prk_length

uint8_t psa_key_derivation_operation_s::prk_length

◆ salt

uint8_t psa_key_derivation_operation_s::salt[128]

◆ salt_length

uint16_t psa_key_derivation_operation_s::salt_length

◆ sp800108_bits

uint32_t psa_key_derivation_operation_s::sp800108_bits

◆ sp800108_counter

uint32_t psa_key_derivation_operation_s::sp800108_counter

◆ state

uint32_t psa_key_derivation_operation_s::state