mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
Some style fixes
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5105)
This commit is contained in:
parent
e411822318
commit
04ebd4e17e
@ -29,8 +29,8 @@ static c448_error_t oneshot_hash(uint8_t *out, size_t outlen,
|
||||
return C448_FAILURE;
|
||||
|
||||
if (!EVP_DigestInit_ex(hashctx, EVP_shake256(), NULL)
|
||||
|| !EVP_DigestUpdate(hashctx, in, inlen)
|
||||
|| !EVP_DigestFinalXOF(hashctx, out, outlen)) {
|
||||
|| !EVP_DigestUpdate(hashctx, in, inlen)
|
||||
|| !EVP_DigestFinalXOF(hashctx, out, outlen)) {
|
||||
EVP_MD_CTX_free(hashctx);
|
||||
return C448_FAILURE;
|
||||
}
|
||||
@ -69,9 +69,9 @@ static c448_error_t hash_init_with_dom(EVP_MD_CTX *hashctx, uint8_t prehashed,
|
||||
return C448_FAILURE;
|
||||
|
||||
if (!EVP_DigestInit_ex(hashctx, EVP_shake256(), NULL)
|
||||
|| !EVP_DigestUpdate(hashctx, dom_s, strlen(dom_s))
|
||||
|| !EVP_DigestUpdate(hashctx, dom, sizeof(dom))
|
||||
|| !EVP_DigestUpdate(hashctx, context, context_len))
|
||||
|| !EVP_DigestUpdate(hashctx, dom_s, strlen(dom_s))
|
||||
|| !EVP_DigestUpdate(hashctx, dom, sizeof(dom))
|
||||
|| !EVP_DigestUpdate(hashctx, context, context_len))
|
||||
return C448_FAILURE;
|
||||
|
||||
return C448_SUCCESS;
|
||||
@ -165,10 +165,11 @@ c448_error_t c448_ed448_sign(
|
||||
|
||||
/* Hash to create the nonce */
|
||||
if (!hash_init_with_dom(hashctx, prehashed, 0, context, context_len)
|
||||
|| !EVP_DigestUpdate(hashctx, expanded + EDDSA_448_PRIVATE_BYTES,
|
||||
EDDSA_448_PRIVATE_BYTES)
|
||||
|| !EVP_DigestUpdate(hashctx, message, message_len)) {
|
||||
OPENSSL_cleanse(expanded, sizeof(expanded));
|
||||
|| !EVP_DigestUpdate(hashctx,
|
||||
expanded + EDDSA_448_PRIVATE_BYTES,
|
||||
EDDSA_448_PRIVATE_BYTES)
|
||||
|| !EVP_DigestUpdate(hashctx, message, message_len)) {
|
||||
OPENSSL_cleanse(expanded, sizeof(expanded));
|
||||
goto err;
|
||||
}
|
||||
OPENSSL_cleanse(expanded, sizeof(expanded));
|
||||
|
@ -159,9 +159,8 @@ mask_t gf_eq(const gf a, const gf b)
|
||||
gf_sub(c, a, b);
|
||||
gf_strong_reduce(c);
|
||||
|
||||
for (i = 0; i < NLIMBS; i++) {
|
||||
for (i = 0; i < NLIMBS; i++)
|
||||
ret |= c->limb[LIMBPERM(i)];
|
||||
}
|
||||
|
||||
return word_is_zero(ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user