lsquic_hkdf.h revision 26e8f082
1/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */ 2#ifndef LSQUIC_HKDF_H 3#define LSQUIC_HKDF_H 1 4 5/* [draft-ietf-quic-tls-23] Section 5.2 */ 6#define HSK_SALT_BUF "\xc3\xee\xf7\x12\xc7\x2e\xbb\x5a\x11\xa7" \ 7 "\xd2\x43\x2b\xb4\x63\x65\xbe\xf9\xf5\x02" 8#define HSK_SALT_PRE29 ((unsigned char *) HSK_SALT_BUF) 9/* [draft-ietf-quic-tls-29] Section 5.2 */ 10#define HSK_SALT_PRE33 ((unsigned char *) \ 11 "\xaf\xbf\xec\x28\x99\x93\xd2\x4c\x9e\x97" \ 12 "\x86\xf1\x9c\x61\x11\xe0\x43\x90\xa8\x99") 13/* [draft-ietf-quic-tls-33] Section 5.2 */ 14#define HSK_SALT ((unsigned char *) \ 15 "\x38\x76\x2c\xf7\xf5\x59\x34\xb3\x4d\x17" \ 16 "\x9a\xe6\xa4\xc8\x0c\xad\xcc\xbb\x7f\x0a") 17#define HSK_SALT_SZ (sizeof(HSK_SALT_BUF) - 1) 18 19#define CLIENT_LABEL "client in" 20#define CLIENT_LABEL_SZ (sizeof(CLIENT_LABEL) - 1) 21#define SERVER_LABEL "server in" 22#define SERVER_LABEL_SZ (sizeof(SERVER_LABEL) - 1) 23 24void 25lsquic_qhkdf_expand (const struct env_md_st *, const unsigned char *secret, 26 unsigned secret_len, const char *label, uint8_t label_len, 27 unsigned char *out, uint16_t out_len); 28 29#endif 30