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.
13
13
* 128-bit authentication tag
14
14
* Additional authenticated data:
15
15
* 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
17
17
* Object id: prevent substitution of encrypted values
18
18
19
19
All 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 :
22
22
```
23
23
node -p "require('crypto').randomBytes(32).toString('base64')"
24
24
```
25
25
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
+
26
32
# Threat model
27
33
28
34
This is designed to protect you from leaking sensitive user data under very
You can’t perform that action at this time.
0 commit comments