Round up the size of the secret parts after splitting it in two.
This commit is contained in:
parent
95e1cc36d3
commit
b99656d84a
1 changed files with 2 additions and 2 deletions
|
@ -71,6 +71,6 @@ bool prf(char *secret, size_t secretlen, char *seed, size_t seedlen, char *out,
|
|||
|
||||
memset(out, 0, outlen);
|
||||
|
||||
return prf_xor(NID_sha512, secret, secretlen / 2, seed, seedlen, out, outlen)
|
||||
&& prf_xor(NID_whirlpool, secret, secretlen / 2, seed, seedlen, out, outlen);
|
||||
return prf_xor(NID_sha512, secret, (secretlen + 1) / 2, seed, seedlen, out, outlen)
|
||||
&& prf_xor(NID_whirlpool, secret + secretlen / 2, (secretlen + 1) / 2, seed, seedlen, out, outlen);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue