lsquic_hkdf.h revision 92f6e17b
15392f7a3SLiteSpeed Tech/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */ 25392f7a3SLiteSpeed Tech#ifndef LSQUIC_HKDF_H 35392f7a3SLiteSpeed Tech#define LSQUIC_HKDF_H 1 45392f7a3SLiteSpeed Tech 592f6e17bSDmitri Tikhonov/* [draft-ietf-quic-tls-23] Section 5.2 */ 692f6e17bSDmitri Tikhonov#define HSK_SALT_BUF "\xc3\xee\xf7\x12\xc7\x2e\xbb\x5a\x11\xa7" \ 792f6e17bSDmitri Tikhonov "\xd2\x43\x2b\xb4\x63\x65\xbe\xf9\xf5\x02" 85392f7a3SLiteSpeed Tech#define HSK_SALT ((unsigned char *) HSK_SALT_BUF) 95392f7a3SLiteSpeed Tech#define HSK_SALT_SZ (sizeof(HSK_SALT_BUF) - 1) 105392f7a3SLiteSpeed Tech 115392f7a3SLiteSpeed Tech#define CLIENT_LABEL "client in" 125392f7a3SLiteSpeed Tech#define CLIENT_LABEL_SZ (sizeof(CLIENT_LABEL) - 1) 135392f7a3SLiteSpeed Tech#define SERVER_LABEL "server in" 145392f7a3SLiteSpeed Tech#define SERVER_LABEL_SZ (sizeof(SERVER_LABEL) - 1) 155392f7a3SLiteSpeed Tech 165392f7a3SLiteSpeed Techvoid 175392f7a3SLiteSpeed Techlsquic_qhkdf_expand (const struct env_md_st *, const unsigned char *secret, 185392f7a3SLiteSpeed Tech unsigned secret_len, const char *label, uint8_t label_len, 195392f7a3SLiteSpeed Tech unsigned char *out, uint16_t out_len); 205392f7a3SLiteSpeed Tech 215392f7a3SLiteSpeed Tech#endif 22