iPXE
tls_preshared_key Struct Reference

A TLS pre-shared key. More...

#include <tlskey.h>

Data Fields

const struct tls_key_schedule_operationsop
 Key schedule operations (if set).
struct digest_algorithmdigest
 Digest algorithm (if set).
unsigned int flags
 Key flags.
union { 
   union { 
      uint8_t   raw [48] 
      struct { 
         uint8_t   md5 [24] 
         uint8_t   sha1 [24] 
      } 
   }   master_secret
 Master secret. More...
   uint8_t   resumption [48] 
 Resumption secret. More...
key
 Key material.

Detailed Description

A TLS pre-shared key.

Definition at line 128 of file tlskey.h.

Field Documentation

◆ op

const struct tls_key_schedule_operations* tls_preshared_key::op

Key schedule operations (if set).

Definition at line 130 of file tlskey.h.

Referenced by tlskey_bind(), tlskey_load(), and tlskey_save().

◆ digest

struct digest_algorithm* tls_preshared_key::digest

Digest algorithm (if set).

Definition at line 132 of file tlskey.h.

Referenced by tlskey_bind(), tlskey_hkdf_bind(), tlskey_hkdf_load(), tlskey_load(), and tlskey_save().

◆ flags

unsigned int tls_preshared_key::flags

Key flags.

Definition at line 134 of file tlskey.h.

Referenced by tlskey_load(), and tlskey_save().

◆ raw

uint8_t tls_preshared_key::raw[48]

Definition at line 149 of file tlskey.h.

◆ md5

uint8_t tls_preshared_key::md5[24]

Definition at line 151 of file tlskey.h.

Referenced by tlskey_md5_sha1_save().

◆ sha1

uint8_t tls_preshared_key::sha1[24]

Definition at line 152 of file tlskey.h.

Referenced by tlskey_md5_sha1_save().

◆ [union]

union { ... } tls_preshared_key::master_secret

Master secret.

For TLSv1.2 and earlier, session resumption works by simply copying the 48-byte raw master secret value.

For TLSv1.1 and earlier, this 48-byte master secret logically comprises two halves: 24 bytes for MD5 and 24 bytes for SHA-1.

Referenced by tlskey_hash_load(), tlskey_hash_save(), and tlskey_md5_sha1_save().

◆ resumption

uint8_t tls_preshared_key::resumption[48]

Resumption secret.

For TLSv1.3 and later, session resumption uses a pre-shared resumption secret value generated using the HKDF Derive-Secret function.

The longest possible value for any supported HKDF digest algorithm is 48 bytes, when using SHA-384.

Definition at line 165 of file tlskey.h.

Referenced by rfc8448_simple_test(), tlskey_hkdf_load(), and tlskey_hkdf_save().

◆ [union]


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