wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
transcript.h File Reference

RFC 8446 4.4.1: cumulative Transcript-Hash over handshake messages. More...

#include "crypto/symmetric/hash/hash/sha256.h"
#include "crypto/symmetric/hash/hash/sha384.h"

Go to the source code of this file.

Data Structures

struct  transcript
 Cumulative Transcript-Hash state. More...

Functions

void transcript_init (transcript *t)
 Start an empty transcript.
void transcript_add (transcript *t, const u8 *msg, usz len)
 Fold a handshake message into the transcript.
void transcript_hash (const transcript *t, u8 out[SHA256_DIGEST])
 Running hash at the current point; t is left unchanged.
void transcript_hash_suite (const transcript *t, u16 suite, u8 *out)
 Running hash under suite's hash (SHA-384 for TLS_AES_256_GCM_SHA384, else SHA-256); t is left unchanged.

Detailed Description

RFC 8446 4.4.1: cumulative Transcript-Hash over handshake messages.

Function Documentation

◆ transcript_add()

void transcript_add ( transcript * t,
const u8 * msg,
usz len )

Fold a handshake message into the transcript.

Parameters
ttranscript state
msgthe handshake message bytes
lenlength of msg in bytes

◆ transcript_hash()

void transcript_hash ( const transcript * t,
u8 out[SHA256_DIGEST] )

Running hash at the current point; t is left unchanged.

Parameters
ttranscript state
outreceives the transcript hash

◆ transcript_hash_suite()

void transcript_hash_suite ( const transcript * t,
u16 suite,
u8 * out )

Running hash under suite's hash (SHA-384 for TLS_AES_256_GCM_SHA384, else SHA-256); t is left unchanged.

Parameters
ttranscript state
suiteRFC 8446 B.4 cipher suite
outreceives Hash.length bytes

◆ transcript_init()

void transcript_init ( transcript * t)

Start an empty transcript.

Parameters
ttranscript state to initialize