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

Add scrypt support #109

Merged
merged 3 commits into from
Mar 23, 2017
Merged

Add scrypt support #109

merged 3 commits into from
Mar 23, 2017

Conversation

rhenium
Copy link
Member

@rhenium rhenium commented Feb 14, 2017

OpenSSL 1.1.0 exposes the scrypt algorithm as EVP_PBE_scrypt().

Two changes in this PR:

  • Add new OpenSSL::KDF module. OpenSSL::PKCS5.pbkdf2_hmac is moved to the new namespace.
  • Add OpenSSL::KDF.scrypt

@rhenium rhenium force-pushed the topic/kdf-module branch 3 times, most recently from 97f5606 to 2888a85 Compare February 23, 2017 16:23
Introduce a new OpenSSL::KDF module as a namespace for to-be-added
KDFs. This makes it easier to add new KDFs in future.

We already have a stand-alone KDF, OpenSSL::PKCS5.pbkdf2_hmac. This is
migrated to the new namespace. The backwards compatibility is retained
by the method defined in the newly added lib/openssl/pkcs5.rb.
As a wrapper of NUM2ULONG() or NUM2ULL(). Converts a Ruby object to
uint64_t, raising an exception if the conversion fails.
Add OpenSSL::KDF.scrypt as a wrapper around EVP_PBE_scrypt(). This is
added by OpenSSL 1.1.0.
@rhenium rhenium merged commit 850fb5e into ruby:master Mar 23, 2017
@bdewater bdewater mentioned this pull request Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant