Skip to content
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

scrypt: relax check on log_n #546

Open
aawsome opened this issue Jan 7, 2025 · 3 comments
Open

scrypt: relax check on log_n #546

aawsome opened this issue Jan 7, 2025 · 3 comments

Comments

@aawsome
Copy link

aawsome commented Jan 7, 2025

Hi!

we are getting compatibility issues due to scrypt parameters which don't work on Rust scrypt, but work on e.g. Go (and obviously also in the scrypt C reference implementation). It seems like the RFC is too strict here by accident.

See rustic-rs/rustic#1394

There has been already a discussion about this in golang/go#33703 and the RFC errata is e.g. https://www.rfc-editor.org/errata/eid5971.

Is it possible to also relax that check in the Rust scrypt implementation to improve interoperability with software using the C or Go implementation?

@tarcieri
Copy link
Member

tarcieri commented Jan 7, 2025

Can you provide a small, self-contained reproduction of the issue?

@aawsome
Copy link
Author

aawsome commented Jan 7, 2025

@tarcieri sure, here it is:

assert!(scrypt::Params::new(18, 1, 5, 32).is_ok())

(currently, this fails due to the check on log_n)

@aawsome
Copy link
Author

aawsome commented Jan 7, 2025

I can provide a PR removing that check on log_n, if wanted.

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

No branches or pull requests

2 participants