Update 108.md

NIP-04 takes the users sk and the gated note creator's pk

Co-authored-by: Asai Toshiya <to.asai.60@gmail.com>
This commit is contained in:
Christian Krueger 2023-10-19 09:53:39 -06:00 committed by GitHub
parent 5b501c0ed7
commit cab55281f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
108.md
View File

@ -121,7 +121,7 @@ APP.get("/:noteId/:paymentHash")
### Encryption/Decryption ### Encryption/Decryption
To encrypt/decrypt `kind:56` key notes, we use [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md)'s encrypt/decrypt functions between the gated note's creator's pubkey and your pubkey. To encrypt/decrypt `kind:56` key notes, we use [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md)'s encrypt/decrypt functions between the gated note's creator's pubkey and your prikey.
To encrypt/decrypt the gated note, we use `aes-256-cbc`. Below is a simple implementation in ts: To encrypt/decrypt the gated note, we use `aes-256-cbc`. Below is a simple implementation in ts: