mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
fix: Correct PASSPHRASE to PASSWORD in NIP-49
This commit is contained in:
parent
735134a301
commit
ffef063a44
6
49.md
6
49.md
|
@ -7,12 +7,12 @@ Private Key Encryption
|
||||||
|
|
||||||
`draft` `optional`
|
`draft` `optional`
|
||||||
|
|
||||||
This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a passphrase.
|
This NIP defines a method by which clients can encrypt (and decrypt) a user's private key with a password.
|
||||||
|
|
||||||
Symmetric Encryption Key derivation
|
Symmetric Encryption Key derivation
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
PASSPHRASE = read from the user
|
PASSWORD = read from the user
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ LOG\_N = Let the user or implementer choose one byte representing a power of 2 (
|
||||||
|
|
||||||
SALT = 16 random bytes
|
SALT = 16 random bytes
|
||||||
|
|
||||||
SYMMETRIC_KEY = scrypt(passphrase=PASSPHRASE, salt=SALT, log\_n=LOG\_N, r=8, p=1)
|
SYMMETRIC_KEY = scrypt(password=PASSWORD, salt=SALT, log\_n=LOG\_N, r=8, p=1)
|
||||||
|
|
||||||
The symmetric key should be 32 bytes long.
|
The symmetric key should be 32 bytes long.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user