Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mandatory DLEQs to nut-22 #222

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Egge21M
Copy link
Contributor

@Egge21M Egge21M commented Feb 6, 2025

This addition makes sure that AuthProofs can not be pinned by enforcing NUT-12 DLEQ proofs on signature reponses

@@ -183,8 +183,16 @@ and make the request as we usually would.

`AuthProofs` are single-use. The wallet MUST delete the `AuthProof` after a successful request, and SHOULD delete it even if request results in an error. If the wallet runs out of `AuthProofs`, it can [mint new ones](#minting-blind-authentication-tokens) using its clear authentication token (CAT).

### DLEQs

To prevent a mint pinning blind authentication token wallets SHOULD check that the returned `AuthProofs` contain a valid DLEQ as defined in [NUT-12](./12.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note in NUT-12 we say wallets MUST verify proofs on signatures, should we say the same here to be consistent?

https://github.com/cashubtc/nuts/blob/main/12.md#alice-minting-user-verifies-dleq-proof

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the semantics TBH. My thought process was that while it would be better for wallets to check this, it would not break the functionality of the NUT or compatibility with mints / wallets if they don't.

## Mint

### DLEQs

The mint MUST return a DLEQ proof with all signatures it returns as defined in [NUT-12](./12.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The mint MUST return a DLEQ proof with all signatures it returns as defined in [NUT-12](./12.md)
The mint MUST return DLEQ proofs for every signature it returns as defined in [NUT-12](./12.md)

@@ -183,8 +183,16 @@ and make the request as we usually would.

`AuthProofs` are single-use. The wallet MUST delete the `AuthProof` after a successful request, and SHOULD delete it even if request results in an error. If the wallet runs out of `AuthProofs`, it can [mint new ones](#minting-blind-authentication-tokens) using its clear authentication token (CAT).

### DLEQs

To prevent a mint pinning blind authentication token wallets SHOULD check that the returned `AuthProofs` contain a valid DLEQ as defined in [NUT-12](./12.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To prevent a mint pinning blind authentication token wallets SHOULD check that the returned `AuthProofs` contain a valid DLEQ as defined in [NUT-12](./12.md).
To prevent pinning, wallets MUST validate the DLEQ proofs contained in each `AuthProof` as defined in [NUT-12](./12.md).

Copy link
Contributor

@callebtc callebtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add the dleq field to the definition of AuthProof if we make it mandatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants