This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Replace libsecp256k1 with secp256k1 #10798
Merged
paritytech-processbot
merged 21 commits into
master
from
davxy-replace-libsecp256k1-with-secp256k1
Feb 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fd1fbff
Replace libsecp256k1 with secp256k1
davxy e200a83
Wipe ecdsa secret key from memory on drop
davxy 0ec1383
Some comments for a known issue
davxy 7165034
Safer core crypto primitives `from_slice` constructor
davxy 9e79db3
Unit test fix
davxy 7a8c4fd
Enable use of global secp256k1 context
davxy 6b66969
Better comments for ecdsa `Pair` drop
davxy d318328
Replace `libsecp256k1` with `seco256k1` in `beefy-mmr`
davxy d0f2b0a
Replace `libsecp256k1` with `secp256k1` in FRAME `contracts`benchmarks
davxy 712cf19
Temporary rollback of `beefy-mmr` to libsecp256k1
davxy be0ea83
Cargo fmt
davxy f4d525b
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy 1348472
Rollback of FRAME `contracts` benchmarks to `libsecp256k1`
davxy 548e8b6
Rollback for unrelated changes
davxy 8e23106
Typo fix
davxy 0ec0bd2
Add comments for deprecated `ecdsa_verify` and `secp256k1_ecdsa_recover`
davxy d3a5ec9
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy 35549b7
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy 45ee0d7
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy c711f82
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy 5442124
Merge branch 'master' into davxy-replace-libsecp256k1-with-secp256k1
davxy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wipe ecdsa secret key from memory on drop
- Loading branch information
commit e200a83fe9394a82d0dd52d64c1ab8d8c6e186b5
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice touch, but https://doc.rust-lang.org/core/ptr/fn.write_bytes.html might perform better on some platforms and is also more expressive. Also, have you considered
Seedis also an important secret?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.
It looks like
zeroizeis already a dependency. You could use it here: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.
Unfortunately the
secp256k1::SecretKeydoesn't implementDefaultIsZeroesnorZeroizetraits :-/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.
write_volatileis less performant but it is guaranteed to not be elided or reordered by the compiler especially with optimizations enabledThere 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.
Is there a test for this cleanup anywhere?