Encryption Pitfalls and Workarounds
summary
Compares two Ruby gems: attr_encrypted (flexible, per-record key support) and Cryptkeeper (simpler, single-app key, built-in search). Reports a real deployment with 15,000 users where Cryptkeeper’s plaintext search causes logins to stall; maintainer Joshua Priddle supplies an unsanctioned hash-based lookup workaround that rewrites find_by_email to restore uniqueness and search. Discusses tradeoffs: per-record keys for stronger security, hashing for searchable fields, and added CPU/storage costs when encrypting at scale.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:24How Encryption Works
- 1:34What is Encryption Anyway?
- 2:27Example
- 3:19Considerations
- 3:49What to encrypt?
- 4:52Risk Assessment
- 5:59Tools
- 6:41crypt_keeper
- 7:14Issues with Scale
related talks
23mEncrypted Search Party
38mActiveRecord::Encryption; Stop Hackers from...
34mKrypt the next level of Ruby Cryptogaphy
31mFast, highly effective database security using searchable encryption (without the yak shave)
41mNon-traditional Encryption Problems And Solutions
26mAdventures in Paranoia with Sinatra and Sequel
34mWhy your encrypted Database isn't secure: practical attacks against encrypted OSS databases
34mEncrypted Credentials on Rails 5.2: Secrets to Success
