Skip to content

Commit

Permalink
Clarify abbreviated keyset id length
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcaseria committed Nov 25, 2024
1 parent abae74b commit 4668545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 02.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A keyset `id` is an identifier for a specific keyset. It can be derived by anyon

The keyset `id` is in each `Proof` so it can be used by wallets to identify which mint and keyset it was generated from. The keyset field `id` is also present in the `BlindedMessages` sent to the mint and `BlindSignatures` returned from the mint (see [NUT-00][00]).

To save space, a `Token`, as defined in [NUT-00][00], **SHOULD** contain an abbreviated version of the keyset `id` in the `Proof`. The length of the abbreviated `id` **MUST** be at least eight bytes (i.e., the version byte and the first seven bytes of the hash). However, while unlikely, when the token is serialized, the chosen `id` length **MUST** not be ambiguous within the mint's existing keyset `id`s. A wallet **MUST** resolve the abbreviated keyset `id` to the full `id`. If the abbreviated `id` is ambiguous (i.e., multiple keyset `id`s are resolvable), the wallet **MUST** error. The full keyset `id` is only needed when the wallet interacts with the mint.
To save space, a `Token`, as defined in [NUT-00][00], **SHOULD** contain an abbreviated version of the keyset `id` in the `Proof`, (the `s_id`). The length of the `s_id` **MUST** be eight bytes (i.e., the version byte and the first seven bytes of the hash: `id_bytes[:8]` or `id_hex[:16]`). A wallet **MUST** resolve the abbreviated keyset `id` to the full `id`. If the abbreviated `s_id` is ambiguous (i.e., multiple keyset `id`s are resolvable), the wallet **MUST** error. The full keyset `id` is only needed when the wallet interacts with the mint.

A Wallet **SHOULD** save the full-length keyset `id` with proofs in its database.

Expand Down

0 comments on commit 4668545

Please sign in to comment.