iPXE
tls_key_schedule_operations Struct Reference

TLS key schedule operations. More...

#include <tlskey.h>

Data Fields

const char * name
 Name.
int accumulates
 Key schedule accumulates all shared secrets.
unsigned int mask
 Key flags preserved when loading key material.
size_t(* secretsize )(struct digest_algorithm *digest)
 Calculate secret size.
void(* expand )(struct digest_algorithm *digest, const void *secret, const char *label, const void *seed, size_t seed_len, void *out, size_t out_len)
 Expand key material.
void(* reset )(struct tls_key_schedule *tlskey)
 Reset key schedule.
int(* apply )(struct tls_key_schedule *tlskey, const void *shared, size_t shared_len)
 Apply a new shared secret.
int(* master )(struct tls_key_schedule *tlskey, int ems)
 Generate master secret.
int(* verify )(struct tls_key_schedule *tlskey, const struct tls_endpoint *end, void *verify, size_t verify_len)
 Generate verification data.
int(* traffic )(struct tls_key_schedule *tlskey, const struct tls_endpoint *writer, const struct tls_phase *phase)
 Generate traffic secrets.
int(* cipher )(struct tls_key_schedule *tlskey, const struct tls_endpoint *writer, void *key, size_t key_len, void *iv, size_t iv_len, void *mac, size_t mac_len)
 Generate cipher key material.
int(* tbshash )(struct tls_key_schedule *tlskey, const struct tls_endpoint *end, struct digest_algorithm *digest, const void *data, size_t len, void *tbs)
 Generate signable digest value.
int(* save )(struct tls_key_schedule *tlskey, const void *nonce, size_t nonce_len, struct tls_preshared_key *psk)
 Save pre-shared key.
int(* load )(struct tls_key_schedule *tlskey, const struct tls_preshared_key *psk)
 Load pre-shared key.
int(* bind )(const struct tls_preshared_key *psk, const void *hash, void *binder, size_t binder_len)
 Generate pre-shared key binder value.

Detailed Description

TLS key schedule operations.

Definition at line 170 of file tlskey.h.

Field Documentation

◆ name

const char* tls_key_schedule_operations::name

Name.

Definition at line 172 of file tlskey.h.

Referenced by tlskey_load(), and tlskey_start().

◆ accumulates

int tls_key_schedule_operations::accumulates

Key schedule accumulates all shared secrets.

The ability to demonstrate possession of the key material is sufficient to demonstrate possession of the most recently applied shared secret.

This flag indicates that the ability to demonstrate possession of the key material is also sufficient to demonstrate possession of all previously applied shared secrets.

Definition at line 185 of file tlskey.h.

◆ mask

unsigned int tls_key_schedule_operations::mask

Key flags preserved when loading key material.

Definition at line 187 of file tlskey.h.

◆ secretsize

size_t(* tls_key_schedule_operations::secretsize) (struct digest_algorithm *digest)

Calculate secret size.

Parameters
digestDigest algorithm
Return values
secretsizeSecret size, or zero if unsupported

Definition at line 194 of file tlskey.h.

◆ expand

void(* tls_key_schedule_operations::expand) (struct digest_algorithm *digest, const void *secret, const char *label, const void *seed, size_t seed_len, void *out, size_t out_len)

Expand key material.

Parameters
digestDigest algorithm
secretSecret
labelLabel string
seedSeed material
seed_lenLength of seed material
outOutput buffer
out_lenLength of output buffer

Definition at line 206 of file tlskey.h.

◆ reset

void(* tls_key_schedule_operations::reset) (struct tls_key_schedule *tlskey)

Reset key schedule.

Parameters
tlskeyKey schedule

Definition at line 215 of file tlskey.h.

◆ apply

int(* tls_key_schedule_operations::apply) (struct tls_key_schedule *tlskey, const void *shared, size_t shared_len)

Apply a new shared secret.

Parameters
tlskeyKey schedule
sharedNew shared secret
shared_lenLength of new shared secret
Return values
rcReturn status code

Definition at line 224 of file tlskey.h.

◆ master

int(* tls_key_schedule_operations::master) (struct tls_key_schedule *tlskey, int ems)

Generate master secret.

Parameters
tlskeyKey schedule
emsExtended master secret extension is enabled
Return values
rcReturn status code

Definition at line 233 of file tlskey.h.

◆ verify

int(* tls_key_schedule_operations::verify) (struct tls_key_schedule *tlskey, const struct tls_endpoint *end, void *verify, size_t verify_len)

Generate verification data.

Parameters
tlskeyKey schedule
endVerification endpoint
verifyVerification data
verify_lenLength of verification data
Return values
rcReturn status code

Definition at line 243 of file tlskey.h.

Referenced by tlskey_verify().

◆ traffic

int(* tls_key_schedule_operations::traffic) (struct tls_key_schedule *tlskey, const struct tls_endpoint *writer, const struct tls_phase *phase)

Generate traffic secrets.

Parameters
tlskeyKey schedule
writerWriter endpoint
phaseTraffic phase
Return values
rcReturn status code

Definition at line 254 of file tlskey.h.

◆ cipher

int(* tls_key_schedule_operations::cipher) (struct tls_key_schedule *tlskey, const struct tls_endpoint *writer, void *key, size_t key_len, void *iv, size_t iv_len, void *mac, size_t mac_len)

Generate cipher key material.

Parameters
tlskeyKey schedule
writerWriter endpoint
keyCipher key to fill in
key_lenLength of cipher key
ivFixed portion of IV to fill in
iv_lenLength of fixed portion of IV
macMAC secret to fill in
mac_lenLength of MAC secret
Return values
rcReturn status code

Definition at line 270 of file tlskey.h.

◆ tbshash

int(* tls_key_schedule_operations::tbshash) (struct tls_key_schedule *tlskey, const struct tls_endpoint *end, struct digest_algorithm *digest, const void *data, size_t len, void *tbs)

Generate signable digest value.

Parameters
tlskeyKey schedule
endEndpoint
digestSignature digest algorithm
dataAdditional data
lenLength of additional data
tbsSignature digest value to fill in
Return values
rcReturn status code

Definition at line 285 of file tlskey.h.

◆ save

int(* tls_key_schedule_operations::save) (struct tls_key_schedule *tlskey, const void *nonce, size_t nonce_len, struct tls_preshared_key *psk)

Save pre-shared key.

Parameters
tlskeyKey schedule
nonceTicket nonce
nonce_lenLength of ticket nonce
pskPre-shared key to fill in
Return values
rcReturn status code

Definition at line 298 of file tlskey.h.

◆ load

int(* tls_key_schedule_operations::load) (struct tls_key_schedule *tlskey, const struct tls_preshared_key *psk)

Load pre-shared key.

Parameters
tlskeyKey schedule
pskPre-shared key
Return values
rcReturn status code

Definition at line 307 of file tlskey.h.

◆ bind

int(* tls_key_schedule_operations::bind) (const struct tls_preshared_key *psk, const void *hash, void *binder, size_t binder_len)

Generate pre-shared key binder value.

Parameters
pskPre-shared key
hashPartial transcript hash
binderBinder value to fill in
binder_lenLength of binder value
Return values
rcReturn status code

Definition at line 318 of file tlskey.h.


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