-
Notifications
You must be signed in to change notification settings - Fork 29
Add domain to secretToScalar #818
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
base: release/v0.3.0-alpha.1-rc.0
Are you sure you want to change the base?
Changes from all commits
d761131
54a99e4
089f8df
7544633
a9eedb4
ebbed40
c7a24a0
79b11f1
d3fbecf
94bcb19
5c771b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,6 +150,16 @@ module Utils { | |
| * ## ID Derivation | ||
| * `accountId = persistentHash(secretKey)` | ||
| * | ||
| * @dev The absence of a domain-separation tag is DELIBERATE. This identifier | ||
| * is global by design: the same key material yields the same identity in | ||
| * every module deriving one, so a user who wishes to carry one identity | ||
| * across modules can. Modules wanting a per-deployment, unlinkable identity | ||
| * should not use this circuit. | ||
| * | ||
| * @dev NOT FOR PRIVATE DERIVATION. This returns an identifier, not a secret, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Untagged
|
||
| * and the construction is untagged. A circuit deriving a PRIVATE value from a | ||
| * secret MUST use its own domain-separation tag. | ||
| * | ||
| * @param {Bytes<32>} secretKey - A 32-byte cryptographically secure random value. | ||
| * | ||
| * @returns {Bytes<32>} accountId - The computed account identifier. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Tag position now differs across the library
🔵 followup: this mandates tag-first, while
ShieldedAccessControl.compact:744hashes[value, pad(32, "ShieldedAccessControl:nullifier")]tag-last.Write the rule down once (Utils or a crypto-conventions note) so a module copying SAC's shape for a private derivation does not recreate H-01.
added by claude (dev3-midnight-basic-review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrew-fleming will that be covered here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope, let's keep the PR focused on addressing the fix. The rule for this implementation is already documented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, out of scope. Filed as #854.
added by claude (dev3-midnight-basic-review)