Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

scrypt example not compliant with RFC 7914 #674

Open
michaelsbradleyjr opened this issue Aug 18, 2019 · 1 comment
Open

scrypt example not compliant with RFC 7914 #674

michaelsbradleyjr opened this issue Aug 18, 2019 · 1 comment

Comments

@michaelsbradleyjr
Copy link

michaelsbradleyjr commented Aug 18, 2019

See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition/_compare/fc9278af8e362db0132118a8e4b21c5fde5b26d2...0f6da3f1c9476621b6d6826a80ffbab3b9cc12d3

The revision comment is: "reverting previous change - test result was calculated with inverted values".

However r=1, p=8 is quite problematic. See:

ethereum/go-ethereum#19977
golang/go#33703
nodejs/node#28799 (comment)

Summary: the test result was calculated with values that are not compliant with RFC 7914 (nor the original paper) that defines scrypt (N < 2^(128 * r / 8)) must be true). The likely explanation is that the test result was calculated with the help of Go's scrypt implementation, which itself is not compliant with the RFC (see the golang/go issue linked above).

This is already resulting in portability problems and some careful thought needs to be given as to how the situation can be remedied without causing a "breaking change" fiasco.

@michaelsbradleyjr michaelsbradleyjr changed the title scrypt example not compliant with RFC 7914? scrypt example not compliant with RFC 7914 Aug 18, 2019
@tniessen
Copy link

I found the mistake in the RFC and filed errata a few months ago. See 5971, 5972, and 5973.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants