Skip to content

Commit

Permalink
Remove all mentions of salt from repo and use :per_attribute_iv mode …
Browse files Browse the repository at this point in the history
…by default
  • Loading branch information
ribose-jeffreylau committed Mar 12, 2019
1 parent 9d5b4aa commit f1862af
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/rails/keyserver/key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def save_fingerprint; end

attr_encrypted :private,
key: Engine.config.encryption_key,
mode: :per_attribute_iv_and_salt
mode: Engine.config.try(:encryption_mode) || :per_attribute_iv

scope :primary, -> {
pkg = arel_table[:primary_key_grip]
Expand Down
1 change: 0 additions & 1 deletion db/migrate/20180822000001_create_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def up
t.string :owner_type
t.binary :public
t.binary :encrypted_private
t.binary :encrypted_private_salt
t.binary :encrypted_private_iv
t.datetime :activation_date
t.text :metadata
Expand Down
1 change: 0 additions & 1 deletion spec/models/rails/key/pgp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -640,5 +640,4 @@
# - read rails pub & pri
# - Remove private key once a new key is activated
# - Change encryption key of the new key when it is encrypted
# use salt
end
1 change: 0 additions & 1 deletion spec/test_app/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
t.string "owner_type"
t.binary "public"
t.binary "encrypted_private"
t.binary "encrypted_private_salt"
t.datetime "activation_date"
t.text "metadata"
t.datetime "created_at"
Expand Down

0 comments on commit f1862af

Please sign in to comment.