| 1 |
#ifndef AWS_CAL_ECC_H |
| 2 |
#define AWS_CAL_ECC_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#include <aws/cal/exports.h> |
| 8 |
#include <aws/common/byte_buf.h> |
| 9 |
#include <aws/common/common.h> |
| 10 |
|
| 11 |
AWS_PUSH_SANE_WARNING_LEVEL |
| 12 |
|
| 13 |
AWS_EXTERN_C_BEGIN |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
enum aws_hkdf_hmac_type { |
| 20 |
HKDF_HMAC_SHA512, |
| 21 |
}; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
AWS_CAL_API int aws_hkdf_derive( |
| 33 |
struct aws_allocator *allocator, |
| 34 |
enum aws_hkdf_hmac_type hmac_type, |
| 35 |
struct aws_byte_cursor ikm, |
| 36 |
struct aws_byte_cursor salt, |
| 37 |
struct aws_byte_cursor info, |
| 38 |
struct aws_byte_buf *out_buf, |
| 39 |
size_t length); |
| 40 |
|
| 41 |
typedef int(aws_hkdf_fn)( |
| 42 |
struct aws_allocator *allocator, |
| 43 |
enum aws_hkdf_hmac_type hmac_type, |
| 44 |
struct aws_byte_cursor ikm, |
| 45 |
struct aws_byte_cursor salt, |
| 46 |
struct aws_byte_cursor info, |
| 47 |
struct aws_byte_buf *out_buf, |
| 48 |
size_t length); |
| 49 |
|
| 50 |
AWS_CAL_API void aws_set_hkdf_fn(aws_hkdf_fn *fn); |
| 51 |
|
| 52 |
AWS_EXTERN_C_END |
| 53 |
AWS_POP_SANE_WARNING_LEVEL |
| 54 |
|
| 55 |
#endif |