lsquic_hkdf.h revision 4051ae3a
1/* Copyright (c) 2017 - 2020 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 ((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#define HSK_SALT_SZ (sizeof(HSK_SALT_BUF) - 1) 14 15#define CLIENT_LABEL "client in" 16#define CLIENT_LABEL_SZ (sizeof(CLIENT_LABEL) - 1) 17#define SERVER_LABEL "server in" 18#define SERVER_LABEL_SZ (sizeof(SERVER_LABEL) - 1) 19 20void 21lsquic_qhkdf_expand (const struct env_md_st *, const unsigned char *secret, 22 unsigned secret_len, const char *label, uint8_t label_len, 23 unsigned char *out, uint16_t out_len); 24 25#endif 26