-
Notifications
You must be signed in to change notification settings - Fork 224
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
Make crypto implementations replaceable #1238
Commits on Nov 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 62dda70 - Browse repository at this point
Copy the full SHA 62dda70View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7920c3 - Browse repository at this point
Copy the full SHA b7920c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4b52de - Browse repository at this point
Copy the full SHA c4b52deView commit details -
Configuration menu - View commit details
-
Copy full SHA for a35c105 - Browse repository at this point
Copy the full SHA a35c105View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47b56bf - Browse repository at this point
Copy the full SHA 47b56bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d0fc38 - Browse repository at this point
Copy the full SHA 2d0fc38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cbcbb3 - Browse repository at this point
Copy the full SHA 6cbcbb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6edade - Browse repository at this point
Copy the full SHA e6edadeView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcd6be0 - Browse repository at this point
Copy the full SHA bcd6be0View commit details -
tendermint: Remove ED25519_SIGNATURE_SIZE
It has been deprecated for some time.
Configuration menu - View commit details
-
Copy full SHA for 7f5e812 - Browse repository at this point
Copy the full SHA 7f5e812View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fecdef - Browse repository at this point
Copy the full SHA 3fecdefView commit details -
Disentangle CryptoProvider from k256 crate
The API needs to be abstract, so make p256k1 signature an associated type of CryptoProvider.
Configuration menu - View commit details
-
Copy full SHA for 4a511c5 - Browse repository at this point
Copy the full SHA 4a511c5View commit details -
Guarded by the rust-crypto feature, this is an implementation of CryptoProvider with pure Rust crates.
Configuration menu - View commit details
-
Copy full SHA for 9575852 - Browse repository at this point
Copy the full SHA 9575852View commit details
Commits on Nov 18, 2022
-
Move CryptoProvider definition out of the crypto module into the provider sub-module. Rename default_provider to default.
Configuration menu - View commit details
-
Copy full SHA for 3573ef0 - Browse repository at this point
Copy the full SHA 3573ef0View commit details -
tendermint: generalize hash methods
Add generic methods Header::hash_with and ValidatorSet::hash_with enabling a custom CryptoProvider to be plugged in for calculating hashes. The .hash() methods, implemented with the DefaultCryptoProvider, are feature-gated behind "rust-crypto".
Configuration menu - View commit details
-
Copy full SHA for 2baed4f - Browse repository at this point
Copy the full SHA 2baed4fView commit details -
tendermint: eliminate get_split_point helper
2usize.next_power_of_two() / 1 == 1, and we have eliminated the other two explicitly matched cases at the call site, so the non-catchall match branches and the panics are dead code.
Configuration menu - View commit details
-
Copy full SHA for a032364 - Browse repository at this point
Copy the full SHA a032364View commit details
Commits on Nov 21, 2022
-
light-client: eliminate Hasher
The Hasher trait is obviated by CryptoProvider. Also, we could do with less dynamic dispatching.
Configuration menu - View commit details
-
Copy full SHA for f264742 - Browse repository at this point
Copy the full SHA f264742View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0eee32 - Browse repository at this point
Copy the full SHA f0eee32View commit details
Commits on Nov 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ce146c8 - Browse repository at this point
Copy the full SHA ce146c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a65669 - Browse repository at this point
Copy the full SHA 4a65669View commit details
Commits on Nov 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d39148d - Browse repository at this point
Copy the full SHA d39148dView commit details
Commits on Nov 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4503794 - Browse repository at this point
Copy the full SHA 4503794View commit details
Commits on Dec 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f1d9593 - Browse repository at this point
Copy the full SHA f1d9593View commit details -
Break down CryptoProvider into functional traits
Instead of a super-trait whose sole purpose is to bind down some associated types that provide the actual functionality, provide: - Sha256, a purpose-specific trait for SHA256 hashing that has a more human-friendly interface than rust-crypto. - Nothing else for signing and verifying! These are covered by the signature framework, and it's easy to plug into that as the alt_crypto test demonstrates. The crypto::default module, gated by the "rust-crypto" feature, provides aliases for pure Rust implementations.
Configuration menu - View commit details
-
Copy full SHA for ec3cf88 - Browse repository at this point
Copy the full SHA ec3cf88View commit details -
alt_crypto test: Roll our own signature type
An alt implementation would not be able to reuse the signature type from k256.
Configuration menu - View commit details
-
Copy full SHA for 5a2dfe5 - Browse repository at this point
Copy the full SHA 5a2dfe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58c113a - Browse repository at this point
Copy the full SHA 58c113aView commit details -
Configuration menu - View commit details
-
Copy full SHA for dcabd56 - Browse repository at this point
Copy the full SHA dcabd56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76a3fce - Browse repository at this point
Copy the full SHA 76a3fceView commit details
Commits on Dec 2, 2022
-
Disentangle CommitValidator from the hasher
Remove the only purpose for using a hasher in the implementation by returning the set of validators in VerificationErrorDetail::FaultySigner. CommitValidator can now revert to being a (weird) default-implemented trait, with a ProdCommitValidator to anchor the implementation.
Configuration menu - View commit details
-
Copy full SHA for a9c86f2 - Browse repository at this point
Copy the full SHA a9c86f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79af98a - Browse repository at this point
Copy the full SHA 79af98aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5ec595 - Browse repository at this point
Copy the full SHA c5ec595View commit details -
Recover LightClient::verify_backward
A critical code block was hastily commented out in this "unstable" part of code.
Configuration menu - View commit details
-
Copy full SHA for 4f73378 - Browse repository at this point
Copy the full SHA 4f73378View commit details
Commits on Dec 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 41efc0b - Browse repository at this point
Copy the full SHA 41efc0bView commit details
Commits on Dec 7, 2022
-
tendermint: Make sha2 an optional dependency
Use the Sha2 alias from crypto::default instead of the direct references to sha2 crate. All code that used Sha2 non-generically is feature-gated behind "rust-crypto".
Configuration menu - View commit details
-
Copy full SHA for 6365d49 - Browse repository at this point
Copy the full SHA 6365d49View commit details
Commits on Dec 13, 2022
-
Redesign crypto::Sha256, add MerkleHash trait
The host API for obtaining SHA256 digests on Substrate is a simple function, it cannot work incrementally. Change the Sha256 trait to match this, but provide a MerkleHash trait to retain incremental Merkle hashing with Rust-Crypto conformant digest implementations. The merkle::NonIncremental adapter type is provided to fit the lowest common denominator Sha256 API to a Merkle hash implementation, at the cost of some allocations and extra copying.
Configuration menu - View commit details
-
Copy full SHA for 58425b5 - Browse repository at this point
Copy the full SHA 58425b5View commit details
Commits on Dec 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1bb92a9 - Browse repository at this point
Copy the full SHA 1bb92a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 079ec41 - Browse repository at this point
Copy the full SHA 079ec41View commit details -
tendermint: "rust-crypto" does not imply "k256"
Also rename crypto::default::ecdsa_secp256 to ecdsa_secp256k1, to harmonize the naming with the feature that gates this module.
Configuration menu - View commit details
-
Copy full SHA for 1133fd9 - Browse repository at this point
Copy the full SHA 1133fd9View commit details
Commits on Dec 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4a38c73 - Browse repository at this point
Copy the full SHA 4a38c73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 374303c - Browse repository at this point
Copy the full SHA 374303cView commit details -
Configuration menu - View commit details
-
Copy full SHA for adb6327 - Browse repository at this point
Copy the full SHA adb6327View commit details -
Configuration menu - View commit details
-
Copy full SHA for eac7b5a - Browse repository at this point
Copy the full SHA eac7b5aView commit details
Commits on Jan 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 24573b9 - Browse repository at this point
Copy the full SHA 24573b9View commit details
Commits on Jan 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2a7f441 - Browse repository at this point
Copy the full SHA 2a7f441View commit details
Commits on Jan 24, 2023
-
tendermint: crypto::signature::Verifier trait
Define Verifier trait to abstract signature verification given a PublicKey. The ed25519-consensus dependency is made optional and gated by the "rust-crypto" feature. The Verifier implementation is provided for a dummy type crate::crypto::default::signature::Verifier, using ed25519-consensus. The Ed25519 key types in public_key and private_key module are redefined to in-crate newtypes.
Configuration menu - View commit details
-
Copy full SHA for d525562 - Browse repository at this point
Copy the full SHA d525562View commit details -
Configuration menu - View commit details
-
Copy full SHA for 672db2d - Browse repository at this point
Copy the full SHA 672db2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d7ee0a - Browse repository at this point
Copy the full SHA 3d7ee0aView commit details -
tendermint: remove re-exports from signature crate
As we don't currently use the signature framework, it makes no sense to provide its traits through the crate.
Configuration menu - View commit details
-
Copy full SHA for 3acfa23 - Browse repository at this point
Copy the full SHA 3acfa23View commit details -
tendermint: rework signature in alt_crypto test
Implement the new Verifier trait instead of the signature traits.
Configuration menu - View commit details
-
Copy full SHA for 2b49f63 - Browse repository at this point
Copy the full SHA 2b49f63View commit details
Commits on Jan 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3741884 - Browse repository at this point
Copy the full SHA 3741884View commit details
Commits on Jan 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5ef4502 - Browse repository at this point
Copy the full SHA 5ef4502View commit details