2017-12-02 02:12:25 +08:00
|
|
|
/*
|
2018-01-18 21:12:46 +08:00
|
|
|
* Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
2017-12-02 02:12:25 +08:00
|
|
|
*
|
2018-12-06 20:38:06 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2017-12-02 02:12:25 +08:00
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
2018-02-12 22:27:02 +08:00
|
|
|
#ifndef HEADER_CURVE448_LCL_H
|
|
|
|
# define HEADER_CURVE448_LCL_H
|
|
|
|
# include "curve448utils.h"
|
2017-11-16 19:13:53 +08:00
|
|
|
|
|
|
|
int X448(uint8_t out_shared_key[56], const uint8_t private_key[56],
|
2017-11-17 01:18:57 +08:00
|
|
|
const uint8_t peer_public_value[56]);
|
2017-11-16 19:13:53 +08:00
|
|
|
|
|
|
|
void X448_public_from_private(uint8_t out_public_value[56],
|
2017-11-17 01:18:57 +08:00
|
|
|
const uint8_t private_key[56]);
|
2017-11-27 19:32:03 +08:00
|
|
|
|
2019-07-04 00:30:03 +08:00
|
|
|
int ED448_sign(OPENSSL_CTX *ctx, uint8_t *out_sig, const uint8_t *message,
|
|
|
|
size_t message_len, const uint8_t public_key[57],
|
|
|
|
const uint8_t private_key[57], const uint8_t *context,
|
|
|
|
size_t context_len);
|
2017-11-27 19:32:03 +08:00
|
|
|
|
2019-07-04 00:30:03 +08:00
|
|
|
int ED448_verify(OPENSSL_CTX *ctx, const uint8_t *message, size_t message_len,
|
2017-11-29 02:23:51 +08:00
|
|
|
const uint8_t signature[114], const uint8_t public_key[57],
|
2017-11-27 19:32:03 +08:00
|
|
|
const uint8_t *context, size_t context_len);
|
|
|
|
|
2019-07-04 00:30:03 +08:00
|
|
|
int ED448ph_sign(OPENSSL_CTX *ctx, uint8_t *out_sig, const uint8_t hash[64],
|
2017-11-29 02:23:51 +08:00
|
|
|
const uint8_t public_key[57], const uint8_t private_key[57],
|
2017-11-27 19:32:03 +08:00
|
|
|
const uint8_t *context, size_t context_len);
|
|
|
|
|
2019-07-04 00:30:03 +08:00
|
|
|
int ED448ph_verify(OPENSSL_CTX *ctx, const uint8_t hash[64],
|
|
|
|
const uint8_t signature[114], const uint8_t public_key[57],
|
|
|
|
const uint8_t *context, size_t context_len);
|
2017-11-27 19:32:03 +08:00
|
|
|
|
2019-07-04 00:30:03 +08:00
|
|
|
int ED448_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[57],
|
2017-11-29 02:23:51 +08:00
|
|
|
const uint8_t private_key[57]);
|
2018-02-12 22:27:02 +08:00
|
|
|
|
|
|
|
#endif /* HEADER_CURVE448_LCL_H */
|