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

Public Shares in the Session Object #12

Open
jesseposner opened this issue Aug 6, 2024 · 2 comments
Open

Public Shares in the Session Object #12

jesseposner opened this issue Aug 6, 2024 · 2 comments

Comments

@jesseposner
Copy link
Collaborator

I believe the 2 places that pubshares are used are (1) deriving the 33-byte group public key and (2) verifying a partial signature.

To accomplish (1), the BIP requires all pubshares be saved to the session object. But wouldn't it be more efficient to simply save the 33-byte group public key to the session object rather than the pubshares? For (2), PartialSigVerify would only need the individual public share for the sig being verified.

@siv2r
Copy link
Owner

siv2r commented Aug 8, 2024

The BIP prioritizes the readability and simplicity of the algorithms over their efficiency. This is mentioned in the General Signing Flow section:

To simplify the specification of the algorithms, some intermediary values are unnecessarily recomputed from scratch, e.g., when executing GetSessionValues multiple times. Actual implementations can cache these values. As a result, the Session Context may look very different in implementations or may not exist at all.

Therefore, an implementation isn't required to strictly follow the defined data structure and can optimize it as needed.

We can observe this in the case of MuSig2. While BIP327 defines the Session Context with individual public keys, the session object in the implementation does not include any public keys, not even the group public key.

@siv2r
Copy link
Owner

siv2r commented Aug 8, 2024

group public key to the session object rather than the pubshares

I initially considered this design but chose to use pubshares because they clearly identify the participants in the signing session. However, we could also argue that replacing pubshares with the group pubkey would not impact this clarity, as our session object, unlike BIP327, includes participant identifiers.

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

No branches or pull requests

2 participants