This commit is contained in:
Vitor Pamplona 2024-09-24 09:46:40 -04:00 committed by GitHub
parent 6fa638eabc
commit ba56364586
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
82.md
View File

@ -82,19 +82,19 @@ The example below contains a Vision Prescription.
}
```
Kind `82`s SHOULD be NIP-59 gift wrapped using `kind:1059` to each receiving user for the best privacy.
Kind `82`s SHOULD be [gift wrapped](59.md) using `kind:1059` to each receiving user for the best privacy.
Kind `82` can also be included inside [NIP-17](17.md) DMs via (embed)[https://github.com/nostr-protocol/nips/pull/1078] events.
Kind `82` can also be included inside [NIP-17](17.md) DMs via [nembed](https://github.com/nostr-protocol/nips/pull/1078) events.
## Encrypted Wraps with Consent Management
Event `kind:32225` carries **secret-encrypted** medical information (kind:`82`) in it's `.content`.
Event `kind:32225` carries **secret-encrypted** medical information (kind:`82`) in its `.content`.
It uses 2 secrets:
- A viewing key pair that can decrypt the event, but not add or remove new users.
- A signing key pair that grants the authority to resign the event and thus can add and remove users that can decrypt it.
The private keys of each key pair are shared amoung participants via encrypted `key`-tags to each receiver.
The private keys of each key pair are shared among participants via encrypted `key`-tags to each receiver.
```js
val sign = nostr.generateKeyPair()
@ -153,12 +153,12 @@ val sign = nostr.generateKeyPair()
### Security
Relays don't have access to private key and thus cannot see the contents of this type. Client apps however, have a responsibility to NEVER display the secret in the UI and do not allow users to copy it outside of the event.
Relays don't have access to private keys and thus cannot see the contents of this type. Client apps however, have a responsibility to NEVER display the secret in the UI and do not allow users to copy it outside of the event.
It is expected that Health Information will be kept in specialized relays due to the nature of health data-regulations. By knowing the event kind, the relay operator knows this package contains health data and may accept or reject accoding to its authorized activitiy.
It is expected that Health Information will be kept in specialized relays due to the nature of health data regulations. By knowing the event kind, the relay operator knows this package contains health data and may accept or reject it according to its authorized activity.
### Editability of Content and Secrets
The author of a kind `32225` can not only change the resource at any time, but it can also change the secret that encrypts the content. If the secret leaks to unauthorized parties, the owner of the data can always individually reset the access to it.
It is expected that some jurisdictions require author to periodically rotate these secrets while maintaining access to the relevant people.
It is expected that some jurisdictions require an author to periodically rotate these secrets while maintaining access to the relevant people.