Crates.io | diem-crypto |
lib.rs | diem-crypto |
version | 0.0.3 |
source | src |
created_at | 2021-03-05 22:26:53.616949 |
updated_at | 2021-10-04 17:43:13.439892 |
description | Diem diem-crypto |
homepage | https://diem.com |
repository | https://github.com/diem/diem |
max_upload_size | |
id | 364574 |
size | 254,499 |
The crypto component hosts all the implementations of cryptographic primitives we use in Diem: hashing, signing, and key derivation/generation. The parts of the library using traits.rs contains the crypto API enforcing type safety, verifiable random functions, EdDSA & MultiEdDSA signatures.
Diem makes use of several cryptographic algorithms:
crypto/src
├── hash.rs # Hash function (SHA-3)
├── hkdf.rs # HKDF implementation (HMAC-based Extract-and-Expand Key Derivation Function based on RFC 5869)
├── macros/ # Derivations for SilentDebug and SilentDisplay
├── utils.rs # Serialization utility functions
├── lib.rs
├── ed25519.rs # Ed25519 implementation of the signing/verification API in traits.rs
├── multi_ed25519.rs # MultiEd25519 implementation of the signing/verification API in traits.rs
├── x25519.rs # X25519 wrapper
├── test_utils.rs
├── traits.rs # New API design and the necessary abstractions
└── unit_tests/ # Tests
Note: This crate historically had support for BLS12381, ECVRF, and SlIP-0010, though were removed due to lack of use. The last git revision before there removal is 00301524.