Crates.io | aptos-crypto-link |
lib.rs | aptos-crypto-link |
version | 0.0.3 |
source | src |
created_at | 2022-11-07 06:38:41.126131 |
updated_at | 2022-11-07 06:38:41.126131 |
description | Aptos crypto |
homepage | https://aptoslabs.com |
repository | https://github.com/aptos-labs/aptos-core |
max_upload_size | |
id | 707022 |
size | 376,403 |
The crypto component hosts all the implementations of cryptographic primitives we use in Aptos: hashing, signatures, multisignatures, aggregate signatures, and key derivation/generation.
To enforce type-safety for signature schemes, we rely on traits from traits.rs
and validatable.rs
.
Aptos makes use of several cryptographic algorithms:
Before implementing a cryptographic primitive, be sure to read traits.rs
and validatable.rs
to understand how to comply with our API as well as some of the security concerns involved.
crypto/src
├── bls12-381/ # Boneh-Lynn-Shacham (BLS) signatures over (Barreto-Lynn-Scott) BLS12-381 curves
├── unit_tests/ # Unit tests
├── lib.rs
├── ed25519/ # Ed25519 implementation of the signing/verification API in traits.rs
├── hash.rs # Hash function (SHA-3)
├── hkdf.rs # HKDF implementation
├── multi_ed25519.rs # MultiEd25519 implementation of the signing/verification API in traits.rs
├── noise.rs # Noise Protocol Framework implementation
├── test_utils.rs
├── traits.rs # Traits for safer implementations of signature schemes
├── validatable.rs # Traits for deferring validation of group elements (e.g., public keys, signatures)
└── x25519.rs # X25519 implementation