[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mistake in FORMAT; question about N.
1.
I believe there's a mistake in FORMAT file. It says that the last HMAC is
for data only, while in reality it includes the header as well:
96+X 32 HMAC-SHA256(bytes 96 .. 96 + (X - 1))
must be
96+X 32 HMAC-SHA256(bytes 0 .. 96 + (X - 1))
2.
Regarding the N parameter in scrypt KDF.
The comment in crypto_scrypt.h says:
The parameter N must be a power of 2 greater than 1.
The code accepts N == 1:
if (((N & (N - 1)) != 0) || (N == 0)) {
// .. error ..
}
1 & (1-1) == 0, so it passes the check.
My question is, should N be greater than 1 or >= 1?
(I realize that in practice it should be much larger).
3.
I've implemented scrypt in Go:
KDF -- https://github.com/dchest/scrypt
file encryption tool -- https://github.com/dchest/scryptutil
PS Sorry if the message is duplicate -- I sent it before realizing that I
wasn't subscribed.
PPS Someone just dropped nuclear bombs on my cities. How do I bring people
back to life?
--
Dmitry Chestnykh
http://www.codingrobots.org