iPXE
tlskey_test.c File Reference

TLS key schedule tests. More...

#include <string.h>
#include <ipxe/malloc.h>
#include <ipxe/sha256.h>
#include <ipxe/md5_sha1.h>
#include <ipxe/x25519.h>
#include <ipxe/tlskey.h>
#include <ipxe/test.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static void rfc8448_simple_test (struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
 Perform RFC 8448 simple 1-RTT test.
static void rfc8448_resumed_test (struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
 Perform RFC 8448 resumed 0-RTT test.
static void dummy_hash (struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
 Perform dummy TLS version 1.2 test.
static void dummy_md5_sha1 (struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
 Perform dummy TLS version 1.0 test.
static void tlskey_test_exec (void)
 Perform TLS key schedule self-test.

Variables

static const struct tls_random rfc8448_simple_client_nonce
 RFC 8448 simple 1-RTT test: client random bytes.
static const uint8_t rfc8448_simple_x25519_private []
 RFC 8448 simple 1-RTT test: client X25519 private key.
static const uint8_t rfc8448_simple_x25519_partner []
 RFC 8448 simple 1-RTT test: server X25519 public key.
static const uint8_t rfc8448_simple_ticket_nonce [] = { 0x00, 0x00 }
 RFC 8448 simple 1-RTT test: ticket nonce.
static const uint8_t rfc8448_simple_clienthello []
 RFC 8448 simple 1-RTT test: ClientHello.
static const uint8_t rfc8448_simple_serverhello []
 RFC 8448 simple 1-RTT test: ServerHello.
static const uint8_t rfc8448_simple_encryptedextensions []
 RFC 8448 simple 1-RTT test: EncryptedExtensions.
static const uint8_t rfc8448_simple_certificate []
 RFC 8448 simple 1-RTT test: Certificate.
static const uint8_t rfc8448_simple_certificateverify []
 RFC 8448 simple 1-RTT test: CertificateVerify.
static const uint8_t rfc8448_simple_server_finished []
 RFC 8448 simple 1-RTT test: server Finished.
static const uint8_t rfc8448_simple_client_finished []
 RFC 8448 simple 1-RTT test: client Finished.
static const uint8_t rfc8448_simple_newsessionticket []
 RFC 8448 simple 1-RTT test: NewSessionTicket.
static const uint8_t rfc8448_simple_early_secret []
 RFC 8448 simple 1-RTT test: early secret.
static const uint8_t rfc8448_simple_handshake_secret []
 RFC 8448 simple 1-RTT test: handshake secret.
static const uint8_t rfc8448_simple_client_handshake_traffic_secret []
 RFC 8448 simple 1-RTT test: client handshake traffic secret.
static const uint8_t rfc8448_simple_client_handshake_traffic_key []
 RFC 8448 simple 1-RTT test: client handshake traffic key.
static const uint8_t rfc8448_simple_client_handshake_traffic_iv []
 RFC 8448 simple 1-RTT test: client handshake traffic IV.
static const uint8_t rfc8448_simple_server_handshake_traffic_secret []
 RFC 8448 simple 1-RTT test: server handshake traffic secret.
static const uint8_t rfc8448_simple_server_handshake_traffic_key []
 RFC 8448 simple 1-RTT test: server handshake traffic key.
static const uint8_t rfc8448_simple_server_handshake_traffic_iv []
 RFC 8448 simple 1-RTT test: server handshake traffic IV.
static const uint8_t rfc8448_simple_client_verify []
 RFC 8448 simple 1-RTT test: client verification.
static const uint8_t rfc8448_simple_server_verify []
 RFC 8448 simple 1-RTT test: server verification.
static const uint8_t rfc8448_simple_master_secret []
 RFC 8448 simple 1-RTT test: master secret.
static const uint8_t rfc8448_simple_client_application_traffic_secret []
 RFC 8448 simple 1-RTT test: client application traffic secret.
static const uint8_t rfc8448_simple_client_application_traffic_key []
 RFC 8448 simple 1-RTT test: client application traffic key.
static const uint8_t rfc8448_simple_client_application_traffic_iv []
 RFC 8448 simple 1-RTT test: client application traffic IV.
static const uint8_t rfc8448_simple_server_application_traffic_secret []
 RFC 8448 simple 1-RTT test: server application traffic secret.
static const uint8_t rfc8448_simple_server_application_traffic_key []
 RFC 8448 simple 1-RTT test: server application traffic key.
static const uint8_t rfc8448_simple_server_application_traffic_iv []
 RFC 8448 simple 1-RTT test: server application traffic IV.
static const uint8_t rfc8448_simple_resumption []
 RFC 8448 simple 1-RTT test: resumption secret.
static const uint8_t rfc8448_simple_server_tbshash []
 RFC 8448 simple 1-RTT test: server CertificateVerify signable digest.
static const struct tls_random rfc8448_resumed_server_nonce
 RFC 8448 resumed 0-RTT test: server random bytes.
static const uint8_t rfc8448_resumed_x25519_private []
 RFC 8448 resumed 0-RTT test: client X25519 private key.
static const uint8_t rfc8448_resumed_x25519_partner []
 RFC 8448 resumed 0-RTT test: server X25519 public key.
static const uint8_t rfc8448_resumed_clienthello []
 RFC 8448 resumed 0-RTT test: ClientHello.
static const uint8_t rfc8448_resumed_serverhello []
 RFC 8448 resumed 0-RTT test: ServerHello.
static const size_t rfc8448_resumed_clienthello_prefix_len
 RFC 8448 resumed 0-RTT test: ClientHello prefix length.
static const uint8_t rfc8448_resumed_encryptedextensions []
 RFC 8448 resumed 0-RTT test: EncryptedExtensions.
static const uint8_t rfc8448_resumed_server_finished []
 RFC 8448 resumed 0-RTT test: server Finished.
static const uint8_t rfc8448_resumed_endofearlydata []
 RFC 8448 resumed 0-RTT test: EndOfEarlyData.
static const uint8_t rfc8448_resumed_client_finished []
 RFC 8448 resumed 0-RTT test: client Finished.
static const uint8_t rfc8448_resumed_psk_binder []
 RFC 8448 resumed 0-RTT test: PSK binder.
static const uint8_t rfc8448_resumed_early_secret []
 RFC 8448 resumed 0-RTT test: early secret.
static const uint8_t rfc8448_resumed_client_early_traffic_secret []
 RFC 8448 resumed 0-RTT test: client early traffic secret.
static const uint8_t rfc8448_resumed_client_early_traffic_key []
 RFC 8448 resumed 0-RTT test: client early traffic key.
static const uint8_t rfc8448_resumed_client_early_traffic_iv []
 RFC 8448 resumed 0-RTT test: client early traffic IV.
static const uint8_t rfc8448_resumed_handshake_secret []
 RFC 8448 resumed 0-RTT test: handshake secret.
static const uint8_t rfc8448_resumed_client_handshake_traffic_secret []
 RFC 8448 resumed 0-RTT test: client handshake traffic secret.
static const uint8_t rfc8448_resumed_client_handshake_traffic_key []
 RFC 8448 resumed 0-RTT test: client handshake traffic key.
static const uint8_t rfc8448_resumed_client_handshake_traffic_iv []
 RFC 8448 resumed 0-RTT test: client handshake traffic IV.
static const uint8_t rfc8448_resumed_server_handshake_traffic_secret []
 RFC 8448 resumed 0-RTT test: server handshake traffic secret.
static const uint8_t rfc8448_resumed_server_handshake_traffic_key []
 RFC 8448 resumed 0-RTT test: server handshake traffic key.
static const uint8_t rfc8448_resumed_server_handshake_traffic_iv []
 RFC 8448 resumed 0-RTT test: server handshake traffic IV.
static const uint8_t rfc8448_resumed_client_verify []
 RFC 8448 resumed 0-RTT test: client verification.
static const uint8_t rfc8448_resumed_server_verify []
 RFC 8448 resumed 0-RTT test: server verification.
static const uint8_t rfc8448_resumed_master_secret []
 RFC 8448 resumed 0-RTT test: master secret.
static const uint8_t rfc8448_resumed_client_application_traffic_secret []
 RFC 8448 resumed 0-RTT test: client application traffic secret.
static const uint8_t rfc8448_resumed_client_application_traffic_key []
 RFC 8448 resumed 0-RTT test: client application traffic key.
static const uint8_t rfc8448_resumed_client_application_traffic_iv []
 RFC 8448 resumed 0-RTT test: client application traffic IV.
static const uint8_t rfc8448_resumed_server_application_traffic_secret []
 RFC 8448 resumed 0-RTT test: server application traffic secret.
static const uint8_t rfc8448_resumed_server_application_traffic_key []
 RFC 8448 resumed 0-RTT test: server application traffic key.
static const uint8_t rfc8448_resumed_server_application_traffic_iv []
 RFC 8448 resumed 0-RTT test: server application traffic IV.
static const struct tls_random dummy_client_nonce
 Dummy minimal tests: client random bytes.
static const uint8_t dummy_clienthello []
 Dummy minimal tests: ClientHello.
static const uint8_t dummy_serverhello []
 Dummy minimal tests: ServerHello.
static const uint8_t dummy_premaster []
 Dummy minimal tests: pre-master secret.
static const uint8_t dummy_dh_param []
 Dummy minimal tests: ServerKeyExchange DH parameters.
static const uint8_t dummy_hash_master_secret []
 Dummy minimal TLSv1.2 test: master secret.
static const uint8_t dummy_hash_client_verify []
 Dummy minimal TLSv1.2 test: client verification.
static const uint8_t dummy_hash_server_verify []
 Dummy minimal TLSv1.2 test: server verification.
static const uint8_t dummy_hash_client_traffic_key []
 Dummy minimal TLSv1.2 test: client traffic key.
static const uint8_t dummy_hash_client_traffic_iv []
 Dummy minimal TLSv1.2 test: client traffic IV.
static const uint8_t dummy_hash_client_traffic_mac []
 Dummy minimal TLSv1.2 test: client traffic MAC.
static const uint8_t dummy_hash_server_traffic_key []
 Dummy minimal TLSv1.2 test: server traffic key.
static const uint8_t dummy_hash_server_traffic_iv []
 Dummy minimal TLSv1.2 test: server traffic IV.
static const uint8_t dummy_hash_server_traffic_mac []
 Dummy minimal TLSv1.2 test: server traffic MAC.
static const uint8_t dummy_hash_client_tbshash []
 Dummy minimal TLSv1.2 test: client signable digest.
static const uint8_t dummy_hash_server_tbshash []
 Dummy minimal TLSv1.2 test: server signable digest.
static const uint8_t dummy_md5_sha1_master_secret_md5 []
 Dummy minimal TLSv1.0 test: master secret (MD5 portion).
static const uint8_t dummy_md5_sha1_master_secret_sha1 []
 Dummy minimal TLSv1.0 test: master secret (SHA-1 portion).
static const uint8_t dummy_md5_sha1_client_verify []
 Dummy minimal TLSv1.0 test: client verification.
static const uint8_t dummy_md5_sha1_server_verify []
 Dummy minimal TLSv1.0 test: server verification.
static const uint8_t dummy_md5_sha1_client_traffic_key []
 Dummy minimal TLSv1.0 test: client traffic key.
static const uint8_t dummy_md5_sha1_client_traffic_iv []
 Dummy minimal TLSv1.0 test: client traffic IV.
static const uint8_t dummy_md5_sha1_client_traffic_mac []
 Dummy minimal TLSv1.0 test: client traffic MAC.
static const uint8_t dummy_md5_sha1_server_traffic_key []
 Dummy minimal TLSv1.0 test: server traffic key.
static const uint8_t dummy_md5_sha1_server_traffic_iv []
 Dummy minimal TLSv1.0 test: server traffic IV.
static const uint8_t dummy_md5_sha1_server_traffic_mac []
 Dummy minimal TLSv1.0 test: server traffic MAC.
struct self_test tlskey_test __self_test
 TLS key schedule self-test.

Detailed Description

TLS key schedule tests.

TLS version 1.3 example handshake traces are provided in RFC 8448. We include the "Simple 1-RTT Handshake" and "Resumed 0-RTT Handshake" test cases, to exercise all successful code paths for the HKDF-based key schedule (including session resumption).

For TLS version 1.2 and earlier, there are no good reference example handshake traces available. We choose to run through a non-functional minimal handshake that allows us to exercise the relevant code paths and so at least prevent regressions.

Definition in file tlskey_test.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ rfc8448_simple_test()

void rfc8448_simple_test ( struct tls_key_schedule * tlskey,
struct tls_preshared_key * psk )
static

Perform RFC 8448 simple 1-RTT test.

Parameters
tlskeyKey schedule
pskPre-shared key from which to resume

Definition at line 794 of file tlskey_test.c.

795 {
796 struct exchange_algorithm *exchange = &x25519_algorithm;
797 struct digest_algorithm *digest = &sha256_algorithm;
798 size_t sharedsize = exchange->sharedsize;
799 size_t digestsize = digest->digestsize;
800 uint8_t shared[sharedsize];
801 uint8_t tbshash[digestsize];
802 uint8_t verify[digestsize];
803 uint8_t key[16];
804 uint8_t iv[12];
805
806 /* Start key schedule */
807 ok ( tlskey_start ( tlskey, &tlskey_hkdf, digest,
809
810 /* Early secret */
812 tlskey->kdf.secret, digestsize ) == 0 );
813
814 /* ClientHello */
816 sizeof ( rfc8448_simple_clienthello ) );
817
818 /* ServerHello */
820 sizeof ( rfc8448_simple_serverhello ) );
822 rfc8448_simple_x25519_partner, shared ) == 0 );
823 ok ( tlskey_apply ( tlskey, shared, sizeof ( shared ) ) == 0 );
824
825 /* Handshake secret */
827 tlskey->kdf.secret, digestsize ) == 0 );
828
829 /* Client handshake traffic secret */
830 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_handshake ) == 0 );
832 tlskey->traffic[TLS_CLIENT].secret, digestsize ) == 0 );
833
834 /* Server handshake traffic secret */
835 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_handshake ) == 0 );
837 tlskey->traffic[TLS_SERVER].secret, digestsize ) == 0 );
838
839 /* Master secret */
840 ok ( tlskey_master ( tlskey, 1 ) == 0 );
842 tlskey->kdf.secret, digestsize ) == 0 );
843
844 /* Server handshake traffic keys */
845 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
846 iv, sizeof ( iv ), NULL, 0 ) == 0 );
848 key, sizeof ( key ) ) == 0 );
850 iv, sizeof ( iv ) ) == 0 );
851
852 /* EncryptedExtensions */
855
856 /* Certificate */
858 sizeof ( rfc8448_simple_certificate ) );
859
860 /* CertificateVerify signable digest */
861 ok ( tlskey_tbshash ( tlskey, &tls_server, digest, NULL, 0,
862 tbshash ) == 0 );
864 tbshash, sizeof ( tbshash ) ) == 0 );
865
866 /* CertificateVerify */
869
870 /* Server verification */
871 ok ( tlskey_verify ( tlskey, &tls_server, verify,
872 sizeof ( verify ) ) == 0 );
874 verify, sizeof ( verify ) ) == 0 );
875
876 /* Server Finished */
879
880 /* Server application traffic secret */
881 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_application ) == 0 );
883 tlskey->traffic[TLS_SERVER].secret, digestsize ) == 0 );
884
885 /* Server application traffic keys */
886 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
887 iv, sizeof ( iv ), NULL, 0 ) == 0 );
889 key, sizeof ( key ) ) == 0 );
891 iv, sizeof ( iv ) ) == 0 );
892
893 /* Client handshake traffic keys */
894 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
895 iv, sizeof ( iv ), NULL, 0 ) == 0 );
897 key, sizeof ( key ) ) == 0 );
899 iv, sizeof ( iv ) ) == 0 );
900
901 /* Client verification */
902 ok ( tlskey_verify ( tlskey, &tls_client, verify,
903 sizeof ( verify ) ) == 0 );
905 verify, sizeof ( verify ) ) == 0 );
906
907 /* Client application traffic secret */
908 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_application ) == 0 );
910 tlskey->traffic[TLS_CLIENT].secret, digestsize ) == 0 );
911
912 /* Client Finished */
915
916 /* Client application traffic keys */
917 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
918 iv, sizeof ( iv ), NULL, 0 ) == 0 );
920 key, sizeof ( key ) ) == 0 );
922 iv, sizeof ( iv ) ) == 0 );
923
924 /* NewSessionTicket */
927
928 /* Resumption secret */
931 psk ) == 0 );
933 psk->key.resumption, digestsize ) == 0 );
934
935 /* Stop key schedule */
936 tlskey_stop ( tlskey );
937}
#define NULL
NULL pointer (VOID *).
Definition Base.h:321
union @162305117151260234136356364136041353210355154177 key
unsigned char uint8_t
Definition stdint.h:10
static int exchange_agree(struct exchange_algorithm *exchange, const void *private, const void *partner, void *shared)
Definition crypto.h:403
uint32_t digestsize
Digest size (i.e.
Definition pccrr.h:1
struct digest_algorithm sha256_algorithm
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition string.c:115
A message digest algorithm.
Definition crypto.h:19
size_t digestsize
Digest size.
Definition crypto.h:27
A key exchange algorithm.
Definition crypto.h:210
size_t sharedsize
Shared secret size.
Definition crypto.h:218
TLS client state.
Definition tls.h:421
void * secret
Secret.
Definition tlskey.h:77
struct tls_traffic_secret traffic[2]
Traffic secrets.
Definition tlskey.h:124
struct tls_kdf_secret kdf
Key derivation function secret.
Definition tlskey.h:122
uint8_t resumption[48]
Resumption secret.
Definition tlskey.h:165
union tls_preshared_key::@022173016027117201055347232316162256252261104170 key
Key material.
TLS server state.
Definition tls.h:431
void * secret
Secret.
Definition tlskey.h:94
#define ok(success)
Definition test.h:46
int tlskey_save(struct tls_key_schedule *tlskey, const void *nonce, size_t nonce_len, struct tls_preshared_key *psk)
Save pre-shared key.
Definition tlskey.c:785
int tlskey_master(struct tls_key_schedule *tlskey, int ems)
Generate master secret.
Definition tlskey.c:557
int tlskey_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.
Definition tlskey.c:691
void tlskey_stop(struct tls_key_schedule *tlskey)
Stop key schedule.
Definition tlskey.c:259
const struct tls_phase tls_handshake
Handshake traffic phase.
Definition tlskey.c:144
int tlskey_start(struct tls_key_schedule *tlskey, const struct tls_key_schedule_operations *op, struct digest_algorithm *digest, const struct tls_random *nonce)
Start key schedule.
Definition tlskey.c:180
int tlskey_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.
Definition tlskey.c:744
int tlskey_apply(struct tls_key_schedule *tlskey, const void *shared, size_t shared_len)
Apply a new shared secret.
Definition tlskey.c:522
int tlskey_traffic(struct tls_key_schedule *tlskey, const struct tls_endpoint *writer, const struct tls_phase *phase)
Generate traffic secret.
Definition tlskey.c:639
int tlskey_verify(struct tls_key_schedule *tlskey, const struct tls_endpoint *end, void *verify, size_t verify_len)
Generate verification data.
Definition tlskey.c:602
void tlskey_digest(struct tls_key_schedule *tlskey, const void *data, size_t len)
Add handshake to running transcript digest.
Definition tlskey.c:416
const struct tls_phase tls_application
Application traffic phase.
Definition tlskey.c:151
const struct tls_key_schedule_operations tlskey_hkdf
TLS key schedule based on HKDF.
Definition tlskey.c:1369
#define TLS_CLIENT
Client endpoint index.
Definition tlskey.h:27
#define TLS_SERVER
Server endpoint index.
Definition tlskey.h:30
static const uint8_t rfc8448_simple_client_handshake_traffic_key[]
RFC 8448 simple 1-RTT test: client handshake traffic key.
static const uint8_t rfc8448_simple_handshake_secret[]
RFC 8448 simple 1-RTT test: handshake secret.
static const uint8_t rfc8448_simple_client_application_traffic_key[]
RFC 8448 simple 1-RTT test: client application traffic key.
static const uint8_t rfc8448_simple_newsessionticket[]
RFC 8448 simple 1-RTT test: NewSessionTicket.
static const uint8_t rfc8448_simple_encryptedextensions[]
RFC 8448 simple 1-RTT test: EncryptedExtensions.
static const uint8_t rfc8448_simple_server_handshake_traffic_iv[]
RFC 8448 simple 1-RTT test: server handshake traffic IV.
static const struct tls_random rfc8448_simple_client_nonce
RFC 8448 simple 1-RTT test: client random bytes.
Definition tlskey_test.c:54
static const uint8_t rfc8448_simple_x25519_private[]
RFC 8448 simple 1-RTT test: client X25519 private key.
Definition tlskey_test.c:64
static const uint8_t rfc8448_simple_server_verify[]
RFC 8448 simple 1-RTT test: server verification.
static const uint8_t rfc8448_simple_ticket_nonce[]
RFC 8448 simple 1-RTT test: ticket nonce.
Definition tlskey_test.c:78
static const uint8_t rfc8448_simple_client_verify[]
RFC 8448 simple 1-RTT test: client verification.
static const uint8_t rfc8448_simple_client_application_traffic_secret[]
RFC 8448 simple 1-RTT test: client application traffic secret.
static const uint8_t rfc8448_simple_client_application_traffic_iv[]
RFC 8448 simple 1-RTT test: client application traffic IV.
static const uint8_t rfc8448_simple_serverhello[]
RFC 8448 simple 1-RTT test: ServerHello.
static const uint8_t rfc8448_simple_resumption[]
RFC 8448 simple 1-RTT test: resumption secret.
static const uint8_t rfc8448_simple_client_handshake_traffic_iv[]
RFC 8448 simple 1-RTT test: client handshake traffic IV.
static const uint8_t rfc8448_simple_early_secret[]
RFC 8448 simple 1-RTT test: early secret.
static const uint8_t rfc8448_simple_server_tbshash[]
RFC 8448 simple 1-RTT test: server CertificateVerify signable digest.
static const uint8_t rfc8448_simple_certificateverify[]
RFC 8448 simple 1-RTT test: CertificateVerify.
static const uint8_t rfc8448_simple_client_handshake_traffic_secret[]
RFC 8448 simple 1-RTT test: client handshake traffic secret.
static const uint8_t rfc8448_simple_x25519_partner[]
RFC 8448 simple 1-RTT test: server X25519 public key.
Definition tlskey_test.c:71
static const uint8_t rfc8448_simple_clienthello[]
RFC 8448 simple 1-RTT test: ClientHello.
Definition tlskey_test.c:81
static const uint8_t rfc8448_simple_master_secret[]
RFC 8448 simple 1-RTT test: master secret.
static const uint8_t rfc8448_simple_client_finished[]
RFC 8448 simple 1-RTT test: client Finished.
static const uint8_t rfc8448_simple_server_handshake_traffic_secret[]
RFC 8448 simple 1-RTT test: server handshake traffic secret.
static const uint8_t rfc8448_simple_server_application_traffic_iv[]
RFC 8448 simple 1-RTT test: server application traffic IV.
static const uint8_t rfc8448_simple_server_application_traffic_key[]
RFC 8448 simple 1-RTT test: server application traffic key.
static const uint8_t rfc8448_simple_certificate[]
RFC 8448 simple 1-RTT test: Certificate.
static const uint8_t rfc8448_simple_server_handshake_traffic_key[]
RFC 8448 simple 1-RTT test: server handshake traffic key.
static const uint8_t rfc8448_simple_server_finished[]
RFC 8448 simple 1-RTT test: server Finished.
static const uint8_t rfc8448_simple_server_application_traffic_secret[]
RFC 8448 simple 1-RTT test: server application traffic secret.
u8 iv[16]
Initialization vector.
Definition wpa.h:33
struct exchange_algorithm x25519_algorithm
X25519 key exchange algorithm.
Definition x25519.c:875

References digest_algorithm::digestsize, digestsize, exchange_agree(), iv, tls_key_schedule::kdf, key, tls_preshared_key::key, memcmp(), NULL, ok, tls_preshared_key::resumption, rfc8448_simple_certificate, rfc8448_simple_certificateverify, rfc8448_simple_client_application_traffic_iv, rfc8448_simple_client_application_traffic_key, rfc8448_simple_client_application_traffic_secret, rfc8448_simple_client_finished, rfc8448_simple_client_handshake_traffic_iv, rfc8448_simple_client_handshake_traffic_key, rfc8448_simple_client_handshake_traffic_secret, rfc8448_simple_client_nonce, rfc8448_simple_client_verify, rfc8448_simple_clienthello, rfc8448_simple_early_secret, rfc8448_simple_encryptedextensions, rfc8448_simple_handshake_secret, rfc8448_simple_master_secret, rfc8448_simple_newsessionticket, rfc8448_simple_resumption, rfc8448_simple_server_application_traffic_iv, rfc8448_simple_server_application_traffic_key, rfc8448_simple_server_application_traffic_secret, rfc8448_simple_server_finished, rfc8448_simple_server_handshake_traffic_iv, rfc8448_simple_server_handshake_traffic_key, rfc8448_simple_server_handshake_traffic_secret, rfc8448_simple_server_tbshash, rfc8448_simple_server_verify, rfc8448_simple_serverhello, rfc8448_simple_ticket_nonce, rfc8448_simple_x25519_partner, rfc8448_simple_x25519_private, tls_kdf_secret::secret, tls_traffic_secret::secret, sha256_algorithm, exchange_algorithm::sharedsize, tls_application, TLS_CLIENT, tls_handshake, TLS_SERVER, tlskey_apply(), tlskey_cipher(), tlskey_digest(), tlskey_hkdf, tlskey_master(), tlskey_save(), tlskey_start(), tlskey_stop(), tlskey_tbshash(), tlskey_traffic(), tlskey_verify(), tls_key_schedule::traffic, and x25519_algorithm.

Referenced by tlskey_test_exec().

◆ rfc8448_resumed_test()

void rfc8448_resumed_test ( struct tls_key_schedule * tlskey,
struct tls_preshared_key * psk )
static

Perform RFC 8448 resumed 0-RTT test.

Parameters
tlskeyKey schedule
pskPre-shared key from which to resume

Definition at line 945 of file tlskey_test.c.

946 {
947 struct exchange_algorithm *exchange = &x25519_algorithm;
948 struct digest_algorithm *digest = &sha256_algorithm;
949 size_t sharedsize = exchange->sharedsize;
950 size_t digestsize = digest->digestsize;
951 uint8_t shared[sharedsize];
952 uint8_t binder[digestsize];
953 uint8_t verify[digestsize];
954 uint8_t key[16];
955 int8_t iv[12];
956
957 /* Start key schedule */
958 ok ( tlskey_start ( tlskey, &tlskey_hkdf, digest,
960
961 /* ClientHello */
964 binder, sizeof ( binder ) ) == 0 );
966 binder, sizeof ( binder ) ) == 0 );
968 sizeof ( rfc8448_resumed_clienthello ) );
969
970 /* Early secret */
971 ok ( tlskey_load ( tlskey, 1, psk ) == 0 );
973 tlskey->kdf.secret, digestsize ) == 0 );
974
975 /* Client early traffic secret */
976 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_early ) == 0 );
978 tlskey->traffic[TLS_CLIENT].secret, digestsize ) == 0 );
979
980 /* Client early traffic keys */
981 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
982 iv, sizeof ( iv ), NULL, 0 ) == 0 );
984 key, sizeof ( key ) ) == 0 );
986 iv, sizeof ( iv ) ) == 0 );
987
988 /* ServerHello */
990 sizeof ( rfc8448_resumed_serverhello ) );
992 rfc8448_resumed_x25519_partner, shared ) == 0 );
993 ok ( tlskey_apply ( tlskey, shared, sizeof ( shared ) ) == 0 );
994
995 /* Handshake secret */
997 tlskey->kdf.secret, digestsize ) == 0 );
998
999 /* Client handshake traffic secret */
1000 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_handshake ) == 0 );
1002 tlskey->traffic[TLS_CLIENT].secret, digestsize ) == 0 );
1003
1004 /* Server handshake traffic secret */
1005 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_handshake ) == 0 );
1007 tlskey->traffic[TLS_SERVER].secret, digestsize ) == 0 );
1008
1009 /* Master secret */
1010 ok ( tlskey_master ( tlskey, 1 ) == 0 );
1012 tlskey->kdf.secret, digestsize ) == 0 );
1013
1014 /* Server handshake traffic keys */
1015 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
1016 iv, sizeof ( iv ), NULL, 0 ) == 0 );
1018 key, sizeof ( key ) ) == 0 );
1020 iv, sizeof ( iv ) ) == 0 );
1021
1022 /* EncryptedExtensions */
1025
1026 /* Server verification */
1027 ok ( tlskey_verify ( tlskey, &tls_server, verify,
1028 sizeof ( verify ) ) == 0 );
1030 verify, sizeof ( verify ) ) == 0 );
1031
1032 /* Server Finished */
1035
1036 /* Server application traffic secret */
1037 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_application ) == 0 );
1039 tlskey->traffic[TLS_SERVER].secret, digestsize ) == 0 );
1040
1041 /* Server application traffic keys */
1042 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
1043 iv, sizeof ( iv ), NULL, 0 ) == 0 );
1045 key, sizeof ( key ) ) == 0 );
1047 iv, sizeof ( iv ) ) == 0 );
1048
1049 /* Client handshake traffic keys */
1050 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
1051 iv, sizeof ( iv ), NULL, 0 ) == 0 );
1053 key, sizeof ( key ) ) == 0 );
1055 iv, sizeof ( iv ) ) == 0 );
1056
1057 /* EndOfEarlyData */
1059 sizeof ( rfc8448_resumed_endofearlydata ) );
1060
1061 /* Client verification */
1062 ok ( tlskey_verify ( tlskey, &tls_client, verify,
1063 sizeof ( verify ) ) == 0 );
1065 verify, sizeof ( verify ) ) == 0 );
1066
1067 /* Client application traffic secret */
1068 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_application ) == 0 );
1070 tlskey->traffic[TLS_CLIENT].secret, digestsize ) == 0 );
1071
1072 /* Client Finished */
1075
1076 /* Client application traffic keys */
1077 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
1078 iv, sizeof ( iv ), NULL, 0 ) == 0 );
1080 key, sizeof ( key ) ) == 0 );
1082 iv, sizeof ( iv ) ) == 0 );
1083
1084 /* Stop key schedule */
1085 tlskey_stop ( tlskey );
1086}
signed char int8_t
Definition stdint.h:15
int tlskey_load(struct tls_key_schedule *tlskey, int ems, const struct tls_preshared_key *psk)
Load pre-shared key.
Definition tlskey.c:828
const struct tls_phase tls_early
Early traffic phase.
Definition tlskey.c:137
int tlskey_bind(const struct tls_preshared_key *psk, const void *prefix, size_t prefix_len, void *binder, size_t binder_len)
Generate pre-shared key binder value.
Definition tlskey.c:885
static const uint8_t rfc8448_resumed_early_secret[]
RFC 8448 resumed 0-RTT test: early secret.
static const uint8_t rfc8448_resumed_endofearlydata[]
RFC 8448 resumed 0-RTT test: EndOfEarlyData.
static const uint8_t rfc8448_resumed_client_early_traffic_secret[]
RFC 8448 resumed 0-RTT test: client early traffic secret.
static const uint8_t rfc8448_resumed_handshake_secret[]
RFC 8448 resumed 0-RTT test: handshake secret.
static const uint8_t rfc8448_resumed_x25519_partner[]
RFC 8448 resumed 0-RTT test: server X25519 public key.
static const uint8_t rfc8448_resumed_client_handshake_traffic_key[]
RFC 8448 resumed 0-RTT test: client handshake traffic key.
static const uint8_t rfc8448_resumed_client_application_traffic_iv[]
RFC 8448 resumed 0-RTT test: client application traffic IV.
static const uint8_t rfc8448_resumed_server_verify[]
RFC 8448 resumed 0-RTT test: server verification.
static const uint8_t rfc8448_resumed_server_application_traffic_key[]
RFC 8448 resumed 0-RTT test: server application traffic key.
static const uint8_t rfc8448_resumed_client_early_traffic_iv[]
RFC 8448 resumed 0-RTT test: client early traffic IV.
static const uint8_t rfc8448_resumed_server_application_traffic_iv[]
RFC 8448 resumed 0-RTT test: server application traffic IV.
static const uint8_t rfc8448_resumed_server_handshake_traffic_key[]
RFC 8448 resumed 0-RTT test: server handshake traffic key.
static const uint8_t rfc8448_resumed_client_application_traffic_secret[]
RFC 8448 resumed 0-RTT test: client application traffic secret.
static const uint8_t rfc8448_resumed_server_finished[]
RFC 8448 resumed 0-RTT test: server Finished.
static const uint8_t rfc8448_resumed_client_verify[]
RFC 8448 resumed 0-RTT test: client verification.
static const struct tls_random rfc8448_resumed_server_nonce
RFC 8448 resumed 0-RTT test: server random bytes.
static const uint8_t rfc8448_resumed_client_early_traffic_key[]
RFC 8448 resumed 0-RTT test: client early traffic key.
static const uint8_t rfc8448_resumed_client_application_traffic_key[]
RFC 8448 resumed 0-RTT test: client application traffic key.
static const uint8_t rfc8448_resumed_encryptedextensions[]
RFC 8448 resumed 0-RTT test: EncryptedExtensions.
static const uint8_t rfc8448_resumed_client_finished[]
RFC 8448 resumed 0-RTT test: client Finished.
static const uint8_t rfc8448_resumed_client_handshake_traffic_secret[]
RFC 8448 resumed 0-RTT test: client handshake traffic secret.
static const uint8_t rfc8448_resumed_master_secret[]
RFC 8448 resumed 0-RTT test: master secret.
static const uint8_t rfc8448_resumed_server_handshake_traffic_iv[]
RFC 8448 resumed 0-RTT test: server handshake traffic IV.
static const uint8_t rfc8448_resumed_serverhello[]
RFC 8448 resumed 0-RTT test: ServerHello.
static const uint8_t rfc8448_resumed_psk_binder[]
RFC 8448 resumed 0-RTT test: PSK binder.
static const uint8_t rfc8448_resumed_client_handshake_traffic_iv[]
RFC 8448 resumed 0-RTT test: client handshake traffic IV.
static const size_t rfc8448_resumed_clienthello_prefix_len
RFC 8448 resumed 0-RTT test: ClientHello prefix length.
static const uint8_t rfc8448_resumed_server_handshake_traffic_secret[]
RFC 8448 resumed 0-RTT test: server handshake traffic secret.
static const uint8_t rfc8448_resumed_clienthello[]
RFC 8448 resumed 0-RTT test: ClientHello.
static const uint8_t rfc8448_resumed_server_application_traffic_secret[]
RFC 8448 resumed 0-RTT test: server application traffic secret.
static const uint8_t rfc8448_resumed_x25519_private[]
RFC 8448 resumed 0-RTT test: client X25519 private key.

References digest_algorithm::digestsize, digestsize, exchange_agree(), iv, tls_key_schedule::kdf, key, memcmp(), NULL, ok, rfc8448_resumed_client_application_traffic_iv, rfc8448_resumed_client_application_traffic_key, rfc8448_resumed_client_application_traffic_secret, rfc8448_resumed_client_early_traffic_iv, rfc8448_resumed_client_early_traffic_key, rfc8448_resumed_client_early_traffic_secret, rfc8448_resumed_client_finished, rfc8448_resumed_client_handshake_traffic_iv, rfc8448_resumed_client_handshake_traffic_key, rfc8448_resumed_client_handshake_traffic_secret, rfc8448_resumed_client_verify, rfc8448_resumed_clienthello, rfc8448_resumed_clienthello_prefix_len, rfc8448_resumed_early_secret, rfc8448_resumed_encryptedextensions, rfc8448_resumed_endofearlydata, rfc8448_resumed_handshake_secret, rfc8448_resumed_master_secret, rfc8448_resumed_psk_binder, rfc8448_resumed_server_application_traffic_iv, rfc8448_resumed_server_application_traffic_key, rfc8448_resumed_server_application_traffic_secret, rfc8448_resumed_server_finished, rfc8448_resumed_server_handshake_traffic_iv, rfc8448_resumed_server_handshake_traffic_key, rfc8448_resumed_server_handshake_traffic_secret, rfc8448_resumed_server_nonce, rfc8448_resumed_server_verify, rfc8448_resumed_serverhello, rfc8448_resumed_x25519_partner, rfc8448_resumed_x25519_private, tls_kdf_secret::secret, tls_traffic_secret::secret, sha256_algorithm, exchange_algorithm::sharedsize, tls_application, TLS_CLIENT, tls_early, tls_handshake, TLS_SERVER, tlskey_apply(), tlskey_bind(), tlskey_cipher(), tlskey_digest(), tlskey_hkdf, tlskey_load(), tlskey_master(), tlskey_start(), tlskey_stop(), tlskey_traffic(), tlskey_verify(), tls_key_schedule::traffic, and x25519_algorithm.

Referenced by tlskey_test_exec().

◆ dummy_hash()

void dummy_hash ( struct tls_key_schedule * tlskey,
struct tls_preshared_key * psk )
static

Perform dummy TLS version 1.2 test.

Parameters
tlskeyKey schedule
pskPre-shared key

Definition at line 1094 of file tlskey_test.c.

1095 {
1096 struct digest_algorithm *digest = &sha256_algorithm;
1097 size_t digestsize = digest->digestsize;
1098 const int extended = 1;
1099 uint8_t tbshash[digestsize];
1100 uint8_t verify[12];
1101 uint8_t key[16];
1102 uint8_t iv[4];
1103 uint8_t mac[32];
1104
1105 /* Start key schedule */
1106 ok ( tlskey_start ( tlskey, &tlskey_hash, digest,
1107 &dummy_client_nonce ) == 0 );
1108
1109 /* ClientHello */
1111 sizeof ( dummy_clienthello ) );
1112
1113 /* ServerHello */
1115 sizeof ( dummy_serverhello ) );
1116
1117 /* Pre-master secret */
1118 ok ( tlskey_apply ( tlskey, dummy_premaster,
1119 sizeof ( dummy_premaster ) ) == 0 );
1120
1121 /* Master secret */
1122 ok ( tlskey_master ( tlskey, extended ) == 0 );
1124 sizeof ( dummy_hash_master_secret ) ) == 0 );
1125
1126 /* Client verification */
1127 ok ( tlskey_verify ( tlskey, &tls_client, verify,
1128 sizeof ( verify ) ) == 0 );
1130 sizeof ( verify ) ) == 0 );
1131
1132 /* Server verification */
1133 ok ( tlskey_verify ( tlskey, &tls_server, verify,
1134 sizeof ( verify ) ) == 0 );
1136 sizeof ( verify ) ) == 0 );
1137
1138 /* Client traffic keys */
1139 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_application ) == 0 );
1140 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
1141 iv, sizeof ( iv ), mac, sizeof ( mac ) ) == 0 );
1143 key, sizeof ( key ) ) == 0 );
1145 iv, sizeof ( iv ) ) == 0 );
1147 mac, sizeof ( mac ) ) == 0 );
1148
1149 /* Server traffic keys */
1150 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_application ) == 0 );
1151 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
1152 iv, sizeof ( iv ), mac, sizeof ( mac ) ) == 0 );
1154 key, sizeof ( key ) ) == 0 );
1156 iv, sizeof ( iv ) ) == 0 );
1158 mac, sizeof ( mac ) ) == 0 );
1159
1160 /* Client signable digest */
1161 ok ( tlskey_tbshash ( tlskey, &tls_client, digest, NULL, 0,
1162 tbshash ) == 0 );
1164 tbshash, sizeof ( tbshash ) ) == 0 );
1165
1166 /* Server signable digest */
1167 ok ( tlskey_tbshash ( tlskey, &tls_server, digest, dummy_dh_param,
1168 sizeof ( dummy_dh_param ), tbshash ) == 0 );
1170 tbshash, sizeof ( tbshash ) ) == 0 );
1171
1172 /* Save resumption secret */
1173 ok ( tlskey_save ( tlskey, NULL, 0, psk ) == 0 );
1174
1175 /* Stop key schedule */
1176 tlskey_stop ( tlskey );
1177
1178 /* Start key schedule */
1179 ok ( tlskey_start ( tlskey, &tlskey_hash, digest,
1180 &dummy_client_nonce ) == 0 );
1181
1182 /* ClientHello */
1184 sizeof ( dummy_clienthello ) );
1185
1186 /* ServerHello */
1188 sizeof ( dummy_serverhello ) );
1189
1190 /* Load resumption secret */
1192 sizeof ( dummy_hash_master_secret ) ) != 0 );
1193 ok ( tlskey_load ( tlskey, extended, psk ) == 0 );
1195 sizeof ( dummy_hash_master_secret ) ) == 0 );
1196
1197 /* Stop key schedule */
1198 tlskey_stop ( tlskey );
1199}
uint8_t mac[ETH_ALEN]
MAC address.
Definition ena.h:13
const struct tls_key_schedule_operations tlskey_hash
TLS key schedule based on P_Hash().
Definition tlskey.c:1819
static const uint8_t dummy_dh_param[]
Dummy minimal tests: ServerKeyExchange DH parameters.
static const uint8_t dummy_hash_master_secret[]
Dummy minimal TLSv1.2 test: master secret.
static const uint8_t dummy_serverhello[]
Dummy minimal tests: ServerHello.
static const struct tls_random dummy_client_nonce
Dummy minimal tests: client random bytes.
static const uint8_t dummy_hash_client_traffic_iv[]
Dummy minimal TLSv1.2 test: client traffic IV.
static const uint8_t dummy_hash_server_traffic_mac[]
Dummy minimal TLSv1.2 test: server traffic MAC.
static const uint8_t dummy_hash_client_tbshash[]
Dummy minimal TLSv1.2 test: client signable digest.
static const uint8_t dummy_hash_client_verify[]
Dummy minimal TLSv1.2 test: client verification.
static const uint8_t dummy_hash_server_tbshash[]
Dummy minimal TLSv1.2 test: server signable digest.
static const uint8_t dummy_hash_server_traffic_iv[]
Dummy minimal TLSv1.2 test: server traffic IV.
static const uint8_t dummy_clienthello[]
Dummy minimal tests: ClientHello.
static const uint8_t dummy_premaster[]
Dummy minimal tests: pre-master secret.
static const uint8_t dummy_hash_server_traffic_key[]
Dummy minimal TLSv1.2 test: server traffic key.
static const uint8_t dummy_hash_client_traffic_mac[]
Dummy minimal TLSv1.2 test: client traffic MAC.
static const uint8_t dummy_hash_server_verify[]
Dummy minimal TLSv1.2 test: server verification.
static const uint8_t dummy_hash_client_traffic_key[]
Dummy minimal TLSv1.2 test: client traffic key.

References digest_algorithm::digestsize, digestsize, dummy_client_nonce, dummy_clienthello, dummy_dh_param, dummy_hash_client_tbshash, dummy_hash_client_traffic_iv, dummy_hash_client_traffic_key, dummy_hash_client_traffic_mac, dummy_hash_client_verify, dummy_hash_master_secret, dummy_hash_server_tbshash, dummy_hash_server_traffic_iv, dummy_hash_server_traffic_key, dummy_hash_server_traffic_mac, dummy_hash_server_verify, dummy_premaster, dummy_serverhello, iv, tls_key_schedule::kdf, key, mac, memcmp(), NULL, ok, tls_kdf_secret::secret, sha256_algorithm, tls_application, tlskey_apply(), tlskey_cipher(), tlskey_digest(), tlskey_hash, tlskey_load(), tlskey_master(), tlskey_save(), tlskey_start(), tlskey_stop(), tlskey_tbshash(), tlskey_traffic(), and tlskey_verify().

Referenced by tlskey_test_exec().

◆ dummy_md5_sha1()

void dummy_md5_sha1 ( struct tls_key_schedule * tlskey,
struct tls_preshared_key * psk )
static

Perform dummy TLS version 1.0 test.

Parameters
tlskeyKey schedule
pskPre-shared key

Definition at line 1207 of file tlskey_test.c.

1208 {
1209 struct digest_algorithm *digest = &md5_sha1_algorithm;
1210 const struct md5_sha1_hmac_keys *hkeys;
1211 const int extended = 0;
1212 uint8_t verify[12];
1213 uint8_t key[16];
1214 uint8_t iv[4];
1215 uint8_t mac[32];
1216
1217 /* Start key schedule */
1218 ok ( tlskey_start ( tlskey, &tlskey_md5_sha1, digest,
1219 &dummy_client_nonce ) == 0 );
1220 hkeys = tlskey->kdf.secret;
1221
1222 /* ClientHello */
1224 sizeof ( dummy_clienthello ) );
1225
1226 /* ServerHello */
1228 sizeof ( dummy_serverhello ) );
1229
1230 /* Pre-master secret */
1231 ok ( tlskey_apply ( tlskey, dummy_premaster,
1232 sizeof ( dummy_premaster ) ) == 0 );
1233
1234 /* Master secret */
1235 ok ( tlskey_master ( tlskey, extended ) == 0 );
1237 sizeof ( dummy_md5_sha1_master_secret_md5 ) ) == 0 );
1239 sizeof ( dummy_md5_sha1_master_secret_sha1 ) ) == 0 );
1240
1241 /* Client verification */
1242 ok ( tlskey_verify ( tlskey, &tls_client, verify,
1243 sizeof ( verify ) ) == 0 );
1245 sizeof ( verify ) ) == 0 );
1246
1247 /* Server verification */
1248 ok ( tlskey_verify ( tlskey, &tls_server, verify,
1249 sizeof ( verify ) ) == 0 );
1251 sizeof ( verify ) ) == 0 );
1252
1253 /* Client traffic keys */
1254 ok ( tlskey_traffic ( tlskey, &tls_client, &tls_application ) == 0 );
1255 ok ( tlskey_cipher ( tlskey, &tls_client, key, sizeof ( key ),
1256 iv, sizeof ( iv ), mac, sizeof ( mac ) ) == 0 );
1258 key, sizeof ( key ) ) == 0 );
1260 iv, sizeof ( iv ) ) == 0 );
1262 mac, sizeof ( mac ) ) == 0 );
1263
1264 /* Server traffic keys */
1265 ok ( tlskey_traffic ( tlskey, &tls_server, &tls_application ) == 0 );
1266 ok ( tlskey_cipher ( tlskey, &tls_server, key, sizeof ( key ),
1267 iv, sizeof ( iv ), mac, sizeof ( mac ) ) == 0 );
1269 key, sizeof ( key ) ) == 0 );
1271 iv, sizeof ( iv ) ) == 0 );
1273 mac, sizeof ( mac ) ) == 0 );
1274
1275 /* Save resumption secret */
1276 ok ( tlskey_save ( tlskey, NULL, 0, psk ) == 0 );
1277
1278 /* Stop key schedule */
1279 tlskey_stop ( tlskey );
1280
1281 /* Start key schedule */
1282 ok ( tlskey_start ( tlskey, &tlskey_md5_sha1, digest,
1283 &dummy_client_nonce ) == 0 );
1284 hkeys = tlskey->kdf.secret;
1285
1286 /* ClientHello */
1288 sizeof ( dummy_clienthello ) );
1289
1290 /* ServerHello */
1292 sizeof ( dummy_serverhello ) );
1293
1294 /* Load resumption secret */
1296 sizeof ( dummy_md5_sha1_master_secret_md5 ) ) != 0 );
1298 sizeof ( dummy_md5_sha1_master_secret_sha1 ) ) != 0 );
1299 ok ( tlskey_load ( tlskey, extended, psk ) == 0 );
1301 sizeof ( dummy_md5_sha1_master_secret_md5 ) ) == 0 );
1303 sizeof ( dummy_md5_sha1_master_secret_sha1 ) ) == 0 );
1304
1305 /* Stop key schedule */
1306 tlskey_stop ( tlskey );
1307}
struct digest_algorithm md5_sha1_algorithm
Hybrid MD5+SHA1 digest algorithm.
Definition md5_sha1.c:84
An MD5+SHA1 HMAC key block.
Definition md5_sha1.h:57
uint8_t md5[MD5_BLOCK_SIZE]
MD5 HMAC key.
Definition md5_sha1.h:59
uint8_t sha1[SHA1_BLOCK_SIZE]
SHA-1 HMAC key.
Definition md5_sha1.h:61
const struct tls_key_schedule_operations tlskey_md5_sha1
TLS key schedule based on P_MD5()+P_SHA1().
Definition tlskey.c:1993
static const uint8_t dummy_md5_sha1_master_secret_md5[]
Dummy minimal TLSv1.0 test: master secret (MD5 portion).
static const uint8_t dummy_md5_sha1_server_traffic_iv[]
Dummy minimal TLSv1.0 test: server traffic IV.
static const uint8_t dummy_md5_sha1_master_secret_sha1[]
Dummy minimal TLSv1.0 test: master secret (SHA-1 portion).
static const uint8_t dummy_md5_sha1_client_traffic_mac[]
Dummy minimal TLSv1.0 test: client traffic MAC.
static const uint8_t dummy_md5_sha1_client_traffic_key[]
Dummy minimal TLSv1.0 test: client traffic key.
static const uint8_t dummy_md5_sha1_server_traffic_key[]
Dummy minimal TLSv1.0 test: server traffic key.
static const uint8_t dummy_md5_sha1_server_traffic_mac[]
Dummy minimal TLSv1.0 test: server traffic MAC.
static const uint8_t dummy_md5_sha1_server_verify[]
Dummy minimal TLSv1.0 test: server verification.
static const uint8_t dummy_md5_sha1_client_traffic_iv[]
Dummy minimal TLSv1.0 test: client traffic IV.
static const uint8_t dummy_md5_sha1_client_verify[]
Dummy minimal TLSv1.0 test: client verification.

References dummy_client_nonce, dummy_clienthello, dummy_md5_sha1_client_traffic_iv, dummy_md5_sha1_client_traffic_key, dummy_md5_sha1_client_traffic_mac, dummy_md5_sha1_client_verify, dummy_md5_sha1_master_secret_md5, dummy_md5_sha1_master_secret_sha1, dummy_md5_sha1_server_traffic_iv, dummy_md5_sha1_server_traffic_key, dummy_md5_sha1_server_traffic_mac, dummy_md5_sha1_server_verify, dummy_premaster, dummy_serverhello, iv, tls_key_schedule::kdf, key, mac, md5_sha1_hmac_keys::md5, md5_sha1_algorithm, memcmp(), NULL, ok, tls_kdf_secret::secret, md5_sha1_hmac_keys::sha1, tls_application, tlskey_apply(), tlskey_cipher(), tlskey_digest(), tlskey_load(), tlskey_master(), tlskey_md5_sha1, tlskey_save(), tlskey_start(), tlskey_stop(), tlskey_traffic(), and tlskey_verify().

Referenced by tlskey_test_exec().

◆ tlskey_test_exec()

void tlskey_test_exec ( void )
static

Perform TLS key schedule self-test.

Definition at line 1313 of file tlskey_test.c.

1313 {
1314 struct tls_key_schedule tlskey;
1315 struct tls_preshared_key psk;
1316
1317 /* Initialise data structures */
1318 memset ( &tlskey, 0, sizeof ( tlskey ) );
1319 memset ( &psk, 0, sizeof ( psk ) );
1320
1321 /* RFC 8448 simple 1-RTT test */
1322 rfc8448_simple_test ( &tlskey, &psk );
1323
1324 /* RFC 8448 resumed 0-RTT test */
1325 rfc8448_resumed_test ( &tlskey, &psk );
1326
1327 /* Dummy TLS version 1.2 test */
1328 dummy_hash ( &tlskey, &psk );
1329
1330 /* Dummy TLS version 1.0 test */
1331 dummy_md5_sha1 ( &tlskey, &psk );
1332}
void * memset(void *dest, int character, size_t len) __nonnull
A TLS key schedule.
Definition tlskey.h:100
A TLS pre-shared key.
Definition tlskey.h:128
static void rfc8448_resumed_test(struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
Perform RFC 8448 resumed 0-RTT test.
static void rfc8448_simple_test(struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
Perform RFC 8448 simple 1-RTT test.
static void dummy_md5_sha1(struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
Perform dummy TLS version 1.0 test.
static void dummy_hash(struct tls_key_schedule *tlskey, struct tls_preshared_key *psk)
Perform dummy TLS version 1.2 test.

References dummy_hash(), dummy_md5_sha1(), memset(), rfc8448_resumed_test(), and rfc8448_simple_test().

Variable Documentation

◆ rfc8448_simple_client_nonce

const struct tls_random rfc8448_simple_client_nonce
static
Initial value:
= {
.bytes = {
0xcb, 0x34, 0xec, 0xb1, 0xe7, 0x81, 0x63, 0xba, 0x1c, 0x38,
0xc6, 0xda, 0xcb, 0x19, 0x6a, 0x6d, 0xff, 0xa2, 0x1a, 0x8d,
0x99, 0x12, 0xec, 0x18, 0xa2, 0xef, 0x62, 0x83, 0x02, 0x4d,
0xec, 0xe7
},
}

RFC 8448 simple 1-RTT test: client random bytes.

Definition at line 54 of file tlskey_test.c.

54 {
55 .bytes = {
56 0xcb, 0x34, 0xec, 0xb1, 0xe7, 0x81, 0x63, 0xba, 0x1c, 0x38,
57 0xc6, 0xda, 0xcb, 0x19, 0x6a, 0x6d, 0xff, 0xa2, 0x1a, 0x8d,
58 0x99, 0x12, 0xec, 0x18, 0xa2, 0xef, 0x62, 0x83, 0x02, 0x4d,
59 0xec, 0xe7
60 },
61};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_x25519_private

const uint8_t rfc8448_simple_x25519_private[]
static
Initial value:
= {
0x49, 0xaf, 0x42, 0xba, 0x7f, 0x79, 0x94, 0x85, 0x2d, 0x71, 0x3e,
0xf2, 0x78, 0x4b, 0xcb, 0xca, 0xa7, 0x91, 0x1d, 0xe2, 0x6a, 0xdc,
0x56, 0x42, 0xcb, 0x63, 0x45, 0x40, 0xe7, 0xea, 0x50, 0x05
}

RFC 8448 simple 1-RTT test: client X25519 private key.

Definition at line 64 of file tlskey_test.c.

64 {
65 0x49, 0xaf, 0x42, 0xba, 0x7f, 0x79, 0x94, 0x85, 0x2d, 0x71, 0x3e,
66 0xf2, 0x78, 0x4b, 0xcb, 0xca, 0xa7, 0x91, 0x1d, 0xe2, 0x6a, 0xdc,
67 0x56, 0x42, 0xcb, 0x63, 0x45, 0x40, 0xe7, 0xea, 0x50, 0x05
68};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_x25519_partner

const uint8_t rfc8448_simple_x25519_partner[]
static
Initial value:
= {
0xc9, 0x82, 0x88, 0x76, 0x11, 0x20, 0x95, 0xfe, 0x66, 0x76, 0x2b,
0xdb, 0xf7, 0xc6, 0x72, 0xe1, 0x56, 0xd6, 0xcc, 0x25, 0x3b, 0x83,
0x3d, 0xf1, 0xdd, 0x69, 0xb1, 0xb0, 0x4e, 0x75, 0x1f, 0x0f
}

RFC 8448 simple 1-RTT test: server X25519 public key.

Definition at line 71 of file tlskey_test.c.

71 {
72 0xc9, 0x82, 0x88, 0x76, 0x11, 0x20, 0x95, 0xfe, 0x66, 0x76, 0x2b,
73 0xdb, 0xf7, 0xc6, 0x72, 0xe1, 0x56, 0xd6, 0xcc, 0x25, 0x3b, 0x83,
74 0x3d, 0xf1, 0xdd, 0x69, 0xb1, 0xb0, 0x4e, 0x75, 0x1f, 0x0f
75};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_ticket_nonce

const uint8_t rfc8448_simple_ticket_nonce[] = { 0x00, 0x00 }
static

RFC 8448 simple 1-RTT test: ticket nonce.

Definition at line 78 of file tlskey_test.c.

78{ 0x00, 0x00 };

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_clienthello

const uint8_t rfc8448_simple_clienthello[]
static
Initial value:
= {
0x01, 0x00, 0x00, 0xc0, 0x03, 0x03, 0xcb, 0x34, 0xec, 0xb1, 0xe7,
0x81, 0x63, 0xba, 0x1c, 0x38, 0xc6, 0xda, 0xcb, 0x19, 0x6a, 0x6d,
0xff, 0xa2, 0x1a, 0x8d, 0x99, 0x12, 0xec, 0x18, 0xa2, 0xef, 0x62,
0x83, 0x02, 0x4d, 0xec, 0xe7, 0x00, 0x00, 0x06, 0x13, 0x01, 0x13,
0x03, 0x13, 0x02, 0x01, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x0b,
0x00, 0x09, 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0xff, 0x01, 0x00, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x12,
0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00, 0x01,
0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x23, 0x00, 0x00,
0x00, 0x33, 0x00, 0x26, 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0x99,
0x38, 0x1d, 0xe5, 0x60, 0xe4, 0xbd, 0x43, 0xd2, 0x3d, 0x8e, 0x43,
0x5a, 0x7d, 0xba, 0xfe, 0xb3, 0xc0, 0x6e, 0x51, 0xc1, 0x3c, 0xae,
0x4d, 0x54, 0x13, 0x69, 0x1e, 0x52, 0x9a, 0xaf, 0x2c, 0x00, 0x2b,
0x00, 0x03, 0x02, 0x03, 0x04, 0x00, 0x0d, 0x00, 0x20, 0x00, 0x1e,
0x04, 0x03, 0x05, 0x03, 0x06, 0x03, 0x02, 0x03, 0x08, 0x04, 0x08,
0x05, 0x08, 0x06, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x02, 0x01,
0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x02, 0x02, 0x00, 0x2d, 0x00,
0x02, 0x01, 0x01, 0x00, 0x1c, 0x00, 0x02, 0x40, 0x01
}

RFC 8448 simple 1-RTT test: ClientHello.

Definition at line 81 of file tlskey_test.c.

81 {
82 0x01, 0x00, 0x00, 0xc0, 0x03, 0x03, 0xcb, 0x34, 0xec, 0xb1, 0xe7,
83 0x81, 0x63, 0xba, 0x1c, 0x38, 0xc6, 0xda, 0xcb, 0x19, 0x6a, 0x6d,
84 0xff, 0xa2, 0x1a, 0x8d, 0x99, 0x12, 0xec, 0x18, 0xa2, 0xef, 0x62,
85 0x83, 0x02, 0x4d, 0xec, 0xe7, 0x00, 0x00, 0x06, 0x13, 0x01, 0x13,
86 0x03, 0x13, 0x02, 0x01, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x0b,
87 0x00, 0x09, 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
88 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x12,
89 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00, 0x01,
90 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x23, 0x00, 0x00,
91 0x00, 0x33, 0x00, 0x26, 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0x99,
92 0x38, 0x1d, 0xe5, 0x60, 0xe4, 0xbd, 0x43, 0xd2, 0x3d, 0x8e, 0x43,
93 0x5a, 0x7d, 0xba, 0xfe, 0xb3, 0xc0, 0x6e, 0x51, 0xc1, 0x3c, 0xae,
94 0x4d, 0x54, 0x13, 0x69, 0x1e, 0x52, 0x9a, 0xaf, 0x2c, 0x00, 0x2b,
95 0x00, 0x03, 0x02, 0x03, 0x04, 0x00, 0x0d, 0x00, 0x20, 0x00, 0x1e,
96 0x04, 0x03, 0x05, 0x03, 0x06, 0x03, 0x02, 0x03, 0x08, 0x04, 0x08,
97 0x05, 0x08, 0x06, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x02, 0x01,
98 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x02, 0x02, 0x00, 0x2d, 0x00,
99 0x02, 0x01, 0x01, 0x00, 0x1c, 0x00, 0x02, 0x40, 0x01
100};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_serverhello

const uint8_t rfc8448_simple_serverhello[]
static
Initial value:
= {
0x02, 0x00, 0x00, 0x56, 0x03, 0x03, 0xa6, 0xaf, 0x06, 0xa4, 0x12,
0x18, 0x60, 0xdc, 0x5e, 0x6e, 0x60, 0x24, 0x9c, 0xd3, 0x4c, 0x95,
0x93, 0x0c, 0x8a, 0xc5, 0xcb, 0x14, 0x34, 0xda, 0xc1, 0x55, 0x77,
0x2e, 0xd3, 0xe2, 0x69, 0x28, 0x00, 0x13, 0x01, 0x00, 0x00, 0x2e,
0x00, 0x33, 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0xc9, 0x82, 0x88,
0x76, 0x11, 0x20, 0x95, 0xfe, 0x66, 0x76, 0x2b, 0xdb, 0xf7, 0xc6,
0x72, 0xe1, 0x56, 0xd6, 0xcc, 0x25, 0x3b, 0x83, 0x3d, 0xf1, 0xdd,
0x69, 0xb1, 0xb0, 0x4e, 0x75, 0x1f, 0x0f, 0x00, 0x2b, 0x00, 0x02,
0x03, 0x04
}

RFC 8448 simple 1-RTT test: ServerHello.

Definition at line 103 of file tlskey_test.c.

103 {
104 0x02, 0x00, 0x00, 0x56, 0x03, 0x03, 0xa6, 0xaf, 0x06, 0xa4, 0x12,
105 0x18, 0x60, 0xdc, 0x5e, 0x6e, 0x60, 0x24, 0x9c, 0xd3, 0x4c, 0x95,
106 0x93, 0x0c, 0x8a, 0xc5, 0xcb, 0x14, 0x34, 0xda, 0xc1, 0x55, 0x77,
107 0x2e, 0xd3, 0xe2, 0x69, 0x28, 0x00, 0x13, 0x01, 0x00, 0x00, 0x2e,
108 0x00, 0x33, 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0xc9, 0x82, 0x88,
109 0x76, 0x11, 0x20, 0x95, 0xfe, 0x66, 0x76, 0x2b, 0xdb, 0xf7, 0xc6,
110 0x72, 0xe1, 0x56, 0xd6, 0xcc, 0x25, 0x3b, 0x83, 0x3d, 0xf1, 0xdd,
111 0x69, 0xb1, 0xb0, 0x4e, 0x75, 0x1f, 0x0f, 0x00, 0x2b, 0x00, 0x02,
112 0x03, 0x04
113};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_encryptedextensions

const uint8_t rfc8448_simple_encryptedextensions[]
static
Initial value:
= {
0x08, 0x00, 0x00, 0x24, 0x00, 0x22, 0x00, 0x0a, 0x00, 0x14, 0x00,
0x12, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00,
0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x1c, 0x00,
0x02, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00
}

RFC 8448 simple 1-RTT test: EncryptedExtensions.

Definition at line 116 of file tlskey_test.c.

116 {
117 0x08, 0x00, 0x00, 0x24, 0x00, 0x22, 0x00, 0x0a, 0x00, 0x14, 0x00,
118 0x12, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00,
119 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x1c, 0x00,
120 0x02, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00
121};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_certificate

const uint8_t rfc8448_simple_certificate[]
static

RFC 8448 simple 1-RTT test: Certificate.

Definition at line 124 of file tlskey_test.c.

124 {
125 0x0b, 0x00, 0x01, 0xb9, 0x00, 0x00, 0x01, 0xb5, 0x00, 0x01, 0xb0,
126 0x30, 0x82, 0x01, 0xac, 0x30, 0x82, 0x01, 0x15, 0xa0, 0x03, 0x02,
127 0x01, 0x02, 0x02, 0x01, 0x02, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
128 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x0e,
129 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x03,
130 0x72, 0x73, 0x61, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x36, 0x30, 0x37,
131 0x33, 0x30, 0x30, 0x31, 0x32, 0x33, 0x35, 0x39, 0x5a, 0x17, 0x0d,
132 0x32, 0x36, 0x30, 0x37, 0x33, 0x30, 0x30, 0x31, 0x32, 0x33, 0x35,
133 0x39, 0x5a, 0x30, 0x0e, 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55,
134 0x04, 0x03, 0x13, 0x03, 0x72, 0x73, 0x61, 0x30, 0x81, 0x9f, 0x30,
135 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
136 0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02,
137 0x81, 0x81, 0x00, 0xb4, 0xbb, 0x49, 0x8f, 0x82, 0x79, 0x30, 0x3d,
138 0x98, 0x08, 0x36, 0x39, 0x9b, 0x36, 0xc6, 0x98, 0x8c, 0x0c, 0x68,
139 0xde, 0x55, 0xe1, 0xbd, 0xb8, 0x26, 0xd3, 0x90, 0x1a, 0x24, 0x61,
140 0xea, 0xfd, 0x2d, 0xe4, 0x9a, 0x91, 0xd0, 0x15, 0xab, 0xbc, 0x9a,
141 0x95, 0x13, 0x7a, 0xce, 0x6c, 0x1a, 0xf1, 0x9e, 0xaa, 0x6a, 0xf9,
142 0x8c, 0x7c, 0xed, 0x43, 0x12, 0x09, 0x98, 0xe1, 0x87, 0xa8, 0x0e,
143 0xe0, 0xcc, 0xb0, 0x52, 0x4b, 0x1b, 0x01, 0x8c, 0x3e, 0x0b, 0x63,
144 0x26, 0x4d, 0x44, 0x9a, 0x6d, 0x38, 0xe2, 0x2a, 0x5f, 0xda, 0x43,
145 0x08, 0x46, 0x74, 0x80, 0x30, 0x53, 0x0e, 0xf0, 0x46, 0x1c, 0x8c,
146 0xa9, 0xd9, 0xef, 0xbf, 0xae, 0x8e, 0xa6, 0xd1, 0xd0, 0x3e, 0x2b,
147 0xd1, 0x93, 0xef, 0xf0, 0xab, 0x9a, 0x80, 0x02, 0xc4, 0x74, 0x28,
148 0xa6, 0xd3, 0x5a, 0x8d, 0x88, 0xd7, 0x9f, 0x7f, 0x1e, 0x3f, 0x02,
149 0x03, 0x01, 0x00, 0x01, 0xa3, 0x1a, 0x30, 0x18, 0x30, 0x09, 0x06,
150 0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06,
151 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30,
152 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
153 0x0b, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x85, 0xaa, 0xd2, 0xa0,
154 0xe5, 0xb9, 0x27, 0x6b, 0x90, 0x8c, 0x65, 0xf7, 0x3a, 0x72, 0x67,
155 0x17, 0x06, 0x18, 0xa5, 0x4c, 0x5f, 0x8a, 0x7b, 0x33, 0x7d, 0x2d,
156 0xf7, 0xa5, 0x94, 0x36, 0x54, 0x17, 0xf2, 0xea, 0xe8, 0xf8, 0xa5,
157 0x8c, 0x8f, 0x81, 0x72, 0xf9, 0x31, 0x9c, 0xf3, 0x6b, 0x7f, 0xd6,
158 0xc5, 0x5b, 0x80, 0xf2, 0x1a, 0x03, 0x01, 0x51, 0x56, 0x72, 0x60,
159 0x96, 0xfd, 0x33, 0x5e, 0x5e, 0x67, 0xf2, 0xdb, 0xf1, 0x02, 0x70,
160 0x2e, 0x60, 0x8c, 0xca, 0xe6, 0xbe, 0xc1, 0xfc, 0x63, 0xa4, 0x2a,
161 0x99, 0xbe, 0x5c, 0x3e, 0xb7, 0x10, 0x7c, 0x3c, 0x54, 0xe9, 0xb9,
162 0xeb, 0x2b, 0xd5, 0x20, 0x3b, 0x1c, 0x3b, 0x84, 0xe0, 0xa8, 0xb2,
163 0xf7, 0x59, 0x40, 0x9b, 0xa3, 0xea, 0xc9, 0xd9, 0x1d, 0x40, 0x2d,
164 0xcc, 0x0c, 0xc8, 0xf8, 0x96, 0x12, 0x29, 0xac, 0x91, 0x87, 0xb4,
165 0x2b, 0x4d, 0xe1, 0x00, 0x00
166};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_certificateverify

const uint8_t rfc8448_simple_certificateverify[]
static
Initial value:
= {
0x0f, 0x00, 0x00, 0x84, 0x08, 0x04, 0x00, 0x80, 0x5a, 0x74, 0x7c,
0x5d, 0x88, 0xfa, 0x9b, 0xd2, 0xe5, 0x5a, 0xb0, 0x85, 0xa6, 0x10,
0x15, 0xb7, 0x21, 0x1f, 0x82, 0x4c, 0xd4, 0x84, 0x14, 0x5a, 0xb3,
0xff, 0x52, 0xf1, 0xfd, 0xa8, 0x47, 0x7b, 0x0b, 0x7a, 0xbc, 0x90,
0xdb, 0x78, 0xe2, 0xd3, 0x3a, 0x5c, 0x14, 0x1a, 0x07, 0x86, 0x53,
0xfa, 0x6b, 0xef, 0x78, 0x0c, 0x5e, 0xa2, 0x48, 0xee, 0xaa, 0xa7,
0x85, 0xc4, 0xf3, 0x94, 0xca, 0xb6, 0xd3, 0x0b, 0xbe, 0x8d, 0x48,
0x59, 0xee, 0x51, 0x1f, 0x60, 0x29, 0x57, 0xb1, 0x54, 0x11, 0xac,
0x02, 0x76, 0x71, 0x45, 0x9e, 0x46, 0x44, 0x5c, 0x9e, 0xa5, 0x8c,
0x18, 0x1e, 0x81, 0x8e, 0x95, 0xb8, 0xc3, 0xfb, 0x0b, 0xf3, 0x27,
0x84, 0x09, 0xd3, 0xbe, 0x15, 0x2a, 0x3d, 0xa5, 0x04, 0x3e, 0x06,
0x3d, 0xda, 0x65, 0xcd, 0xf5, 0xae, 0xa2, 0x0d, 0x53, 0xdf, 0xac,
0xd4, 0x2f, 0x74, 0xf3
}

RFC 8448 simple 1-RTT test: CertificateVerify.

Definition at line 169 of file tlskey_test.c.

169 {
170 0x0f, 0x00, 0x00, 0x84, 0x08, 0x04, 0x00, 0x80, 0x5a, 0x74, 0x7c,
171 0x5d, 0x88, 0xfa, 0x9b, 0xd2, 0xe5, 0x5a, 0xb0, 0x85, 0xa6, 0x10,
172 0x15, 0xb7, 0x21, 0x1f, 0x82, 0x4c, 0xd4, 0x84, 0x14, 0x5a, 0xb3,
173 0xff, 0x52, 0xf1, 0xfd, 0xa8, 0x47, 0x7b, 0x0b, 0x7a, 0xbc, 0x90,
174 0xdb, 0x78, 0xe2, 0xd3, 0x3a, 0x5c, 0x14, 0x1a, 0x07, 0x86, 0x53,
175 0xfa, 0x6b, 0xef, 0x78, 0x0c, 0x5e, 0xa2, 0x48, 0xee, 0xaa, 0xa7,
176 0x85, 0xc4, 0xf3, 0x94, 0xca, 0xb6, 0xd3, 0x0b, 0xbe, 0x8d, 0x48,
177 0x59, 0xee, 0x51, 0x1f, 0x60, 0x29, 0x57, 0xb1, 0x54, 0x11, 0xac,
178 0x02, 0x76, 0x71, 0x45, 0x9e, 0x46, 0x44, 0x5c, 0x9e, 0xa5, 0x8c,
179 0x18, 0x1e, 0x81, 0x8e, 0x95, 0xb8, 0xc3, 0xfb, 0x0b, 0xf3, 0x27,
180 0x84, 0x09, 0xd3, 0xbe, 0x15, 0x2a, 0x3d, 0xa5, 0x04, 0x3e, 0x06,
181 0x3d, 0xda, 0x65, 0xcd, 0xf5, 0xae, 0xa2, 0x0d, 0x53, 0xdf, 0xac,
182 0xd4, 0x2f, 0x74, 0xf3
183};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_finished

const uint8_t rfc8448_simple_server_finished[]
static
Initial value:
= {
0x14, 0x00, 0x00, 0x20, 0x9b, 0x9b, 0x14, 0x1d, 0x90, 0x63, 0x37,
0xfb, 0xd2, 0xcb, 0xdc, 0xe7, 0x1d, 0xf4, 0xde, 0xda, 0x4a, 0xb4,
0x2c, 0x30, 0x95, 0x72, 0xcb, 0x7f, 0xff, 0xee, 0x54, 0x54, 0xb7,
0x8f, 0x07, 0x18
}

RFC 8448 simple 1-RTT test: server Finished.

Definition at line 186 of file tlskey_test.c.

186 {
187 0x14, 0x00, 0x00, 0x20, 0x9b, 0x9b, 0x14, 0x1d, 0x90, 0x63, 0x37,
188 0xfb, 0xd2, 0xcb, 0xdc, 0xe7, 0x1d, 0xf4, 0xde, 0xda, 0x4a, 0xb4,
189 0x2c, 0x30, 0x95, 0x72, 0xcb, 0x7f, 0xff, 0xee, 0x54, 0x54, 0xb7,
190 0x8f, 0x07, 0x18
191};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_finished

const uint8_t rfc8448_simple_client_finished[]
static
Initial value:
= {
0x14, 0x00, 0x00, 0x20, 0xa8, 0xec, 0x43, 0x6d, 0x67, 0x76, 0x34,
0xae, 0x52, 0x5a, 0xc1, 0xfc, 0xeb, 0xe1, 0x1a, 0x03, 0x9e, 0xc1,
0x76, 0x94, 0xfa, 0xc6, 0xe9, 0x85, 0x27, 0xb6, 0x42, 0xf2, 0xed,
0xd5, 0xce, 0x61
}

RFC 8448 simple 1-RTT test: client Finished.

Definition at line 194 of file tlskey_test.c.

194 {
195 0x14, 0x00, 0x00, 0x20, 0xa8, 0xec, 0x43, 0x6d, 0x67, 0x76, 0x34,
196 0xae, 0x52, 0x5a, 0xc1, 0xfc, 0xeb, 0xe1, 0x1a, 0x03, 0x9e, 0xc1,
197 0x76, 0x94, 0xfa, 0xc6, 0xe9, 0x85, 0x27, 0xb6, 0x42, 0xf2, 0xed,
198 0xd5, 0xce, 0x61
199};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_newsessionticket

const uint8_t rfc8448_simple_newsessionticket[]
static
Initial value:
= {
0x04, 0x00, 0x00, 0xc9, 0x00, 0x00, 0x00, 0x1e, 0xfa, 0xd6, 0xaa,
0xc5, 0x02, 0x00, 0x00, 0x00, 0xb2, 0x2c, 0x03, 0x5d, 0x82, 0x93,
0x59, 0xee, 0x5f, 0xf7, 0xaf, 0x4e, 0xc9, 0x00, 0x00, 0x00, 0x00,
0x26, 0x2a, 0x64, 0x94, 0xdc, 0x48, 0x6d, 0x2c, 0x8a, 0x34, 0xcb,
0x33, 0xfa, 0x90, 0xbf, 0x1b, 0x00, 0x70, 0xad, 0x3c, 0x49, 0x88,
0x83, 0xc9, 0x36, 0x7c, 0x09, 0xa2, 0xbe, 0x78, 0x5a, 0xbc, 0x55,
0xcd, 0x22, 0x60, 0x97, 0xa3, 0xa9, 0x82, 0x11, 0x72, 0x83, 0xf8,
0x2a, 0x03, 0xa1, 0x43, 0xef, 0xd3, 0xff, 0x5d, 0xd3, 0x6d, 0x64,
0xe8, 0x61, 0xbe, 0x7f, 0xd6, 0x1d, 0x28, 0x27, 0xdb, 0x27, 0x9c,
0xce, 0x14, 0x50, 0x77, 0xd4, 0x54, 0xa3, 0x66, 0x4d, 0x4e, 0x6d,
0xa4, 0xd2, 0x9e, 0xe0, 0x37, 0x25, 0xa6, 0xa4, 0xda, 0xfc, 0xd0,
0xfc, 0x67, 0xd2, 0xae, 0xa7, 0x05, 0x29, 0x51, 0x3e, 0x3d, 0xa2,
0x67, 0x7f, 0xa5, 0x90, 0x6c, 0x5b, 0x3f, 0x7d, 0x8f, 0x92, 0xf2,
0x28, 0xbd, 0xa4, 0x0d, 0xda, 0x72, 0x14, 0x70, 0xf9, 0xfb, 0xf2,
0x97, 0xb5, 0xae, 0xa6, 0x17, 0x64, 0x6f, 0xac, 0x5c, 0x03, 0x27,
0x2e, 0x97, 0x07, 0x27, 0xc6, 0x21, 0xa7, 0x91, 0x41, 0xef, 0x5f,
0x7d, 0xe6, 0x50, 0x5e, 0x5b, 0xfb, 0xc3, 0x88, 0xe9, 0x33, 0x43,
0x69, 0x40, 0x93, 0x93, 0x4a, 0xe4, 0xd3, 0x57, 0x00, 0x08, 0x00,
0x2a, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00
}

RFC 8448 simple 1-RTT test: NewSessionTicket.

Definition at line 202 of file tlskey_test.c.

202 {
203 0x04, 0x00, 0x00, 0xc9, 0x00, 0x00, 0x00, 0x1e, 0xfa, 0xd6, 0xaa,
204 0xc5, 0x02, 0x00, 0x00, 0x00, 0xb2, 0x2c, 0x03, 0x5d, 0x82, 0x93,
205 0x59, 0xee, 0x5f, 0xf7, 0xaf, 0x4e, 0xc9, 0x00, 0x00, 0x00, 0x00,
206 0x26, 0x2a, 0x64, 0x94, 0xdc, 0x48, 0x6d, 0x2c, 0x8a, 0x34, 0xcb,
207 0x33, 0xfa, 0x90, 0xbf, 0x1b, 0x00, 0x70, 0xad, 0x3c, 0x49, 0x88,
208 0x83, 0xc9, 0x36, 0x7c, 0x09, 0xa2, 0xbe, 0x78, 0x5a, 0xbc, 0x55,
209 0xcd, 0x22, 0x60, 0x97, 0xa3, 0xa9, 0x82, 0x11, 0x72, 0x83, 0xf8,
210 0x2a, 0x03, 0xa1, 0x43, 0xef, 0xd3, 0xff, 0x5d, 0xd3, 0x6d, 0x64,
211 0xe8, 0x61, 0xbe, 0x7f, 0xd6, 0x1d, 0x28, 0x27, 0xdb, 0x27, 0x9c,
212 0xce, 0x14, 0x50, 0x77, 0xd4, 0x54, 0xa3, 0x66, 0x4d, 0x4e, 0x6d,
213 0xa4, 0xd2, 0x9e, 0xe0, 0x37, 0x25, 0xa6, 0xa4, 0xda, 0xfc, 0xd0,
214 0xfc, 0x67, 0xd2, 0xae, 0xa7, 0x05, 0x29, 0x51, 0x3e, 0x3d, 0xa2,
215 0x67, 0x7f, 0xa5, 0x90, 0x6c, 0x5b, 0x3f, 0x7d, 0x8f, 0x92, 0xf2,
216 0x28, 0xbd, 0xa4, 0x0d, 0xda, 0x72, 0x14, 0x70, 0xf9, 0xfb, 0xf2,
217 0x97, 0xb5, 0xae, 0xa6, 0x17, 0x64, 0x6f, 0xac, 0x5c, 0x03, 0x27,
218 0x2e, 0x97, 0x07, 0x27, 0xc6, 0x21, 0xa7, 0x91, 0x41, 0xef, 0x5f,
219 0x7d, 0xe6, 0x50, 0x5e, 0x5b, 0xfb, 0xc3, 0x88, 0xe9, 0x33, 0x43,
220 0x69, 0x40, 0x93, 0x93, 0x4a, 0xe4, 0xd3, 0x57, 0x00, 0x08, 0x00,
221 0x2a, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00
222};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_early_secret

const uint8_t rfc8448_simple_early_secret[]
static
Initial value:
= {
0x33, 0xad, 0x0a, 0x1c, 0x60, 0x7e, 0xc0, 0x3b, 0x09, 0xe6, 0xcd,
0x98, 0x93, 0x68, 0x0c, 0xe2, 0x10, 0xad, 0xf3, 0x00, 0xaa, 0x1f,
0x26, 0x60, 0xe1, 0xb2, 0x2e, 0x10, 0xf1, 0x70, 0xf9, 0x2a
}

RFC 8448 simple 1-RTT test: early secret.

Definition at line 225 of file tlskey_test.c.

225 {
226 0x33, 0xad, 0x0a, 0x1c, 0x60, 0x7e, 0xc0, 0x3b, 0x09, 0xe6, 0xcd,
227 0x98, 0x93, 0x68, 0x0c, 0xe2, 0x10, 0xad, 0xf3, 0x00, 0xaa, 0x1f,
228 0x26, 0x60, 0xe1, 0xb2, 0x2e, 0x10, 0xf1, 0x70, 0xf9, 0x2a
229};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_handshake_secret

const uint8_t rfc8448_simple_handshake_secret[]
static
Initial value:
= {
0x1d, 0xc8, 0x26, 0xe9, 0x36, 0x06, 0xaa, 0x6f, 0xdc, 0x0a, 0xad,
0xc1, 0x2f, 0x74, 0x1b, 0x01, 0x04, 0x6a, 0xa6, 0xb9, 0x9f, 0x69,
0x1e, 0xd2, 0x21, 0xa9, 0xf0, 0xca, 0x04, 0x3f, 0xbe, 0xac
}

RFC 8448 simple 1-RTT test: handshake secret.

Definition at line 232 of file tlskey_test.c.

232 {
233 0x1d, 0xc8, 0x26, 0xe9, 0x36, 0x06, 0xaa, 0x6f, 0xdc, 0x0a, 0xad,
234 0xc1, 0x2f, 0x74, 0x1b, 0x01, 0x04, 0x6a, 0xa6, 0xb9, 0x9f, 0x69,
235 0x1e, 0xd2, 0x21, 0xa9, 0xf0, 0xca, 0x04, 0x3f, 0xbe, 0xac
236};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_handshake_traffic_secret

const uint8_t rfc8448_simple_client_handshake_traffic_secret[]
static
Initial value:
= {
0xb3, 0xed, 0xdb, 0x12, 0x6e, 0x06, 0x7f, 0x35, 0xa7, 0x80, 0xb3,
0xab, 0xf4, 0x5e, 0x2d, 0x8f, 0x3b, 0x1a, 0x95, 0x07, 0x38, 0xf5,
0x2e, 0x96, 0x00, 0x74, 0x6a, 0x0e, 0x27, 0xa5, 0x5a, 0x21
}

RFC 8448 simple 1-RTT test: client handshake traffic secret.

Definition at line 239 of file tlskey_test.c.

239 {
240 0xb3, 0xed, 0xdb, 0x12, 0x6e, 0x06, 0x7f, 0x35, 0xa7, 0x80, 0xb3,
241 0xab, 0xf4, 0x5e, 0x2d, 0x8f, 0x3b, 0x1a, 0x95, 0x07, 0x38, 0xf5,
242 0x2e, 0x96, 0x00, 0x74, 0x6a, 0x0e, 0x27, 0xa5, 0x5a, 0x21
243};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_handshake_traffic_key

const uint8_t rfc8448_simple_client_handshake_traffic_key[]
static
Initial value:
= {
0xdb, 0xfa, 0xa6, 0x93, 0xd1, 0x76, 0x2c, 0x5b, 0x66, 0x6a, 0xf5,
0xd9, 0x50, 0x25, 0x8d, 0x01
}

RFC 8448 simple 1-RTT test: client handshake traffic key.

Definition at line 246 of file tlskey_test.c.

246 {
247 0xdb, 0xfa, 0xa6, 0x93, 0xd1, 0x76, 0x2c, 0x5b, 0x66, 0x6a, 0xf5,
248 0xd9, 0x50, 0x25, 0x8d, 0x01
249};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_handshake_traffic_iv

const uint8_t rfc8448_simple_client_handshake_traffic_iv[]
static
Initial value:
= {
0x5b, 0xd3, 0xc7, 0x1b, 0x83, 0x6e, 0x0b, 0x76, 0xbb, 0x73, 0x26,
0x5f
}

RFC 8448 simple 1-RTT test: client handshake traffic IV.

Definition at line 252 of file tlskey_test.c.

252 {
253 0x5b, 0xd3, 0xc7, 0x1b, 0x83, 0x6e, 0x0b, 0x76, 0xbb, 0x73, 0x26,
254 0x5f
255};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_handshake_traffic_secret

const uint8_t rfc8448_simple_server_handshake_traffic_secret[]
static
Initial value:
= {
0xb6, 0x7b, 0x7d, 0x69, 0x0c, 0xc1, 0x6c, 0x4e, 0x75, 0xe5, 0x42,
0x13, 0xcb, 0x2d, 0x37, 0xb4, 0xe9, 0xc9, 0x12, 0xbc, 0xde, 0xd9,
0x10, 0x5d, 0x42, 0xbe, 0xfd, 0x59, 0xd3, 0x91, 0xad, 0x38
}

RFC 8448 simple 1-RTT test: server handshake traffic secret.

Definition at line 258 of file tlskey_test.c.

258 {
259 0xb6, 0x7b, 0x7d, 0x69, 0x0c, 0xc1, 0x6c, 0x4e, 0x75, 0xe5, 0x42,
260 0x13, 0xcb, 0x2d, 0x37, 0xb4, 0xe9, 0xc9, 0x12, 0xbc, 0xde, 0xd9,
261 0x10, 0x5d, 0x42, 0xbe, 0xfd, 0x59, 0xd3, 0x91, 0xad, 0x38
262};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_handshake_traffic_key

const uint8_t rfc8448_simple_server_handshake_traffic_key[]
static
Initial value:
= {
0x3f, 0xce, 0x51, 0x60, 0x09, 0xc2, 0x17, 0x27, 0xd0, 0xf2, 0xe4,
0xe8, 0x6e, 0xe4, 0x03, 0xbc
}

RFC 8448 simple 1-RTT test: server handshake traffic key.

Definition at line 265 of file tlskey_test.c.

265 {
266 0x3f, 0xce, 0x51, 0x60, 0x09, 0xc2, 0x17, 0x27, 0xd0, 0xf2, 0xe4,
267 0xe8, 0x6e, 0xe4, 0x03, 0xbc
268};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_handshake_traffic_iv

const uint8_t rfc8448_simple_server_handshake_traffic_iv[]
static
Initial value:
= {
0x5d, 0x31, 0x3e, 0xb2, 0x67, 0x12, 0x76, 0xee, 0x13, 0x00, 0x0b,
0x30
}

RFC 8448 simple 1-RTT test: server handshake traffic IV.

Definition at line 271 of file tlskey_test.c.

271 {
272 0x5d, 0x31, 0x3e, 0xb2, 0x67, 0x12, 0x76, 0xee, 0x13, 0x00, 0x0b,
273 0x30
274};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_verify

const uint8_t rfc8448_simple_client_verify[]
static
Initial value:
= {
0xa8, 0xec, 0x43, 0x6d, 0x67, 0x76, 0x34, 0xae, 0x52, 0x5a, 0xc1,
0xfc, 0xeb, 0xe1, 0x1a, 0x03, 0x9e, 0xc1, 0x76, 0x94, 0xfa, 0xc6,
0xe9, 0x85, 0x27, 0xb6, 0x42, 0xf2, 0xed, 0xd5, 0xce, 0x61
}

RFC 8448 simple 1-RTT test: client verification.

Definition at line 277 of file tlskey_test.c.

277 {
278 0xa8, 0xec, 0x43, 0x6d, 0x67, 0x76, 0x34, 0xae, 0x52, 0x5a, 0xc1,
279 0xfc, 0xeb, 0xe1, 0x1a, 0x03, 0x9e, 0xc1, 0x76, 0x94, 0xfa, 0xc6,
280 0xe9, 0x85, 0x27, 0xb6, 0x42, 0xf2, 0xed, 0xd5, 0xce, 0x61
281};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_verify

const uint8_t rfc8448_simple_server_verify[]
static
Initial value:
= {
0x9b, 0x9b, 0x14, 0x1d, 0x90, 0x63, 0x37, 0xfb, 0xd2, 0xcb, 0xdc,
0xe7, 0x1d, 0xf4, 0xde, 0xda, 0x4a, 0xb4, 0x2c, 0x30, 0x95, 0x72,
0xcb, 0x7f, 0xff, 0xee, 0x54, 0x54, 0xb7, 0x8f, 0x07, 0x18
}

RFC 8448 simple 1-RTT test: server verification.

Definition at line 284 of file tlskey_test.c.

284 {
285 0x9b, 0x9b, 0x14, 0x1d, 0x90, 0x63, 0x37, 0xfb, 0xd2, 0xcb, 0xdc,
286 0xe7, 0x1d, 0xf4, 0xde, 0xda, 0x4a, 0xb4, 0x2c, 0x30, 0x95, 0x72,
287 0xcb, 0x7f, 0xff, 0xee, 0x54, 0x54, 0xb7, 0x8f, 0x07, 0x18
288};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_master_secret

const uint8_t rfc8448_simple_master_secret[]
static
Initial value:
= {
0x18, 0xdf, 0x06, 0x84, 0x3d, 0x13, 0xa0, 0x8b, 0xf2, 0xa4, 0x49,
0x84, 0x4c, 0x5f, 0x8a, 0x47, 0x80, 0x01, 0xbc, 0x4d, 0x4c, 0x62,
0x79, 0x84, 0xd5, 0xa4, 0x1d, 0xa8, 0xd0, 0x40, 0x29, 0x19
}

RFC 8448 simple 1-RTT test: master secret.

Definition at line 291 of file tlskey_test.c.

291 {
292 0x18, 0xdf, 0x06, 0x84, 0x3d, 0x13, 0xa0, 0x8b, 0xf2, 0xa4, 0x49,
293 0x84, 0x4c, 0x5f, 0x8a, 0x47, 0x80, 0x01, 0xbc, 0x4d, 0x4c, 0x62,
294 0x79, 0x84, 0xd5, 0xa4, 0x1d, 0xa8, 0xd0, 0x40, 0x29, 0x19
295};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_application_traffic_secret

const uint8_t rfc8448_simple_client_application_traffic_secret[]
static
Initial value:
= {
0x9e, 0x40, 0x64, 0x6c, 0xe7, 0x9a, 0x7f, 0x9d, 0xc0, 0x5a, 0xf8,
0x88, 0x9b, 0xce, 0x65, 0x52, 0x87, 0x5a, 0xfa, 0x0b, 0x06, 0xdf,
0x00, 0x87, 0xf7, 0x92, 0xeb, 0xb7, 0xc1, 0x75, 0x04, 0xa5
}

RFC 8448 simple 1-RTT test: client application traffic secret.

Definition at line 298 of file tlskey_test.c.

298 {
299 0x9e, 0x40, 0x64, 0x6c, 0xe7, 0x9a, 0x7f, 0x9d, 0xc0, 0x5a, 0xf8,
300 0x88, 0x9b, 0xce, 0x65, 0x52, 0x87, 0x5a, 0xfa, 0x0b, 0x06, 0xdf,
301 0x00, 0x87, 0xf7, 0x92, 0xeb, 0xb7, 0xc1, 0x75, 0x04, 0xa5
302};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_application_traffic_key

const uint8_t rfc8448_simple_client_application_traffic_key[]
static
Initial value:
= {
0x17, 0x42, 0x2d, 0xda, 0x59, 0x6e, 0xd5, 0xd9, 0xac, 0xd8, 0x90,
0xe3, 0xc6, 0x3f, 0x50, 0x51
}

RFC 8448 simple 1-RTT test: client application traffic key.

Definition at line 305 of file tlskey_test.c.

305 {
306 0x17, 0x42, 0x2d, 0xda, 0x59, 0x6e, 0xd5, 0xd9, 0xac, 0xd8, 0x90,
307 0xe3, 0xc6, 0x3f, 0x50, 0x51
308};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_client_application_traffic_iv

const uint8_t rfc8448_simple_client_application_traffic_iv[]
static
Initial value:
= {
0x5b, 0x78, 0x92, 0x3d, 0xee, 0x08, 0x57, 0x90, 0x33, 0xe5, 0x23,
0xd9
}

RFC 8448 simple 1-RTT test: client application traffic IV.

Definition at line 311 of file tlskey_test.c.

311 {
312 0x5b, 0x78, 0x92, 0x3d, 0xee, 0x08, 0x57, 0x90, 0x33, 0xe5, 0x23,
313 0xd9
314};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_application_traffic_secret

const uint8_t rfc8448_simple_server_application_traffic_secret[]
static
Initial value:
= {
0xa1, 0x1a, 0xf9, 0xf0, 0x55, 0x31, 0xf8, 0x56, 0xad, 0x47, 0x11,
0x6b, 0x45, 0xa9, 0x50, 0x32, 0x82, 0x04, 0xb4, 0xf4, 0x4b, 0xfb,
0x6b, 0x3a, 0x4b, 0x4f, 0x1f, 0x3f, 0xcb, 0x63, 0x16, 0x43
}

RFC 8448 simple 1-RTT test: server application traffic secret.

Definition at line 317 of file tlskey_test.c.

317 {
318 0xa1, 0x1a, 0xf9, 0xf0, 0x55, 0x31, 0xf8, 0x56, 0xad, 0x47, 0x11,
319 0x6b, 0x45, 0xa9, 0x50, 0x32, 0x82, 0x04, 0xb4, 0xf4, 0x4b, 0xfb,
320 0x6b, 0x3a, 0x4b, 0x4f, 0x1f, 0x3f, 0xcb, 0x63, 0x16, 0x43
321};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_application_traffic_key

const uint8_t rfc8448_simple_server_application_traffic_key[]
static
Initial value:
= {
0x9f, 0x02, 0x28, 0x3b, 0x6c, 0x9c, 0x07, 0xef, 0xc2, 0x6b, 0xb9,
0xf2, 0xac, 0x92, 0xe3, 0x56
}

RFC 8448 simple 1-RTT test: server application traffic key.

Definition at line 324 of file tlskey_test.c.

324 {
325 0x9f, 0x02, 0x28, 0x3b, 0x6c, 0x9c, 0x07, 0xef, 0xc2, 0x6b, 0xb9,
326 0xf2, 0xac, 0x92, 0xe3, 0x56
327};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_application_traffic_iv

const uint8_t rfc8448_simple_server_application_traffic_iv[]
static
Initial value:
= {
0xcf, 0x78, 0x2b, 0x88, 0xdd, 0x83, 0x54, 0x9a, 0xad, 0xf1, 0xe9,
0x84
}

RFC 8448 simple 1-RTT test: server application traffic IV.

Definition at line 330 of file tlskey_test.c.

330 {
331 0xcf, 0x78, 0x2b, 0x88, 0xdd, 0x83, 0x54, 0x9a, 0xad, 0xf1, 0xe9,
332 0x84
333};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_resumption

const uint8_t rfc8448_simple_resumption[]
static
Initial value:
= {
0x4e, 0xcd, 0x0e, 0xb6, 0xec, 0x3b, 0x4d, 0x87, 0xf5, 0xd6, 0x02,
0x8f, 0x92, 0x2c, 0xa4, 0xc5, 0x85, 0x1a, 0x27, 0x7f, 0xd4, 0x13,
0x11, 0xc9, 0xe6, 0x2d, 0x2c, 0x94, 0x92, 0xe1, 0xc4, 0xf3
}

RFC 8448 simple 1-RTT test: resumption secret.

Definition at line 336 of file tlskey_test.c.

336 {
337 0x4e, 0xcd, 0x0e, 0xb6, 0xec, 0x3b, 0x4d, 0x87, 0xf5, 0xd6, 0x02,
338 0x8f, 0x92, 0x2c, 0xa4, 0xc5, 0x85, 0x1a, 0x27, 0x7f, 0xd4, 0x13,
339 0x11, 0xc9, 0xe6, 0x2d, 0x2c, 0x94, 0x92, 0xe1, 0xc4, 0xf3
340};

Referenced by rfc8448_simple_test().

◆ rfc8448_simple_server_tbshash

const uint8_t rfc8448_simple_server_tbshash[]
static
Initial value:
= {
0xbe, 0xed, 0x95, 0xaf, 0x40, 0x4e, 0x23, 0xdd, 0x55, 0x3e, 0xbc,
0xfb, 0x4a, 0x00, 0xb8, 0xdb, 0xbf, 0x22, 0x44, 0xdb, 0x2a, 0x9a,
0xa3, 0x9a, 0x37, 0x92, 0x56, 0x51, 0x26, 0x7c, 0x14, 0x1f
}

RFC 8448 simple 1-RTT test: server CertificateVerify signable digest.

This value is not provided directly within RFC 8448, but may be calculated from the provided values.

Definition at line 347 of file tlskey_test.c.

347 {
348 0xbe, 0xed, 0x95, 0xaf, 0x40, 0x4e, 0x23, 0xdd, 0x55, 0x3e, 0xbc,
349 0xfb, 0x4a, 0x00, 0xb8, 0xdb, 0xbf, 0x22, 0x44, 0xdb, 0x2a, 0x9a,
350 0xa3, 0x9a, 0x37, 0x92, 0x56, 0x51, 0x26, 0x7c, 0x14, 0x1f
351};

Referenced by rfc8448_simple_test().

◆ rfc8448_resumed_server_nonce

const struct tls_random rfc8448_resumed_server_nonce
static
Initial value:
= {
.bytes = {
0x3c, 0xcf, 0xd2, 0xde, 0xc8, 0x90, 0x22, 0x27, 0x63, 0x47,
0x2a, 0xe8, 0x13, 0x67, 0x77, 0xc9, 0xd7, 0x35, 0x87, 0x77,
0xbb, 0x66, 0xe9, 0x1e, 0xa5, 0x12, 0x24, 0x95, 0xf5, 0x59,
0xea, 0x2d
},
}

RFC 8448 resumed 0-RTT test: server random bytes.

Definition at line 354 of file tlskey_test.c.

354 {
355 .bytes = {
356 0x3c, 0xcf, 0xd2, 0xde, 0xc8, 0x90, 0x22, 0x27, 0x63, 0x47,
357 0x2a, 0xe8, 0x13, 0x67, 0x77, 0xc9, 0xd7, 0x35, 0x87, 0x77,
358 0xbb, 0x66, 0xe9, 0x1e, 0xa5, 0x12, 0x24, 0x95, 0xf5, 0x59,
359 0xea, 0x2d
360 },
361};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_x25519_private

const uint8_t rfc8448_resumed_x25519_private[]
static
Initial value:
= {
0xbf, 0xf9, 0x11, 0x88, 0x28, 0x38, 0x46, 0xdd, 0x6a, 0x21, 0x34,
0xef, 0x71, 0x80, 0xca, 0x2b, 0x0b, 0x14, 0xfb, 0x10, 0xdc, 0xe7,
0x07, 0xb5, 0x09, 0x8c, 0x0d, 0xdd, 0xc8, 0x13, 0xb2, 0xdf
}

RFC 8448 resumed 0-RTT test: client X25519 private key.

Definition at line 364 of file tlskey_test.c.

364 {
365 0xbf, 0xf9, 0x11, 0x88, 0x28, 0x38, 0x46, 0xdd, 0x6a, 0x21, 0x34,
366 0xef, 0x71, 0x80, 0xca, 0x2b, 0x0b, 0x14, 0xfb, 0x10, 0xdc, 0xe7,
367 0x07, 0xb5, 0x09, 0x8c, 0x0d, 0xdd, 0xc8, 0x13, 0xb2, 0xdf
368};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_x25519_partner

const uint8_t rfc8448_resumed_x25519_partner[]
static
Initial value:
= {
0x12, 0x17, 0x61, 0xee, 0x42, 0xc3, 0x33, 0xe1, 0xb9, 0xe7, 0x7b,
0x60, 0xdd, 0x57, 0xc2, 0x05, 0x3c, 0xd9, 0x45, 0x12, 0xab, 0x47,
0xf1, 0x15, 0xe8, 0x6e, 0xff, 0x50, 0x94, 0x2c, 0xea, 0x31
}

RFC 8448 resumed 0-RTT test: server X25519 public key.

Definition at line 371 of file tlskey_test.c.

371 {
372 0x12, 0x17, 0x61, 0xee, 0x42, 0xc3, 0x33, 0xe1, 0xb9, 0xe7, 0x7b,
373 0x60, 0xdd, 0x57, 0xc2, 0x05, 0x3c, 0xd9, 0x45, 0x12, 0xab, 0x47,
374 0xf1, 0x15, 0xe8, 0x6e, 0xff, 0x50, 0x94, 0x2c, 0xea, 0x31
375};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_clienthello

const uint8_t rfc8448_resumed_clienthello[]
static

RFC 8448 resumed 0-RTT test: ClientHello.

Definition at line 378 of file tlskey_test.c.

378 {
379 0x01, 0x00, 0x01, 0xfc, 0x03, 0x03, 0x1b, 0xc3, 0xce, 0xb6, 0xbb,
380 0xe3, 0x9c, 0xff, 0x93, 0x83, 0x55, 0xb5, 0xa5, 0x0a, 0xdb, 0x6d,
381 0xb2, 0x1b, 0x7a, 0x6a, 0xf6, 0x49, 0xd7, 0xb4, 0xbc, 0x41, 0x9d,
382 0x78, 0x76, 0x48, 0x7d, 0x95, 0x00, 0x00, 0x06, 0x13, 0x01, 0x13,
383 0x03, 0x13, 0x02, 0x01, 0x00, 0x01, 0xcd, 0x00, 0x00, 0x00, 0x0b,
384 0x00, 0x09, 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
385 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x12,
386 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00, 0x01,
387 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x33, 0x00, 0x26,
388 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0xe4, 0xff, 0xb6, 0x8a, 0xc0,
389 0x5f, 0x8d, 0x96, 0xc9, 0x9d, 0xa2, 0x66, 0x98, 0x34, 0x6c, 0x6b,
390 0xe1, 0x64, 0x82, 0xba, 0xdd, 0xda, 0xfe, 0x05, 0x1a, 0x66, 0xb4,
391 0xf1, 0x8d, 0x66, 0x8f, 0x0b, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x2b,
392 0x00, 0x03, 0x02, 0x03, 0x04, 0x00, 0x0d, 0x00, 0x20, 0x00, 0x1e,
393 0x04, 0x03, 0x05, 0x03, 0x06, 0x03, 0x02, 0x03, 0x08, 0x04, 0x08,
394 0x05, 0x08, 0x06, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x02, 0x01,
395 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x02, 0x02, 0x00, 0x2d, 0x00,
396 0x02, 0x01, 0x01, 0x00, 0x1c, 0x00, 0x02, 0x40, 0x01, 0x00, 0x15,
397 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
398 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
405 0x00, 0x00, 0x29, 0x00, 0xdd, 0x00, 0xb8, 0x00, 0xb2, 0x2c, 0x03,
406 0x5d, 0x82, 0x93, 0x59, 0xee, 0x5f, 0xf7, 0xaf, 0x4e, 0xc9, 0x00,
407 0x00, 0x00, 0x00, 0x26, 0x2a, 0x64, 0x94, 0xdc, 0x48, 0x6d, 0x2c,
408 0x8a, 0x34, 0xcb, 0x33, 0xfa, 0x90, 0xbf, 0x1b, 0x00, 0x70, 0xad,
409 0x3c, 0x49, 0x88, 0x83, 0xc9, 0x36, 0x7c, 0x09, 0xa2, 0xbe, 0x78,
410 0x5a, 0xbc, 0x55, 0xcd, 0x22, 0x60, 0x97, 0xa3, 0xa9, 0x82, 0x11,
411 0x72, 0x83, 0xf8, 0x2a, 0x03, 0xa1, 0x43, 0xef, 0xd3, 0xff, 0x5d,
412 0xd3, 0x6d, 0x64, 0xe8, 0x61, 0xbe, 0x7f, 0xd6, 0x1d, 0x28, 0x27,
413 0xdb, 0x27, 0x9c, 0xce, 0x14, 0x50, 0x77, 0xd4, 0x54, 0xa3, 0x66,
414 0x4d, 0x4e, 0x6d, 0xa4, 0xd2, 0x9e, 0xe0, 0x37, 0x25, 0xa6, 0xa4,
415 0xda, 0xfc, 0xd0, 0xfc, 0x67, 0xd2, 0xae, 0xa7, 0x05, 0x29, 0x51,
416 0x3e, 0x3d, 0xa2, 0x67, 0x7f, 0xa5, 0x90, 0x6c, 0x5b, 0x3f, 0x7d,
417 0x8f, 0x92, 0xf2, 0x28, 0xbd, 0xa4, 0x0d, 0xda, 0x72, 0x14, 0x70,
418 0xf9, 0xfb, 0xf2, 0x97, 0xb5, 0xae, 0xa6, 0x17, 0x64, 0x6f, 0xac,
419 0x5c, 0x03, 0x27, 0x2e, 0x97, 0x07, 0x27, 0xc6, 0x21, 0xa7, 0x91,
420 0x41, 0xef, 0x5f, 0x7d, 0xe6, 0x50, 0x5e, 0x5b, 0xfb, 0xc3, 0x88,
421 0xe9, 0x33, 0x43, 0x69, 0x40, 0x93, 0x93, 0x4a, 0xe4, 0xd3, 0x57,
422 0xfa, 0xd6, 0xaa, 0xcb, 0x00, 0x21, 0x20, 0x3a, 0xdd, 0x4f, 0xb2,
423 0xd8, 0xfd, 0xf8, 0x22, 0xa0, 0xca, 0x3c, 0xf7, 0x67, 0x8e, 0xf5,
424 0xe8, 0x8d, 0xae, 0x99, 0x01, 0x41, 0xc5, 0x92, 0x4d, 0x57, 0xbb,
425 0x6f, 0xa3, 0x1b, 0x9e, 0x5f, 0x9d
426};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_serverhello

const uint8_t rfc8448_resumed_serverhello[]
static
Initial value:
= {
0x02, 0x00, 0x00, 0x5c, 0x03, 0x03, 0x3c, 0xcf, 0xd2, 0xde, 0xc8,
0x90, 0x22, 0x27, 0x63, 0x47, 0x2a, 0xe8, 0x13, 0x67, 0x77, 0xc9,
0xd7, 0x35, 0x87, 0x77, 0xbb, 0x66, 0xe9, 0x1e, 0xa5, 0x12, 0x24,
0x95, 0xf5, 0x59, 0xea, 0x2d, 0x00, 0x13, 0x01, 0x00, 0x00, 0x34,
0x00, 0x29, 0x00, 0x02, 0x00, 0x00, 0x00, 0x33, 0x00, 0x24, 0x00,
0x1d, 0x00, 0x20, 0x12, 0x17, 0x61, 0xee, 0x42, 0xc3, 0x33, 0xe1,
0xb9, 0xe7, 0x7b, 0x60, 0xdd, 0x57, 0xc2, 0x05, 0x3c, 0xd9, 0x45,
0x12, 0xab, 0x47, 0xf1, 0x15, 0xe8, 0x6e, 0xff, 0x50, 0x94, 0x2c,
0xea, 0x31, 0x00, 0x2b, 0x00, 0x02, 0x03, 0x04
}

RFC 8448 resumed 0-RTT test: ServerHello.

Definition at line 429 of file tlskey_test.c.

429 {
430 0x02, 0x00, 0x00, 0x5c, 0x03, 0x03, 0x3c, 0xcf, 0xd2, 0xde, 0xc8,
431 0x90, 0x22, 0x27, 0x63, 0x47, 0x2a, 0xe8, 0x13, 0x67, 0x77, 0xc9,
432 0xd7, 0x35, 0x87, 0x77, 0xbb, 0x66, 0xe9, 0x1e, 0xa5, 0x12, 0x24,
433 0x95, 0xf5, 0x59, 0xea, 0x2d, 0x00, 0x13, 0x01, 0x00, 0x00, 0x34,
434 0x00, 0x29, 0x00, 0x02, 0x00, 0x00, 0x00, 0x33, 0x00, 0x24, 0x00,
435 0x1d, 0x00, 0x20, 0x12, 0x17, 0x61, 0xee, 0x42, 0xc3, 0x33, 0xe1,
436 0xb9, 0xe7, 0x7b, 0x60, 0xdd, 0x57, 0xc2, 0x05, 0x3c, 0xd9, 0x45,
437 0x12, 0xab, 0x47, 0xf1, 0x15, 0xe8, 0x6e, 0xff, 0x50, 0x94, 0x2c,
438 0xea, 0x31, 0x00, 0x2b, 0x00, 0x02, 0x03, 0x04
439};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_clienthello_prefix_len

const size_t rfc8448_resumed_clienthello_prefix_len
static
Initial value:
=
( sizeof ( rfc8448_resumed_clienthello ) - 35 )

RFC 8448 resumed 0-RTT test: ClientHello prefix length.

Definition at line 442 of file tlskey_test.c.

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_encryptedextensions

const uint8_t rfc8448_resumed_encryptedextensions[]
static
Initial value:
= {
0x08, 0x00, 0x00, 0x28, 0x00, 0x26, 0x00, 0x0a, 0x00, 0x14, 0x00,
0x12, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00,
0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x1c, 0x00,
0x02, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00
}

RFC 8448 resumed 0-RTT test: EncryptedExtensions.

Definition at line 446 of file tlskey_test.c.

446 {
447 0x08, 0x00, 0x00, 0x28, 0x00, 0x26, 0x00, 0x0a, 0x00, 0x14, 0x00,
448 0x12, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x01, 0x00,
449 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x1c, 0x00,
450 0x02, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00
451};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_finished

const uint8_t rfc8448_resumed_server_finished[]
static
Initial value:
= {
0x14, 0x00, 0x00, 0x20, 0x48, 0xd3, 0xe0, 0xe1, 0xb3, 0xd9, 0x07,
0xc6, 0xac, 0xff, 0x14, 0x5e, 0x16, 0x09, 0x03, 0x88, 0xc7, 0x7b,
0x05, 0xc0, 0x50, 0xb6, 0x34, 0xab, 0x1a, 0x88, 0xbb, 0xd0, 0xdd,
0x1a, 0x34, 0xb2
}

RFC 8448 resumed 0-RTT test: server Finished.

Definition at line 454 of file tlskey_test.c.

454 {
455 0x14, 0x00, 0x00, 0x20, 0x48, 0xd3, 0xe0, 0xe1, 0xb3, 0xd9, 0x07,
456 0xc6, 0xac, 0xff, 0x14, 0x5e, 0x16, 0x09, 0x03, 0x88, 0xc7, 0x7b,
457 0x05, 0xc0, 0x50, 0xb6, 0x34, 0xab, 0x1a, 0x88, 0xbb, 0xd0, 0xdd,
458 0x1a, 0x34, 0xb2
459};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_endofearlydata

const uint8_t rfc8448_resumed_endofearlydata[]
static
Initial value:
= {
0x05, 0x00, 0x00, 0x00
}

RFC 8448 resumed 0-RTT test: EndOfEarlyData.

Definition at line 462 of file tlskey_test.c.

462 {
463 0x05, 0x00, 0x00, 0x00
464};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_finished

const uint8_t rfc8448_resumed_client_finished[]
static
Initial value:
= {
0x14, 0x00, 0x00, 0x20, 0x72, 0x30, 0xa9, 0xc9, 0x52, 0xc2, 0x5c,
0xd6, 0x13, 0x8f, 0xc5, 0xe6, 0x62, 0x83, 0x08, 0xc4, 0x1c, 0x53,
0x35, 0xdd, 0x81, 0xb9, 0xf9, 0x6b, 0xce, 0xa5, 0x0f, 0xd3, 0x2b,
0xda, 0x41, 0x6d
}

RFC 8448 resumed 0-RTT test: client Finished.

Definition at line 467 of file tlskey_test.c.

467 {
468 0x14, 0x00, 0x00, 0x20, 0x72, 0x30, 0xa9, 0xc9, 0x52, 0xc2, 0x5c,
469 0xd6, 0x13, 0x8f, 0xc5, 0xe6, 0x62, 0x83, 0x08, 0xc4, 0x1c, 0x53,
470 0x35, 0xdd, 0x81, 0xb9, 0xf9, 0x6b, 0xce, 0xa5, 0x0f, 0xd3, 0x2b,
471 0xda, 0x41, 0x6d
472};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_psk_binder

const uint8_t rfc8448_resumed_psk_binder[]
static
Initial value:
= {
0x3a, 0xdd, 0x4f, 0xb2, 0xd8, 0xfd, 0xf8, 0x22, 0xa0, 0xca, 0x3c,
0xf7, 0x67, 0x8e, 0xf5, 0xe8, 0x8d, 0xae, 0x99, 0x01, 0x41, 0xc5,
0x92, 0x4d, 0x57, 0xbb, 0x6f, 0xa3, 0x1b, 0x9e, 0x5f, 0x9d
}

RFC 8448 resumed 0-RTT test: PSK binder.

Definition at line 475 of file tlskey_test.c.

475 {
476 0x3a, 0xdd, 0x4f, 0xb2, 0xd8, 0xfd, 0xf8, 0x22, 0xa0, 0xca, 0x3c,
477 0xf7, 0x67, 0x8e, 0xf5, 0xe8, 0x8d, 0xae, 0x99, 0x01, 0x41, 0xc5,
478 0x92, 0x4d, 0x57, 0xbb, 0x6f, 0xa3, 0x1b, 0x9e, 0x5f, 0x9d
479};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_early_secret

const uint8_t rfc8448_resumed_early_secret[]
static
Initial value:
= {
0x9b, 0x21, 0x88, 0xe9, 0xb2, 0xfc, 0x6d, 0x64, 0xd7, 0x1d, 0xc3,
0x29, 0x90, 0x0e, 0x20, 0xbb, 0x41, 0x91, 0x50, 0x00, 0xf6, 0x78,
0xaa, 0x83, 0x9c, 0xbb, 0x79, 0x7c, 0xb7, 0xd8, 0x33, 0x2c
}

RFC 8448 resumed 0-RTT test: early secret.

Definition at line 482 of file tlskey_test.c.

482 {
483 0x9b, 0x21, 0x88, 0xe9, 0xb2, 0xfc, 0x6d, 0x64, 0xd7, 0x1d, 0xc3,
484 0x29, 0x90, 0x0e, 0x20, 0xbb, 0x41, 0x91, 0x50, 0x00, 0xf6, 0x78,
485 0xaa, 0x83, 0x9c, 0xbb, 0x79, 0x7c, 0xb7, 0xd8, 0x33, 0x2c
486};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_early_traffic_secret

const uint8_t rfc8448_resumed_client_early_traffic_secret[]
static
Initial value:
= {
0x3f, 0xbb, 0xe6, 0xa6, 0x0d, 0xeb, 0x66, 0xc3, 0x0a, 0x32, 0x79,
0x5a, 0xba, 0x0e, 0xff, 0x7e, 0xaa, 0x10, 0x10, 0x55, 0x86, 0xe7,
0xbe, 0x5c, 0x09, 0x67, 0x8d, 0x63, 0xb6, 0xca, 0xab, 0x62
}

RFC 8448 resumed 0-RTT test: client early traffic secret.

Definition at line 489 of file tlskey_test.c.

489 {
490 0x3f, 0xbb, 0xe6, 0xa6, 0x0d, 0xeb, 0x66, 0xc3, 0x0a, 0x32, 0x79,
491 0x5a, 0xba, 0x0e, 0xff, 0x7e, 0xaa, 0x10, 0x10, 0x55, 0x86, 0xe7,
492 0xbe, 0x5c, 0x09, 0x67, 0x8d, 0x63, 0xb6, 0xca, 0xab, 0x62
493};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_early_traffic_key

const uint8_t rfc8448_resumed_client_early_traffic_key[]
static
Initial value:
= {
0x92, 0x02, 0x05, 0xa5, 0xb7, 0xbf, 0x21, 0x15, 0xe6, 0xfc, 0x5c,
0x29, 0x42, 0x83, 0x4f, 0x54
}

RFC 8448 resumed 0-RTT test: client early traffic key.

Definition at line 496 of file tlskey_test.c.

496 {
497 0x92, 0x02, 0x05, 0xa5, 0xb7, 0xbf, 0x21, 0x15, 0xe6, 0xfc, 0x5c,
498 0x29, 0x42, 0x83, 0x4f, 0x54
499};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_early_traffic_iv

const uint8_t rfc8448_resumed_client_early_traffic_iv[]
static
Initial value:
= {
0x6d, 0x47, 0x5f, 0x09, 0x93, 0xc8, 0xe5, 0x64, 0x61, 0x0d, 0xb2,
0xb9
}

RFC 8448 resumed 0-RTT test: client early traffic IV.

Definition at line 502 of file tlskey_test.c.

502 {
503 0x6d, 0x47, 0x5f, 0x09, 0x93, 0xc8, 0xe5, 0x64, 0x61, 0x0d, 0xb2,
504 0xb9
505};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_handshake_secret

const uint8_t rfc8448_resumed_handshake_secret[]
static
Initial value:
= {
0x00, 0x5c, 0xb1, 0x12, 0xfd, 0x8e, 0xb4, 0xcc, 0xc6, 0x23, 0xbb,
0x88, 0xa0, 0x7c, 0x64, 0xb3, 0xed, 0xe1, 0x60, 0x53, 0x63, 0xfc,
0x7d, 0x0d, 0xf8, 0xc7, 0xce, 0x4f, 0xf0, 0xfb, 0x4a, 0xe6
}

RFC 8448 resumed 0-RTT test: handshake secret.

Definition at line 508 of file tlskey_test.c.

508 {
509 0x00, 0x5c, 0xb1, 0x12, 0xfd, 0x8e, 0xb4, 0xcc, 0xc6, 0x23, 0xbb,
510 0x88, 0xa0, 0x7c, 0x64, 0xb3, 0xed, 0xe1, 0x60, 0x53, 0x63, 0xfc,
511 0x7d, 0x0d, 0xf8, 0xc7, 0xce, 0x4f, 0xf0, 0xfb, 0x4a, 0xe6
512};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_handshake_traffic_secret

const uint8_t rfc8448_resumed_client_handshake_traffic_secret[]
static
Initial value:
= {
0x2f, 0xaa, 0xc0, 0x8f, 0x85, 0x1d, 0x35, 0xfe, 0xa3, 0x60, 0x4f,
0xcb, 0x4d, 0xe8, 0x2d, 0xc6, 0x2c, 0x9b, 0x16, 0x4a, 0x70, 0x97,
0x4d, 0x04, 0x62, 0xe2, 0x7f, 0x1a, 0xb2, 0x78, 0x70, 0x0f
}

RFC 8448 resumed 0-RTT test: client handshake traffic secret.

Definition at line 515 of file tlskey_test.c.

515 {
516 0x2f, 0xaa, 0xc0, 0x8f, 0x85, 0x1d, 0x35, 0xfe, 0xa3, 0x60, 0x4f,
517 0xcb, 0x4d, 0xe8, 0x2d, 0xc6, 0x2c, 0x9b, 0x16, 0x4a, 0x70, 0x97,
518 0x4d, 0x04, 0x62, 0xe2, 0x7f, 0x1a, 0xb2, 0x78, 0x70, 0x0f
519};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_handshake_traffic_key

const uint8_t rfc8448_resumed_client_handshake_traffic_key[]
static
Initial value:
= {
0xb1, 0x53, 0x08, 0x06, 0xf4, 0xad, 0xfe, 0xac, 0x83, 0xf1, 0x41,
0x30, 0x32, 0xbb, 0xfa, 0x82
}

RFC 8448 resumed 0-RTT test: client handshake traffic key.

Definition at line 522 of file tlskey_test.c.

522 {
523 0xb1, 0x53, 0x08, 0x06, 0xf4, 0xad, 0xfe, 0xac, 0x83, 0xf1, 0x41,
524 0x30, 0x32, 0xbb, 0xfa, 0x82
525};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_handshake_traffic_iv

const uint8_t rfc8448_resumed_client_handshake_traffic_iv[]
static
Initial value:
= {
0xeb, 0x50, 0xc1, 0x6b, 0xe7, 0x65, 0x4a, 0xbf, 0x99, 0xdd, 0x06,
0xd9
}

RFC 8448 resumed 0-RTT test: client handshake traffic IV.

Definition at line 528 of file tlskey_test.c.

528 {
529 0xeb, 0x50, 0xc1, 0x6b, 0xe7, 0x65, 0x4a, 0xbf, 0x99, 0xdd, 0x06,
530 0xd9
531};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_handshake_traffic_secret

const uint8_t rfc8448_resumed_server_handshake_traffic_secret[]
static
Initial value:
= {
0xfe, 0x92, 0x7a, 0xe2, 0x71, 0x31, 0x2e, 0x8b, 0xf0, 0x27, 0x5b,
0x58, 0x1c, 0x54, 0xee, 0xf0, 0x20, 0x45, 0x0d, 0xc4, 0xec, 0xff,
0xaa, 0x05, 0xa1, 0xa3, 0x5d, 0x27, 0x51, 0x8e, 0x78, 0x03
}

RFC 8448 resumed 0-RTT test: server handshake traffic secret.

Definition at line 534 of file tlskey_test.c.

534 {
535 0xfe, 0x92, 0x7a, 0xe2, 0x71, 0x31, 0x2e, 0x8b, 0xf0, 0x27, 0x5b,
536 0x58, 0x1c, 0x54, 0xee, 0xf0, 0x20, 0x45, 0x0d, 0xc4, 0xec, 0xff,
537 0xaa, 0x05, 0xa1, 0xa3, 0x5d, 0x27, 0x51, 0x8e, 0x78, 0x03
538};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_handshake_traffic_key

const uint8_t rfc8448_resumed_server_handshake_traffic_key[]
static
Initial value:
= {
0x27, 0xc6, 0xbd, 0xc0, 0xa3, 0xdc, 0xea, 0x39, 0xa4, 0x73, 0x26,
0xd7, 0x9b, 0xc9, 0xe4, 0xee
}

RFC 8448 resumed 0-RTT test: server handshake traffic key.

Definition at line 541 of file tlskey_test.c.

541 {
542 0x27, 0xc6, 0xbd, 0xc0, 0xa3, 0xdc, 0xea, 0x39, 0xa4, 0x73, 0x26,
543 0xd7, 0x9b, 0xc9, 0xe4, 0xee
544};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_handshake_traffic_iv

const uint8_t rfc8448_resumed_server_handshake_traffic_iv[]
static
Initial value:
= {
0x95, 0x69, 0xec, 0xdd, 0x4d, 0x05, 0x36, 0x70, 0x5e, 0x9e, 0xf7,
0x25
}

RFC 8448 resumed 0-RTT test: server handshake traffic IV.

Definition at line 547 of file tlskey_test.c.

547 {
548 0x95, 0x69, 0xec, 0xdd, 0x4d, 0x05, 0x36, 0x70, 0x5e, 0x9e, 0xf7,
549 0x25
550};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_verify

const uint8_t rfc8448_resumed_client_verify[]
static
Initial value:
= {
0x72, 0x30, 0xa9, 0xc9, 0x52, 0xc2, 0x5c, 0xd6, 0x13, 0x8f, 0xc5,
0xe6, 0x62, 0x83, 0x08, 0xc4, 0x1c, 0x53, 0x35, 0xdd, 0x81, 0xb9,
0xf9, 0x6b, 0xce, 0xa5, 0x0f, 0xd3, 0x2b, 0xda, 0x41, 0x6d
}

RFC 8448 resumed 0-RTT test: client verification.

Definition at line 553 of file tlskey_test.c.

553 {
554 0x72, 0x30, 0xa9, 0xc9, 0x52, 0xc2, 0x5c, 0xd6, 0x13, 0x8f, 0xc5,
555 0xe6, 0x62, 0x83, 0x08, 0xc4, 0x1c, 0x53, 0x35, 0xdd, 0x81, 0xb9,
556 0xf9, 0x6b, 0xce, 0xa5, 0x0f, 0xd3, 0x2b, 0xda, 0x41, 0x6d
557};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_verify

const uint8_t rfc8448_resumed_server_verify[]
static
Initial value:
= {
0x48, 0xd3, 0xe0, 0xe1, 0xb3, 0xd9, 0x07, 0xc6, 0xac, 0xff, 0x14,
0x5e, 0x16, 0x09, 0x03, 0x88, 0xc7, 0x7b, 0x05, 0xc0, 0x50, 0xb6,
0x34, 0xab, 0x1a, 0x88, 0xbb, 0xd0, 0xdd, 0x1a, 0x34, 0xb2
}

RFC 8448 resumed 0-RTT test: server verification.

Definition at line 560 of file tlskey_test.c.

560 {
561 0x48, 0xd3, 0xe0, 0xe1, 0xb3, 0xd9, 0x07, 0xc6, 0xac, 0xff, 0x14,
562 0x5e, 0x16, 0x09, 0x03, 0x88, 0xc7, 0x7b, 0x05, 0xc0, 0x50, 0xb6,
563 0x34, 0xab, 0x1a, 0x88, 0xbb, 0xd0, 0xdd, 0x1a, 0x34, 0xb2
564};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_master_secret

const uint8_t rfc8448_resumed_master_secret[]
static
Initial value:
= {
0xe2, 0xd3, 0x2d, 0x4e, 0xd6, 0x6d, 0xd3, 0x78, 0x97, 0xa0, 0xe8,
0x0c, 0x84, 0x10, 0x75, 0x03, 0xce, 0x58, 0xbf, 0x8a, 0xad, 0x4c,
0xb5, 0x5a, 0x50, 0x02, 0xd7, 0x7e, 0xcb, 0x89, 0x0e, 0xce
}

RFC 8448 resumed 0-RTT test: master secret.

Definition at line 567 of file tlskey_test.c.

567 {
568 0xe2, 0xd3, 0x2d, 0x4e, 0xd6, 0x6d, 0xd3, 0x78, 0x97, 0xa0, 0xe8,
569 0x0c, 0x84, 0x10, 0x75, 0x03, 0xce, 0x58, 0xbf, 0x8a, 0xad, 0x4c,
570 0xb5, 0x5a, 0x50, 0x02, 0xd7, 0x7e, 0xcb, 0x89, 0x0e, 0xce
571};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_application_traffic_secret

const uint8_t rfc8448_resumed_client_application_traffic_secret[]
static
Initial value:
= {
0x2a, 0xbb, 0xf2, 0xb8, 0xe3, 0x81, 0xd2, 0x3d, 0xbe, 0xbe, 0x1d,
0xd2, 0xa7, 0xd1, 0x6a, 0x8b, 0xf4, 0x84, 0xcb, 0x49, 0x50, 0xd2,
0x3f, 0xb7, 0xfb, 0x7f, 0xa8, 0x54, 0x70, 0x62, 0xd9, 0xa1
}

RFC 8448 resumed 0-RTT test: client application traffic secret.

Definition at line 574 of file tlskey_test.c.

574 {
575 0x2a, 0xbb, 0xf2, 0xb8, 0xe3, 0x81, 0xd2, 0x3d, 0xbe, 0xbe, 0x1d,
576 0xd2, 0xa7, 0xd1, 0x6a, 0x8b, 0xf4, 0x84, 0xcb, 0x49, 0x50, 0xd2,
577 0x3f, 0xb7, 0xfb, 0x7f, 0xa8, 0x54, 0x70, 0x62, 0xd9, 0xa1
578};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_application_traffic_key

const uint8_t rfc8448_resumed_client_application_traffic_key[]
static
Initial value:
= {
0x3c, 0xf1, 0x22, 0xf3, 0x01, 0xc6, 0x35, 0x8c, 0xa7, 0x98, 0x95,
0x53, 0x25, 0x0e, 0xfd, 0x72
}

RFC 8448 resumed 0-RTT test: client application traffic key.

Definition at line 581 of file tlskey_test.c.

581 {
582 0x3c, 0xf1, 0x22, 0xf3, 0x01, 0xc6, 0x35, 0x8c, 0xa7, 0x98, 0x95,
583 0x53, 0x25, 0x0e, 0xfd, 0x72
584};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_client_application_traffic_iv

const uint8_t rfc8448_resumed_client_application_traffic_iv[]
static
Initial value:
= {
0xab, 0x1a, 0xec, 0x26, 0xaa, 0x78, 0xb8, 0xfc, 0x11, 0x76, 0xb9,
0xac
}

RFC 8448 resumed 0-RTT test: client application traffic IV.

Definition at line 587 of file tlskey_test.c.

587 {
588 0xab, 0x1a, 0xec, 0x26, 0xaa, 0x78, 0xb8, 0xfc, 0x11, 0x76, 0xb9,
589 0xac
590};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_application_traffic_secret

const uint8_t rfc8448_resumed_server_application_traffic_secret[]
static
Initial value:
= {
0xcc, 0x21, 0xf1, 0xbf, 0x8f, 0xeb, 0x7d, 0xd5, 0xfa, 0x50, 0x5b,
0xd9, 0xc4, 0xb4, 0x68, 0xa9, 0x98, 0x4d, 0x55, 0x4a, 0x99, 0x3d,
0xc4, 0x9e, 0x6d, 0x28, 0x55, 0x98, 0xfb, 0x67, 0x26, 0x91
}

RFC 8448 resumed 0-RTT test: server application traffic secret.

Definition at line 593 of file tlskey_test.c.

593 {
594 0xcc, 0x21, 0xf1, 0xbf, 0x8f, 0xeb, 0x7d, 0xd5, 0xfa, 0x50, 0x5b,
595 0xd9, 0xc4, 0xb4, 0x68, 0xa9, 0x98, 0x4d, 0x55, 0x4a, 0x99, 0x3d,
596 0xc4, 0x9e, 0x6d, 0x28, 0x55, 0x98, 0xfb, 0x67, 0x26, 0x91
597};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_application_traffic_key

const uint8_t rfc8448_resumed_server_application_traffic_key[]
static
Initial value:
= {
0xe8, 0x57, 0xc6, 0x90, 0xa3, 0x4c, 0x5a, 0x91, 0x29, 0xd8, 0x33,
0x61, 0x96, 0x84, 0xf9, 0x5e
}

RFC 8448 resumed 0-RTT test: server application traffic key.

Definition at line 600 of file tlskey_test.c.

600 {
601 0xe8, 0x57, 0xc6, 0x90, 0xa3, 0x4c, 0x5a, 0x91, 0x29, 0xd8, 0x33,
602 0x61, 0x96, 0x84, 0xf9, 0x5e
603};

Referenced by rfc8448_resumed_test().

◆ rfc8448_resumed_server_application_traffic_iv

const uint8_t rfc8448_resumed_server_application_traffic_iv[]
static
Initial value:
= {
0x06, 0x85, 0xd6, 0xb5, 0x61, 0xaa, 0xb9, 0xef, 0x10, 0x13, 0xfa,
0xf9
}

RFC 8448 resumed 0-RTT test: server application traffic IV.

Definition at line 606 of file tlskey_test.c.

606 {
607 0x06, 0x85, 0xd6, 0xb5, 0x61, 0xaa, 0xb9, 0xef, 0x10, 0x13, 0xfa,
608 0xf9
609};

Referenced by rfc8448_resumed_test().

◆ dummy_client_nonce

const struct tls_random dummy_client_nonce
static
Initial value:
= {
.bytes = {
0x86, 0x75, 0xa3, 0x00, 0x0c, 0x3d, 0x73, 0x79, 0xa3, 0x78,
0x04, 0xfc, 0x5d, 0x7f, 0x99, 0xef, 0xf1, 0x9e, 0xda, 0x74,
0x80, 0x3c, 0x60, 0x83, 0xac, 0xbe, 0x15, 0xae, 0x11, 0x3f,
0xbe, 0xba
},
}

Dummy minimal tests: client random bytes.

Definition at line 612 of file tlskey_test.c.

612 {
613 .bytes = {
614 0x86, 0x75, 0xa3, 0x00, 0x0c, 0x3d, 0x73, 0x79, 0xa3, 0x78,
615 0x04, 0xfc, 0x5d, 0x7f, 0x99, 0xef, 0xf1, 0x9e, 0xda, 0x74,
616 0x80, 0x3c, 0x60, 0x83, 0xac, 0xbe, 0x15, 0xae, 0x11, 0x3f,
617 0xbe, 0xba
618 },
619};

Referenced by dummy_hash(), and dummy_md5_sha1().

◆ dummy_clienthello

const uint8_t dummy_clienthello[]
static
Initial value:
= {
0x01, 0x00, 0x00, 0x22, 0x03, 0x02, 0x86, 0x75, 0xa3, 0x00, 0x0c,
0x3d, 0x73, 0x79, 0xa3, 0x78, 0x04, 0xfc, 0x5d, 0x7f, 0x99, 0xef,
0xf1, 0x9e, 0xda, 0x74, 0x80, 0x3c, 0x60, 0x83, 0xac, 0xbe, 0x15,
0xae, 0x11, 0x3f, 0xbe, 0xba
}

Dummy minimal tests: ClientHello.

Definition at line 622 of file tlskey_test.c.

622 {
623 0x01, 0x00, 0x00, 0x22, 0x03, 0x02, 0x86, 0x75, 0xa3, 0x00, 0x0c,
624 0x3d, 0x73, 0x79, 0xa3, 0x78, 0x04, 0xfc, 0x5d, 0x7f, 0x99, 0xef,
625 0xf1, 0x9e, 0xda, 0x74, 0x80, 0x3c, 0x60, 0x83, 0xac, 0xbe, 0x15,
626 0xae, 0x11, 0x3f, 0xbe, 0xba
627};

Referenced by dummy_hash(), and dummy_md5_sha1().

◆ dummy_serverhello

const uint8_t dummy_serverhello[]
static
Initial value:
= {
0x02, 0x00, 0x00, 0x22, 0x03, 0x02, 0xa3, 0xdd, 0xe4, 0x56, 0xda,
0xc8, 0x65, 0xd8, 0x2c, 0xc3, 0xb0, 0x47, 0x49, 0x2f, 0xdb, 0xfd,
0xc3, 0xaf, 0x6b, 0x60, 0x98, 0xe1, 0x99, 0xb3, 0xd4, 0x9b, 0x55,
0x15, 0x43, 0x8d, 0xec, 0x3e
}

Dummy minimal tests: ServerHello.

Definition at line 630 of file tlskey_test.c.

630 {
631 0x02, 0x00, 0x00, 0x22, 0x03, 0x02, 0xa3, 0xdd, 0xe4, 0x56, 0xda,
632 0xc8, 0x65, 0xd8, 0x2c, 0xc3, 0xb0, 0x47, 0x49, 0x2f, 0xdb, 0xfd,
633 0xc3, 0xaf, 0x6b, 0x60, 0x98, 0xe1, 0x99, 0xb3, 0xd4, 0x9b, 0x55,
634 0x15, 0x43, 0x8d, 0xec, 0x3e
635};

Referenced by dummy_hash(), and dummy_md5_sha1().

◆ dummy_premaster

const uint8_t dummy_premaster[]
static
Initial value:
= {
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64,
0x21, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61,
0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x70, 0x72, 0x65, 0x2d,
0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x72,
0x65, 0x74, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x6f,
0x75, 0x67, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x6b, 0x65,
0x79, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x2e
}

Dummy minimal tests: pre-master secret.

Definition at line 638 of file tlskey_test.c.

638 {
639 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64,
640 0x21, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61,
641 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x70, 0x72, 0x65, 0x2d,
642 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x72,
643 0x65, 0x74, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x6f,
644 0x75, 0x67, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x71, 0x75,
645 0x69, 0x72, 0x65, 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x6b, 0x65,
646 0x79, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
647 0x6f, 0x6e, 0x2e
648};

Referenced by dummy_hash(), and dummy_md5_sha1().

◆ dummy_dh_param

const uint8_t dummy_dh_param[]
static
Initial value:
= {
0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c
}

Dummy minimal tests: ServerKeyExchange DH parameters.

Definition at line 651 of file tlskey_test.c.

651 {
652 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c
653};

Referenced by dummy_hash().

◆ dummy_hash_master_secret

const uint8_t dummy_hash_master_secret[]
static
Initial value:
= {
0x6f, 0x57, 0xe7, 0xab, 0xd9, 0x0c, 0xcc, 0x99, 0xe0, 0x18, 0xa6,
0x2b, 0x7c, 0x7d, 0x04, 0x84, 0x18, 0x37, 0xee, 0x9e, 0xad, 0x47,
0x54, 0x6e, 0xd4, 0xd0, 0x84, 0x99, 0x91, 0x5d, 0x8f, 0xee, 0xfa,
0xec, 0x08, 0x21, 0x35, 0x2d, 0x1e, 0xe3, 0x4b, 0xe5, 0xbf, 0x81,
0xc2, 0x23, 0x47, 0x10
}

Dummy minimal TLSv1.2 test: master secret.

Definition at line 656 of file tlskey_test.c.

656 {
657 0x6f, 0x57, 0xe7, 0xab, 0xd9, 0x0c, 0xcc, 0x99, 0xe0, 0x18, 0xa6,
658 0x2b, 0x7c, 0x7d, 0x04, 0x84, 0x18, 0x37, 0xee, 0x9e, 0xad, 0x47,
659 0x54, 0x6e, 0xd4, 0xd0, 0x84, 0x99, 0x91, 0x5d, 0x8f, 0xee, 0xfa,
660 0xec, 0x08, 0x21, 0x35, 0x2d, 0x1e, 0xe3, 0x4b, 0xe5, 0xbf, 0x81,
661 0xc2, 0x23, 0x47, 0x10
662};

Referenced by dummy_hash().

◆ dummy_hash_client_verify

const uint8_t dummy_hash_client_verify[]
static
Initial value:
= {
0xd6, 0x5d, 0xbb, 0xff, 0x72, 0xc5, 0x51, 0xa5, 0xa9, 0x53, 0x85,
0xab
}

Dummy minimal TLSv1.2 test: client verification.

Definition at line 665 of file tlskey_test.c.

665 {
666 0xd6, 0x5d, 0xbb, 0xff, 0x72, 0xc5, 0x51, 0xa5, 0xa9, 0x53, 0x85,
667 0xab
668};

Referenced by dummy_hash().

◆ dummy_hash_server_verify

const uint8_t dummy_hash_server_verify[]
static
Initial value:
= {
0x6c, 0xe4, 0x95, 0x70, 0xc3, 0x8d, 0x2a, 0xcd, 0x2d, 0x8b, 0x0b,
0x33
}

Dummy minimal TLSv1.2 test: server verification.

Definition at line 671 of file tlskey_test.c.

671 {
672 0x6c, 0xe4, 0x95, 0x70, 0xc3, 0x8d, 0x2a, 0xcd, 0x2d, 0x8b, 0x0b,
673 0x33
674};

Referenced by dummy_hash().

◆ dummy_hash_client_traffic_key

const uint8_t dummy_hash_client_traffic_key[]
static
Initial value:
= {
0xda, 0x2a, 0x4b, 0xbd, 0x5b, 0x0a, 0xa5, 0xd3, 0x30, 0x54, 0x9a,
0xcc, 0x99, 0x28, 0x93, 0xfa
}

Dummy minimal TLSv1.2 test: client traffic key.

Definition at line 677 of file tlskey_test.c.

677 {
678 0xda, 0x2a, 0x4b, 0xbd, 0x5b, 0x0a, 0xa5, 0xd3, 0x30, 0x54, 0x9a,
679 0xcc, 0x99, 0x28, 0x93, 0xfa
680};

Referenced by dummy_hash().

◆ dummy_hash_client_traffic_iv

const uint8_t dummy_hash_client_traffic_iv[]
static
Initial value:
= {
0xcd, 0xa5, 0x5a, 0x1d
}

Dummy minimal TLSv1.2 test: client traffic IV.

Definition at line 683 of file tlskey_test.c.

683 {
684 0xcd, 0xa5, 0x5a, 0x1d
685};

Referenced by dummy_hash().

◆ dummy_hash_client_traffic_mac

const uint8_t dummy_hash_client_traffic_mac[]
static
Initial value:
= {
0xe8, 0x4e, 0x9b, 0x7a, 0xb9, 0x97, 0x7d, 0x47, 0xfb, 0x4a, 0xe8,
0x1e, 0xb6, 0x6e, 0xfc, 0x2b, 0x94, 0x8a, 0xd4, 0x75, 0xde, 0xd9,
0xb9, 0x73, 0x23, 0x16, 0x06, 0x2f, 0x96, 0xb0, 0xb6, 0xcb
}

Dummy minimal TLSv1.2 test: client traffic MAC.

Definition at line 688 of file tlskey_test.c.

688 {
689 0xe8, 0x4e, 0x9b, 0x7a, 0xb9, 0x97, 0x7d, 0x47, 0xfb, 0x4a, 0xe8,
690 0x1e, 0xb6, 0x6e, 0xfc, 0x2b, 0x94, 0x8a, 0xd4, 0x75, 0xde, 0xd9,
691 0xb9, 0x73, 0x23, 0x16, 0x06, 0x2f, 0x96, 0xb0, 0xb6, 0xcb
692};

Referenced by dummy_hash().

◆ dummy_hash_server_traffic_key

const uint8_t dummy_hash_server_traffic_key[]
static
Initial value:
= {
0x0b, 0x58, 0x8a, 0xbc, 0x5a, 0x6a, 0x44, 0x33, 0xdc, 0x60, 0xd4,
0xd1, 0xf1, 0x9b, 0xba, 0xd7
}

Dummy minimal TLSv1.2 test: server traffic key.

Definition at line 695 of file tlskey_test.c.

695 {
696 0x0b, 0x58, 0x8a, 0xbc, 0x5a, 0x6a, 0x44, 0x33, 0xdc, 0x60, 0xd4,
697 0xd1, 0xf1, 0x9b, 0xba, 0xd7
698};

Referenced by dummy_hash().

◆ dummy_hash_server_traffic_iv

const uint8_t dummy_hash_server_traffic_iv[]
static
Initial value:
= {
0xa2, 0x35, 0xf7, 0x40
}

Dummy minimal TLSv1.2 test: server traffic IV.

Definition at line 701 of file tlskey_test.c.

701 {
702 0xa2, 0x35, 0xf7, 0x40
703};

Referenced by dummy_hash().

◆ dummy_hash_server_traffic_mac

const uint8_t dummy_hash_server_traffic_mac[]
static
Initial value:
= {
0x16, 0x7c, 0x12, 0x5d, 0x85, 0x84, 0xfd, 0x5e, 0xf1, 0x3d, 0x0f,
0x5a, 0xbf, 0xf6, 0x44, 0x22, 0x93, 0xf8, 0xea, 0x17, 0x3c, 0x0b,
0x4e, 0xdf, 0x82, 0x5e, 0x26, 0xd0, 0xcb, 0xe5, 0xac, 0xa4
}

Dummy minimal TLSv1.2 test: server traffic MAC.

Definition at line 706 of file tlskey_test.c.

706 {
707 0x16, 0x7c, 0x12, 0x5d, 0x85, 0x84, 0xfd, 0x5e, 0xf1, 0x3d, 0x0f,
708 0x5a, 0xbf, 0xf6, 0x44, 0x22, 0x93, 0xf8, 0xea, 0x17, 0x3c, 0x0b,
709 0x4e, 0xdf, 0x82, 0x5e, 0x26, 0xd0, 0xcb, 0xe5, 0xac, 0xa4
710};

Referenced by dummy_hash().

◆ dummy_hash_client_tbshash

const uint8_t dummy_hash_client_tbshash[]
static
Initial value:
= {
0x14, 0x3b, 0xc1, 0x0c, 0x25, 0xf3, 0x6a, 0x4d, 0x4a, 0x7a, 0xd9,
0xb2, 0xee, 0x7e, 0x48, 0xc8, 0xf4, 0x71, 0x53, 0xb0, 0x69, 0x29,
0xe5, 0x2c, 0x0d, 0xeb, 0xa3, 0xf9, 0xe1, 0xcd, 0x02, 0x3d
}

Dummy minimal TLSv1.2 test: client signable digest.

Definition at line 713 of file tlskey_test.c.

713 {
714 0x14, 0x3b, 0xc1, 0x0c, 0x25, 0xf3, 0x6a, 0x4d, 0x4a, 0x7a, 0xd9,
715 0xb2, 0xee, 0x7e, 0x48, 0xc8, 0xf4, 0x71, 0x53, 0xb0, 0x69, 0x29,
716 0xe5, 0x2c, 0x0d, 0xeb, 0xa3, 0xf9, 0xe1, 0xcd, 0x02, 0x3d
717};

Referenced by dummy_hash().

◆ dummy_hash_server_tbshash

const uint8_t dummy_hash_server_tbshash[]
static
Initial value:
= {
0xd4, 0x11, 0x45, 0x52, 0xa6, 0xf0, 0xe5, 0xe0, 0x5e, 0x20, 0x99,
0x77, 0x5e, 0x0c, 0xbe, 0xce, 0x3e, 0xd9, 0x81, 0xf7, 0x73, 0x49,
0xc1, 0xab, 0xf2, 0xd3, 0x1e, 0xf7, 0xf3, 0x72, 0xc4, 0x15
}

Dummy minimal TLSv1.2 test: server signable digest.

Definition at line 720 of file tlskey_test.c.

720 {
721 0xd4, 0x11, 0x45, 0x52, 0xa6, 0xf0, 0xe5, 0xe0, 0x5e, 0x20, 0x99,
722 0x77, 0x5e, 0x0c, 0xbe, 0xce, 0x3e, 0xd9, 0x81, 0xf7, 0x73, 0x49,
723 0xc1, 0xab, 0xf2, 0xd3, 0x1e, 0xf7, 0xf3, 0x72, 0xc4, 0x15
724};

Referenced by dummy_hash().

◆ dummy_md5_sha1_master_secret_md5

const uint8_t dummy_md5_sha1_master_secret_md5[]
static
Initial value:
= {
0xed, 0x60, 0x7e, 0x6b, 0xce, 0xcb, 0x2c, 0xaf, 0x04, 0x19, 0xeb,
0xee, 0xbd, 0x35, 0xfa, 0x85, 0xc2, 0xcf, 0x5b, 0x5d, 0xea, 0x62,
0xae, 0xe2,
}

Dummy minimal TLSv1.0 test: master secret (MD5 portion).

Definition at line 727 of file tlskey_test.c.

727 {
728 0xed, 0x60, 0x7e, 0x6b, 0xce, 0xcb, 0x2c, 0xaf, 0x04, 0x19, 0xeb,
729 0xee, 0xbd, 0x35, 0xfa, 0x85, 0xc2, 0xcf, 0x5b, 0x5d, 0xea, 0x62,
730 0xae, 0xe2,
731};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_master_secret_sha1

const uint8_t dummy_md5_sha1_master_secret_sha1[]
static
Initial value:
= {
0xa2, 0x81, 0x2c, 0x2f, 0xbd, 0x69, 0x59, 0x19, 0xb8, 0xe5, 0x41,
0xfc, 0xb0, 0x63, 0x21, 0xbd, 0xd6, 0xca, 0x15, 0xab, 0xb1, 0x18,
0xea, 0x14
}

Dummy minimal TLSv1.0 test: master secret (SHA-1 portion).

Definition at line 734 of file tlskey_test.c.

734 {
735 0xa2, 0x81, 0x2c, 0x2f, 0xbd, 0x69, 0x59, 0x19, 0xb8, 0xe5, 0x41,
736 0xfc, 0xb0, 0x63, 0x21, 0xbd, 0xd6, 0xca, 0x15, 0xab, 0xb1, 0x18,
737 0xea, 0x14
738};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_client_verify

const uint8_t dummy_md5_sha1_client_verify[]
static
Initial value:
= {
0xc3, 0x50, 0x18, 0xee, 0x24, 0x70, 0x27, 0x6a, 0x98, 0xe0, 0xd0,
0x73
}

Dummy minimal TLSv1.0 test: client verification.

Definition at line 741 of file tlskey_test.c.

741 {
742 0xc3, 0x50, 0x18, 0xee, 0x24, 0x70, 0x27, 0x6a, 0x98, 0xe0, 0xd0,
743 0x73
744};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_server_verify

const uint8_t dummy_md5_sha1_server_verify[]
static
Initial value:
= {
0xcb, 0xa0, 0xc8, 0x13, 0x10, 0xc4, 0xba, 0xe1, 0x4c, 0xe3, 0x99,
0xeb
}

Dummy minimal TLSv1.0 test: server verification.

Definition at line 747 of file tlskey_test.c.

747 {
748 0xcb, 0xa0, 0xc8, 0x13, 0x10, 0xc4, 0xba, 0xe1, 0x4c, 0xe3, 0x99,
749 0xeb
750};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_client_traffic_key

const uint8_t dummy_md5_sha1_client_traffic_key[]
static
Initial value:
= {
0x0e, 0xa5, 0x90, 0xb8, 0x12, 0xa2, 0xf0, 0xe1, 0xaa, 0x0a, 0xba,
0x85, 0x8d, 0x73, 0xcd, 0x99
}

Dummy minimal TLSv1.0 test: client traffic key.

Definition at line 753 of file tlskey_test.c.

753 {
754 0x0e, 0xa5, 0x90, 0xb8, 0x12, 0xa2, 0xf0, 0xe1, 0xaa, 0x0a, 0xba,
755 0x85, 0x8d, 0x73, 0xcd, 0x99
756};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_client_traffic_iv

const uint8_t dummy_md5_sha1_client_traffic_iv[]
static
Initial value:
= {
0xac, 0x25, 0xe7, 0x78
}

Dummy minimal TLSv1.0 test: client traffic IV.

Definition at line 759 of file tlskey_test.c.

759 {
760 0xac, 0x25, 0xe7, 0x78
761};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_client_traffic_mac

const uint8_t dummy_md5_sha1_client_traffic_mac[]
static
Initial value:
= {
0x84, 0xe9, 0x05, 0xb6, 0xb0, 0x21, 0x71, 0x10, 0x93, 0xdd, 0xc7,
0x0b, 0xb8, 0x03, 0x3e, 0x14, 0x25, 0x69, 0xfe, 0xd6, 0xb3, 0x90,
0xf0, 0x0b, 0xa0, 0x9a, 0xff, 0x9b, 0x02, 0xc4, 0x3a, 0x49
}

Dummy minimal TLSv1.0 test: client traffic MAC.

Definition at line 764 of file tlskey_test.c.

764 {
765 0x84, 0xe9, 0x05, 0xb6, 0xb0, 0x21, 0x71, 0x10, 0x93, 0xdd, 0xc7,
766 0x0b, 0xb8, 0x03, 0x3e, 0x14, 0x25, 0x69, 0xfe, 0xd6, 0xb3, 0x90,
767 0xf0, 0x0b, 0xa0, 0x9a, 0xff, 0x9b, 0x02, 0xc4, 0x3a, 0x49
768};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_server_traffic_key

const uint8_t dummy_md5_sha1_server_traffic_key[]
static
Initial value:
= {
0x7a, 0xea, 0x6d, 0xb8, 0x9d, 0xa8, 0xc5, 0x64, 0x7c, 0xd7, 0x0d,
0xc4, 0x1a, 0xfa, 0x92, 0x26
}

Dummy minimal TLSv1.0 test: server traffic key.

Definition at line 771 of file tlskey_test.c.

771 {
772 0x7a, 0xea, 0x6d, 0xb8, 0x9d, 0xa8, 0xc5, 0x64, 0x7c, 0xd7, 0x0d,
773 0xc4, 0x1a, 0xfa, 0x92, 0x26
774};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_server_traffic_iv

const uint8_t dummy_md5_sha1_server_traffic_iv[]
static
Initial value:
= {
0xa0, 0xa9, 0x81, 0x33
}

Dummy minimal TLSv1.0 test: server traffic IV.

Definition at line 777 of file tlskey_test.c.

777 {
778 0xa0, 0xa9, 0x81, 0x33
779};

Referenced by dummy_md5_sha1().

◆ dummy_md5_sha1_server_traffic_mac

const uint8_t dummy_md5_sha1_server_traffic_mac[]
static
Initial value:
= {
0x39, 0x7b, 0x90, 0xd7, 0xc8, 0xe3, 0x11, 0x4b, 0x39, 0x47, 0x56,
0x6a, 0xe5, 0xb8, 0x40, 0x4e, 0x58, 0xad, 0x8a, 0x1a, 0xbf, 0x9a,
0x91, 0x40, 0x44, 0x7d, 0xa3, 0xd0, 0x0b, 0x42, 0xa8, 0x09
}

Dummy minimal TLSv1.0 test: server traffic MAC.

Definition at line 782 of file tlskey_test.c.

782 {
783 0x39, 0x7b, 0x90, 0xd7, 0xc8, 0xe3, 0x11, 0x4b, 0x39, 0x47, 0x56,
784 0x6a, 0xe5, 0xb8, 0x40, 0x4e, 0x58, 0xad, 0x8a, 0x1a, 0xbf, 0x9a,
785 0x91, 0x40, 0x44, 0x7d, 0xa3, 0xd0, 0x0b, 0x42, 0xa8, 0x09
786};

Referenced by dummy_md5_sha1().

◆ __self_test

struct self_test tlskey_test __self_test
Initial value:
= {
.name = "tlskey",
}
static void tlskey_test_exec(void)
Perform TLS key schedule self-test.

TLS key schedule self-test.

Definition at line 1335 of file tlskey_test.c.

1335 {
1336 .name = "tlskey",
1337 .exec = tlskey_test_exec,
1338};