#cryptography #helium #helium-crypto

helium-crypto

Helium Blockchain cryptography library

22 releases

new 0.9.0 Apr 17, 2025
0.8.4 Mar 26, 2024
0.8.3 Oct 16, 2023
0.7.3 Jul 13, 2023
0.6.1 Dec 28, 2022

#445 in Magic Beans

Download history 78/week @ 2024-12-28 245/week @ 2025-01-04 247/week @ 2025-01-11 298/week @ 2025-01-18 553/week @ 2025-01-25 342/week @ 2025-02-01 374/week @ 2025-02-08 473/week @ 2025-02-15 504/week @ 2025-02-22 1220/week @ 2025-03-01 2003/week @ 2025-03-08 1719/week @ 2025-03-15 515/week @ 2025-03-22 1147/week @ 2025-03-29 866/week @ 2025-04-05 949/week @ 2025-04-12

3,554 downloads per month
Used in angry-purple-tiger

Apache-2.0

140KB
3.5K SLoC

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.


Continuous Integration codecov

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>"

Dependencies

~11–29MB
~464K SLoC