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 support for OTP secret key encryption #62

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

monfresh
Copy link
Collaborator

Why:
To provide an additional layer of security.
The TOTP spec (RFC 6238) recommends encrypting the keys.
http://tools.ietf.org/html/rfc6238

How:
Borrow the encryption code from the attr_encrypted gem and use it to
encrypt and decrypt the otp_secret_key attribute.

Allow users to add encryption by passing in encrypted: true to
has_one_time_password. This provides backwards-compatibility for
existing users of the gem.

See the README updates for more detailed instructions for both new
and existing users.

@monfresh monfresh force-pushed the fix/51-encrypt-otp-secret branch 2 times, most recently from ba8da31 to 4b1c87e Compare December 31, 2015 15:23
**Why**:
To provide an additional layer of security.
The TOTP spec (RFC 6238) recommends encrypting the keys.
http://tools.ietf.org/html/rfc6238

**How**:
Borrow the encryption code from the `attr_encrypted` gem and use it to
encrypt and decrypt the `otp_secret_key` attribute.

Allow users to add encryption by passing in `encrypted: true` to
`has_one_time_password`. This provides backwards-compatibility for
existing users of the gem.

See the README updates for more detailed instructions for both new
and existing users.
@monfresh
Copy link
Collaborator Author

monfresh commented Jan 8, 2016

Hi @Houdini. Have you had a chance to review this PR? I'd love to know what you think. Thanks!

@Houdini
Copy link
Owner

Houdini commented Jan 11, 2016

@monfresh Hello, thanks for commit.
I make you collaborator for this repository, so you can make changes faster.
Your code looks good, so I don't see any reasons for hard verification.
Thanks again.

Houdini added a commit that referenced this pull request Jan 11, 2016
Add support for OTP secret key encryption
@Houdini Houdini merged commit b4a589d into Houdini:master Jan 11, 2016
@monfresh
Copy link
Collaborator Author

Thank you, Dmitrii!

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

Successfully merging this pull request may close these issues.

2 participants