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

[seraphis] cryptonote_base: add account generators #8989

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

UkoeHB
Copy link
Contributor

@UkoeHB UkoeHB commented Sep 10, 2023

Summary

This is a PR in my 'upstreaming seraphis_lib project', it is not used anywhere yet.

  • Adds account_generators.h to cryptonote_basic.

Explanation

Multisig account generation is the same for ringct and seraphis, so it's best to reuse all that code if possible. The only difference is the base generators used. Refactoring multisig accounts to depend on account_generator_era will allow seraphis to be easily supported.

Future PRs

  • Refactor multisig accounts to use account_generator_era.
  • Introduce seraphis generators.


inline crypto::public_key get_secondary_generator(const account_generator_era era)
{
if (era == account_generator_era::cryptonote)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are they both meant to return G or is one supposed to return H?

Copy link
Contributor Author

@UkoeHB UkoeHB Sep 12, 2023

Choose a reason for hiding this comment

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

Both return G, it's for the spend and view keys (account generators not amount commitment generators).

Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet, just wanted to double check since Seraphis uses two different generators (I'm still woefully ignorant of the Crptonote multisig math).

Copy link
Contributor

@jeffro256 jeffro256 left a comment

Choose a reason for hiding this comment

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

Matches code in seraphis_lib, and looks to exhibit expected behavior while missing Seraphis generator options.

@luigi1111 luigi1111 merged commit 10f208f into monero-project:master Oct 26, 2023
17 of 18 checks passed
@UkoeHB UkoeHB deleted the account_generators branch February 22, 2024 01:04
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