-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow r: 1, p: 8 in scrypt #61
Comments
It's compatible with scrypt spec. Using Instead, |
Got it, you're right. Thanks for your quickly reply https://datatracker.ietf.org/doc/html/rfc7914#section-2
|
There have been errata filed for RFC7914 that correct this "incorrect conversion between bits/bytes." https://www.rfc-editor.org/errata_search.php?rfc=7914
See the conversation here for more context. I got here via dependency rabbit hole of the Rabby wallet, which depends on @ethereumjs/wallet, which depends on ethereum-cryptography, which depends on @noble/hashes. Ironically, the issue is intra-organizational Paul vs Paul... the default settings for ethereum/eth-account's keystore write by @pacrob are incompatible with the keystore read ethereum/ethereum-js-cryptography by @paulmillr |
It actually looks like the defaults were fixed in eth-keyfile 0.7, but eth-account pins to >= 0.6, so they still generate files that noble-hashes won't read. That all said, the check is based on bad math, so should probably be a warning at most, rather than raising an error. |
That’s unfortunate, but, is relaxing the check really the best outcome? I’m not scrypt expert and will need to check if that doesn’t impact security etc. sure, there are some folks who’ve generated keys using wrong algorithms. Probably there are other ones, with bugs in algorithms, which make their implementations incompatible with everyone else. Is asking to be compatible with those a good thing? I think answer can be positive - but only when the library is popular. Is eth account popular? Has it ever been? |
It’s used by pretty much every Python web3 library, so I’d say it’s pretty
popular. Also, it doesn’t affect security afaik, the limit was essentially
a typo in the spec.
…On Wed, Aug 28, 2024 at 6:54 PM Paul Miller ***@***.***> wrote:
That’s unfortunate, but, is relaxing the check really the best outcome?
I’m not scrypt expert and will need to check if that doesn’t impact
security etc.
sure, there are some folks who’ve generated keys using wrong algorithms.
Probably there are other ones, with bugs in algorithms, which make their
implementations incompatible with everyone else. Is asking to be compatible
with those a good thing? I think answer can be positive - but only when the
library is popular. Is eth account popular? Has it ever been?
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBJQTT2BQX6L6HSGZ2LWZTZTZPLTAVCNFSM6AAAAABNIP3B52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJWGQZTINJVGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
For a little less "source: trust me, bro", the pypi stats for the Over 1m downloads a week is pretty significant. They've just updated their latest release to require a newer version of |
noble/scrypt
may incompatible with the WEB3 SECRET STORAGE DEFINITION
Confirmation by scrypt creator that it's ok: golang/go#33703 (comment) RFC errata that it's ok: https://www.rfc-editor.org/errata_search.php?rfc=7914 |
noble-hashes/src/scrypt.ts
Lines 110 to 118 in ba9d92f
Test vector from the Ethereum developer community
the cost 262144 here is over 65535(
2 ** (blockSize / 8
)The text was updated successfully, but these errors were encountered: