Skip to content

Commit

Permalink
feat: GrumpkinScalar type (#1919)
Browse files Browse the repository at this point in the history
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](AztecProtocol/aztec-packages#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]>
  • Loading branch information
3 people authored and AztecBot committed Sep 7, 2023
1 parent 4c456a2 commit ca42322
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/src/barretenberg/common/serialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ __extension__ using uint128_t = unsigned __int128;
// NOLINTBEGIN(cppcoreguidelines-pro-type-reinterpret-cast, cert-dcl58-cpp)
// clang-format on

template <typename T>
concept IntegralOrEnum = std::integral<T> || std::is_enum_v<T>;
template <typename T> concept IntegralOrEnum = std::integral<T> || std::is_enum_v<T>;

namespace serialize {
// Forward declare derived msgpack methods
Expand Down

0 comments on commit ca42322

Please sign in to comment.