diff options
Diffstat (limited to '49.md')
| -rw-r--r-- | 49.md | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -7,12 +7,12 @@ Private Key Encryption | |||
| 7 | 7 | ||
| 8 | `draft` `optional` | 8 | `draft` `optional` |
| 9 | 9 | ||
| 10 | This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a passphrase. | 10 | This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a password. |
| 11 | 11 | ||
| 12 | Symmetric Encryption Key derivation | 12 | Symmetric Encryption Key derivation |
| 13 | ----------------------------------- | 13 | ----------------------------------- |
| 14 | 14 | ||
| 15 | PASSPHRASE = read from the user | 15 | PASSWORD = read from the user |
| 16 | 16 | ||
| 17 | LOG\_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: | 17 | LOG\_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 | ||
| 27 | SALT = 16 random bytes | 27 | SALT = 16 random bytes |
| 28 | 28 | ||
| 29 | SYMMETRIC_KEY = scrypt(passphrase=PASSPHRASE, salt=SALT, log\_n=LOG\_N, r=8, p=1) | 29 | SYMMETRIC_KEY = scrypt(password=PASSWORD, salt=SALT, log\_n=LOG\_N, r=8, p=1) |
| 30 | 30 | ||
| 31 | The symmetric key should be 32 bytes long. | 31 | The symmetric key should be 32 bytes long. |
| 32 | 32 | ||