File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,22 @@ Encrypted model attributes in your favourite ORM.
1313 * 128-bit authentication tag
1414* Additional authenticated data:
1515 * Key id: use different keys for different attributes (or different users),
16- rotate keys over time without re-encrypting
16+ rotate keys for new data over time without re-encrypting old data
1717 * Object id: prevent substitution of encrypted values
1818
1919All keys should be 32 bytes long, and cryptographically random. Manage these
20- keys as you would any other credentials (environment config, keychain, vault).
21- Generate keys with:
20+ keys as you would any other sensitive credentials (environment config, vault,
21+ keychain). You can generate random keys with this snippet :
2222```
2323node -p "require('crypto').randomBytes(32).toString('base64')"
2424```
2525
26+ Refer to [ NIST Special Publication 800-38D] ( http://doi.org/10.6028/NIST.SP.800-38D )
27+ for additional recommendations. In particular, you should pay attention to
28+ uniqueness requirements for keys and IVs, and constraints on the number of
29+ invocations with a given key (Section 8). These should inform key rotation
30+ policies.
31+
2632# Threat model
2733
2834This is designed to protect you from leaking sensitive user data under very
You can’t perform that action at this time.
0 commit comments