Skip to content

Commit 23d00b8

Browse files
committed
Add reference to NIST recommendations memo
1 parent e16082b commit 23d00b8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1919
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:
2222
```
2323
node -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

2834
This is designed to protect you from leaking sensitive user data under very

0 commit comments

Comments
 (0)