-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat!: update key parsing #5636
feat!: update key parsing #5636
Conversation
8745946
to
d570664
Compare
2a44798
to
e2b798c
Compare
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.
happy with this so far
1ef94cc
to
064f56d
Compare
29b42b4
to
b391c1a
Compare
Special attention should also be paid to the opcode and script stack changes. It was not clear what the intended handling was for providing verification message data to the relevant opcodes, nor how array data should be parsed to scalars for computation of Ristretto points in scripts. |
b391c1a
to
e0c4520
Compare
This PR now encompasses changes required from a Extra care should be taken to review the |
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.
Looking good, just 1 nit about an error type
cce0dd0
to
f984d50
Compare
52d931d
to
4b3cdcb
Compare
4b3cdcb
to
164b7b9
Compare
Marking as draft to make it clear that merging is blocked on dependency updates. Specifically, |
f8cc7a8
to
729c19b
Compare
729c19b
to
3a2f905
Compare
a816ff7
to
5dd8903
Compare
5dd8903
to
01fc2ba
Compare
Replacing with PR: #5900 so that it includes the tari_crypto release tag 0.19.0 instead of the github main branch |
Description
Updates key parsing to differentiate between canonical- and reduction-based use cases. Makes several updates to account for
EpochTime
changes. Updates genesis data.Motivation and Context
An update to
tari-crypto
differentiates secret key parsing between cases that should use canonical byte arrays, and those that use random byte arrays requiring modular wide reduction.This PR makes corresponding changes to account for this.
It also makes several updates required since the
tari_utilities
release used here also makes breakingEpochTime
changes that can't be cleanly done separately.How Has This Been Tested?
Existing tests pass. Uses of parsed secret keys have been manually inspected for correctness.
What process can a PR reviewer use to test or verify this change?
Assert that secret keys and scalars instantiated from byte arrays use the appropriate approach: parsing from canonical byte arrays, or modular wide reduction from uniform byte arrays.
Confirm that
EpochTime
changes reflect the intended logic, especially relating to timestamp and difficulty handling.BREAKING CHANGE: This modifies how secret keys and scalars are constructed, and is therefore a breaking change.