diff options
| author | ocknamo <s14pes@gmail.com> | 2024-02-01 23:57:58 +0900 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2024-02-01 13:06:41 -0300 |
| commit | ffef063a44cc1431da39b9fe145bf2a8ff84f302 (patch) | |
| tree | 6385e6d01c1f0fbe2f66477169aea8edad9b8bbd /49.md | |
| parent | 735134a30123074202bdb4f1b66dd80a2006bf50 (diff) | |
fix: Correct PASSPHRASE to PASSWORD in NIP-49
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 | ||