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

Ability to encrypt to a per-row symmetric key #6

Open
rjharmon opened this issue Dec 18, 2009 · 4 comments
Open

Ability to encrypt to a per-row symmetric key #6

rjharmon opened this issue Dec 18, 2009 · 4 comments

Comments

@rjharmon
Copy link

Hi again,

We want to symmetrically encrypt certain data to a key that's provided by the model object. Particularly, we're encrypting it to a secret answer known only to the user. We'd like to encrypt it without the asymmetric encryption - looks pretty easy to adjust in Strongbox::Lock. Would you entertain a patch for that?

For background, we're going to encrypt the secret answer using the normal method, and in the security perimeter we'll be able to then conduct operations that require the decrypted answer - like encrypting new bits of data using it as a symmetric key. Then, at times when the user chooses to enter their secret answer, we can provide some limited decryption for that user's need, while preventing mass exposure of decryptable content to an attacker.

Thoughts?

Randy

@rjharmon
Copy link
Author

P.s. I'm contemplating an option :key_proc => :symbol or Proc.new do { |instance| ... } to fetch the symmetric key used to encrypt the data. In the example, that routine would return either an instance variable (set by the controller from the user's manual input) or the decrypted secret answer (if the code is running inside the security perimeter).

@rjharmon
Copy link
Author

rjharmon commented Jan 6, 2010

This functionality is now available in my fork. Docs and tests are included.

@davidw
Copy link

davidw commented Nov 24, 2011

This sounds really useful, and it's similar to a change I'd likely need to add myself, to a project. Anything ever come of this?

@rjharmon
Copy link
Author

David, the changes are there in my fork. I suggest reviewing the changes in detail to determine whether they meet your needs.

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