21 releases
0.8.4 | Mar 26, 2024 |
---|---|
0.8.3 | Oct 16, 2023 |
0.8.0 | Aug 5, 2023 |
0.7.3 | Jul 13, 2023 |
0.6.1 | Dec 28, 2022 |
#53 in #key-pair
1,490 downloads per month
Used in angry-purple-tiger
140KB
3.5K
SLoC
helium-crypto-rs
This library implements various cryptographic functions used by Helium Blockchain. This includes creating keypairs for supported key types signing messages and verifying messages with public keys. Public keys support binary and B58 encode/decoding as used by the Helium blockchain.
See the library documentation for usage details.
Using
Add a dependency to your projects Cargo.toml
:
helium-crypto = "<version>"
lib.rs
:
Crypto primitives used by various Helium blockchain and wallet services.
The library exposes Elliptic Curve (ECC) NIST P-256 (secp256r1), Certicom's SECG SEC2 K-256 (secp256k1), and ED25519 keypairs based on the excellent work done by the RustCrypto and Dalek cryptography projects.
The secp256r1 public keys currently representable on the Helium blockchain are only those that satisfy the "ECC Compact" strategy described in a Victor Miller paper, which compresses keys to just their X-coordinate. For this reason, such keys are called "ecc_compact" rather than "secp256r1".
The intended implemenation strategy in this crate allows for keypair implementations where the private key is based external to the software, such as an ECC608 chip or an HSM.
Dependencies
~10–27MB
~441K SLoC