forked from jeremyevans/roda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch sessions plugin to use aes-256-ctr instead of aes-256-gcm
aes-256-gcm is basically aes-256-ctr plus a separate GMAC, but since a separate HMAC is used by the sessions plugin, having the cipher also MAC is unnecessary work. This makes the sessions 12 bytes smaller and a bit faster. This moves the use of the cookie key as part of the HMAC calculation, previously the key was used for the MAC part of the GCM cipher, but it's best to perform all authentication before any decryption. One other bonus for this is that aes-256-ctr works on ruby 1.9. Change the specs to use the sessions plugin for sessions support by default, and only use Rack::Session::Cookie for sessions support if the RODA_RACK_SESSION_COOKIE environment variable is set to 1.
- Loading branch information
1 parent
ca07614
commit c065cf9
Showing
3 changed files
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters