upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/49.md
diff options
context:
space:
mode:
Diffstat (limited to '49.md')
-rw-r--r--49.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/49.md b/49.md
index becc586..6de05eb 100644
--- a/49.md
+++ b/49.md
@@ -7,12 +7,12 @@ Private Key Encryption
7 7
8`draft` `optional` 8`draft` `optional`
9 9
10This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a passphrase. 10This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a password.
11 11
12Symmetric Encryption Key derivation 12Symmetric Encryption Key derivation
13----------------------------------- 13-----------------------------------
14 14
15PASSPHRASE = read from the user 15PASSWORD = read from the user
16 16
17LOG\_N = Let the user or implementer choose one byte representing a power of 2 (e.g. 18 represents 262,144) which is used as the number of rounds for scrypt. Larger numbers take more time and more memory, and offer better protection: 17LOG\_N = Let the user or implementer choose one byte representing a power of 2 (e.g. 18 represents 262,144) which is used as the number of rounds for scrypt. Larger numbers take more time and more memory, and offer better protection:
18 18
@@ -26,7 +26,7 @@ LOG\_N = Let the user or implementer choose one byte representing a power of 2 (
26 26
27SALT = 16 random bytes 27SALT = 16 random bytes
28 28
29SYMMETRIC_KEY = scrypt(passphrase=PASSPHRASE, salt=SALT, log\_n=LOG\_N, r=8, p=1) 29SYMMETRIC_KEY = scrypt(password=PASSWORD, salt=SALT, log\_n=LOG\_N, r=8, p=1)
30 30
31The symmetric key should be 32 bytes long. 31The symmetric key should be 32 bytes long.
32 32