xref: /freebsd/contrib/wpa/src/crypto/sha384.h (revision c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5)
15b9c547cSRui Paulo /*
25b9c547cSRui Paulo  * SHA384 hash implementation and interface functions
385732ac8SCy Schubert  * Copyright (c) 2015-2017, Jouni Malinen <j@w1.fi>
45b9c547cSRui Paulo  *
55b9c547cSRui Paulo  * This software may be distributed under the terms of the BSD license.
65b9c547cSRui Paulo  * See README for more details.
75b9c547cSRui Paulo  */
85b9c547cSRui Paulo 
95b9c547cSRui Paulo #ifndef SHA384_H
105b9c547cSRui Paulo #define SHA384_H
115b9c547cSRui Paulo 
125b9c547cSRui Paulo #define SHA384_MAC_LEN 48
135b9c547cSRui Paulo 
145b9c547cSRui Paulo int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem,
155b9c547cSRui Paulo 		       const u8 *addr[], const size_t *len, u8 *mac);
165b9c547cSRui Paulo int hmac_sha384(const u8 *key, size_t key_len, const u8 *data,
175b9c547cSRui Paulo 		size_t data_len, u8 *mac);
1885732ac8SCy Schubert int sha384_prf(const u8 *key, size_t key_len, const char *label,
19325151a3SRui Paulo 	       const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
2085732ac8SCy Schubert int sha384_prf_bits(const u8 *key, size_t key_len, const char *label,
21325151a3SRui Paulo 		    const u8 *data, size_t data_len, u8 *buf,
22325151a3SRui Paulo 		    size_t buf_len_bits);
23*c1d255d3SCy Schubert int tls_prf_sha384(const u8 *secret, size_t secret_len,
24*c1d255d3SCy Schubert 		   const char *label, const u8 *seed, size_t seed_len,
25*c1d255d3SCy Schubert 		   u8 *out, size_t outlen);
2685732ac8SCy Schubert int hmac_sha384_kdf(const u8 *secret, size_t secret_len,
2785732ac8SCy Schubert 		    const char *label, const u8 *seed, size_t seed_len,
2885732ac8SCy Schubert 		    u8 *out, size_t outlen);
295b9c547cSRui Paulo 
305b9c547cSRui Paulo #endif /* SHA384_H */
31