From 4668545cde4a9945c2d26dc8674dff61037b154c Mon Sep 17 00:00:00 2001 From: David Caseria Date: Mon, 25 Nov 2024 11:24:37 -0500 Subject: [PATCH] Clarify abbreviated keyset id length --- 02.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02.md b/02.md index 83002ea..b1efa55 100644 --- a/02.md +++ b/02.md @@ -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.