mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix the ED448 key lengths
Unlike X448 the key lengths for ED448 are 57 bytes (as opposed to 56) Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5105)
This commit is contained in:
parent
ff489fb472
commit
22bcc9cb7f
@ -7,20 +7,20 @@ void X448_public_from_private(uint8_t out_public_value[56],
|
||||
const uint8_t private_key[56]);
|
||||
|
||||
int ED448_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
|
||||
const uint8_t public_key[56], const uint8_t private_key[56],
|
||||
const uint8_t public_key[57], const uint8_t private_key[57],
|
||||
const uint8_t *context, size_t context_len);
|
||||
|
||||
int ED448_verify(const uint8_t *message, size_t message_len,
|
||||
const uint8_t signature[112], const uint8_t public_key[56],
|
||||
const uint8_t signature[114], const uint8_t public_key[57],
|
||||
const uint8_t *context, size_t context_len);
|
||||
|
||||
int ED448ph_sign(uint8_t *out_sig, const uint8_t hash[64],
|
||||
const uint8_t public_key[56], const uint8_t private_key[56],
|
||||
const uint8_t public_key[57], const uint8_t private_key[57],
|
||||
const uint8_t *context, size_t context_len);
|
||||
|
||||
int ED448ph_verify(const uint8_t hash[64], const uint8_t signature[112],
|
||||
const uint8_t public_key[56], const uint8_t *context,
|
||||
int ED448ph_verify(const uint8_t hash[64], const uint8_t signature[114],
|
||||
const uint8_t public_key[57], const uint8_t *context,
|
||||
size_t context_len);
|
||||
|
||||
int ED448_public_from_private(uint8_t out_public_key[56],
|
||||
const uint8_t private_key[56]);
|
||||
int ED448_public_from_private(uint8_t out_public_key[57],
|
||||
const uint8_t private_key[57]);
|
||||
|
@ -364,7 +364,7 @@ decaf_error_t decaf_ed448_verify_prehash (
|
||||
}
|
||||
|
||||
int ED448_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
|
||||
const uint8_t public_key[56], const uint8_t private_key[56],
|
||||
const uint8_t public_key[57], const uint8_t private_key[57],
|
||||
const uint8_t *context, size_t context_len)
|
||||
{
|
||||
|
||||
@ -375,7 +375,7 @@ int ED448_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
|
||||
|
||||
|
||||
int ED448_verify(const uint8_t *message, size_t message_len,
|
||||
const uint8_t signature[112], const uint8_t public_key[56],
|
||||
const uint8_t signature[114], const uint8_t public_key[57],
|
||||
const uint8_t *context, size_t context_len)
|
||||
{
|
||||
return decaf_ed448_verify(signature, public_key, message, message_len, 0,
|
||||
@ -383,7 +383,7 @@ int ED448_verify(const uint8_t *message, size_t message_len,
|
||||
}
|
||||
|
||||
int ED448ph_sign(uint8_t *out_sig, const uint8_t hash[64],
|
||||
const uint8_t public_key[56], const uint8_t private_key[56],
|
||||
const uint8_t public_key[57], const uint8_t private_key[57],
|
||||
const uint8_t *context, size_t context_len)
|
||||
{
|
||||
return decaf_ed448_sign_prehash(out_sig, private_key, public_key, hash,
|
||||
@ -391,16 +391,16 @@ int ED448ph_sign(uint8_t *out_sig, const uint8_t hash[64],
|
||||
|
||||
}
|
||||
|
||||
int ED448ph_verify(const uint8_t hash[64], const uint8_t signature[112],
|
||||
const uint8_t public_key[56], const uint8_t *context,
|
||||
int ED448ph_verify(const uint8_t hash[64], const uint8_t signature[114],
|
||||
const uint8_t public_key[57], const uint8_t *context,
|
||||
size_t context_len)
|
||||
{
|
||||
return decaf_ed448_verify_prehash(signature, public_key, hash, context,
|
||||
context_len) == DECAF_SUCCESS;
|
||||
}
|
||||
|
||||
int ED448_public_from_private(uint8_t out_public_key[56],
|
||||
const uint8_t private_key[56])
|
||||
int ED448_public_from_private(uint8_t out_public_key[57],
|
||||
const uint8_t private_key[57])
|
||||
{
|
||||
return decaf_ed448_derive_public_key(out_public_key, private_key)
|
||||
== DECAF_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user