-
Notifications
You must be signed in to change notification settings - Fork 215
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!: change signature construction to allow better HW support #5282
feat!: change signature construction to allow better HW support #5282
Conversation
base_layer/core/src/transactions/transaction_components/transaction_input.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_components/transaction_kernel.rs
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_components/transaction_output.rs
Show resolved
Hide resolved
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.
utACK
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.
I'm surprised to see no tests being updated, which probably means we are not checking for maleablity in tests
The reason we do not see tests updated is that the signatures are generated using the |
140802e
to
873af53
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.
utACK
Description --- Resets the dates for the following networks: Esmeralda: Today Nextnet: April 14th Stagenet: Jun 14 Motivation and Context --- For Nextnet and Stagenet these are the dates when these changes come into effect. Esmeralda had a new Gen block as of PR #5282 How Has This Been Tested? --- Unit tests What process can a PR reviewer use to test or verify this change? --- Breaking Changes --- - [x] None - [x] Requires data directory on base node to be deleted - [x] Requires hard fork - [x] Other - Please specify New Gen block, requires network reset <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain --> Co-authored-by: Cayle Sharrock <CjS77@users.noreply.github.com>
Description
Changes the challenges of all signatures to not be
Hash(Key||Nonce||Feat_1||Feat_2||..||Feat_x)
but ratherHash(Key||Nonce||Hash(Feat_1||Feat_2||..||Feat_x))
Adds the version to the kernel signature as this is currently not checked.
Motivation and Context
This is done because hardware devices need to sign all the data they need to be sent over to the hardware device to be signed. If we have to send all the features over this becomes quite significant in bytes. This is now changed to only send the
message
field as a single 32-byte array and this still comments to all the features.The kernel version is technically malleable as the version is not committed to in the signature, this is now fixed.
How Has This Been Tested?
All tests pass
What process can a PR reviewer use to test or verify this change?
Make sure all chain signatures are changed.
Adds version to Kernel signature
Breaking Changes
Change all chain signature challenges: Kernel, Script, Metadata
Complete chain reset.
BREAKING CHANGE: Complete chain reset