You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a GrumpkinScalar type and use it to represent encryption private key.
Requirements:
Create a GrumpkinScalar type in both Noir and TS. In Noir, the scalar should be represented as 2 fields because the Field type native in Noir is "smaller" than the scalar field of grumpkin. The struct should look like this:
struct GrumpkinScalar {
low : Field,
high : Field
}
The get_secret_key oracle call should return it instead of Field.
The text was updated successfully, but these errors were encountered:
Fixes#1912
**Note 1**: I removed the Signer interface as the difference in private
key types between `Grumpkin` and `secp256k1` made it impractical. Now we
have a special type only for the "`Grumpkin` key" and the `secp256k1`
key is represented as either as a `Buffer` or as `0x${string}` (in case
of publisher private key).
**Note 2**: I changed some of the hardcoded private keys because they
didn't fit to `GrumpkinScalar` and auto-reduction is no longer allowed.
**Note 3**: The way we get Grumpkin private key from mnemonic is
insecure so I've created [this
issue](#2052) for
it.
# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
---------
Co-authored-by: spypsy <[email protected]>
Co-authored-by: PhilWindle <[email protected]>
Introduce a
GrumpkinScalar
type and use it to represent encryption private key.Requirements:
Create a
GrumpkinScalar
type in both Noir and TS. In Noir, the scalar should be represented as 2 fields because theField
type native in Noir is "smaller" than the scalar field of grumpkin. The struct should look like this:The
get_secret_key
oracle call should return it instead ofField
.The text was updated successfully, but these errors were encountered: