rails/rails — pull request #6952 by NZKoz (2012-07-04 00:47:20+00:00)
Title: Add ActiveSupport::KeyGenerator as a simple wrapper around PBKDF2

As part of the changes for Rails4 we want to sort out all the cryptography related things we have in place right now. The first part of this will be to add PBKDF2 for key derivation, then we can switch the session store and cookies.signed to use derived keys instead of using the bare secret.

Similarly future functionality like encrypted cookies / sessions can utilize derived keys.

So before merging I want to get some feedback from @meder and @thaidn on the particulars of our implementation. In particular, what are suitable default values for `iterations` and `key_size`.

This is a pre-requisite for #3955 #5034 and possibly others.

Note to other committers: Please leave this one for me to merge