Crates.io | libsumatracrypt-rs |
lib.rs | libsumatracrypt-rs |
version | 0.5.0 |
source | src |
created_at | 2024-07-11 23:20:47.408958 |
updated_at | 2024-10-05 16:40:03.018735 |
description | A Rust Library For Cryptography |
homepage | https://github.com/Silene0259/libsumatracrypt-rs |
repository | https://github.com/Silene0259/libsumatracrypt-rs |
max_upload_size | |
id | 1300107 |
size | 99,415 |
libsumatracrypt-rs
is an open-source cryptography library written in pure-rust that is strictly-and-inherently secure-by-design, has ease of access, has strong documentation, and offers extensions of advanced cryptography (Zero-Knowledge Proofs, Homomorphic Encryption, Post-Quantum Cryptography) while maintaining a simple-to-use interface. It uses the Sumatracrypt-Standardized-API-Model
to offer an easy-to-use API interface that is hard to blunder by design. It has loads of documentation detailing out certain design choices, how it works under-the-hood, among other things.
It currently has the following cryptographic protocols implemented:
getrandom()
for getting operating system's cryptographically secure pseudorandom number generator (CSPRNG)FALCON1024
Dilithium3
libsumatracrypt-rs
is:
Easy-to-use
Pure-rust (so memory-safe)
Lightweight
Strictly secure by design with a hard focus made on security (including side-channel attacks and advanced adversaries)
Minimalistic, with minimal dependecies and optional dependecies
has standardized API known as Sumatracrypt-Standardized-API-Model
has a substancial amount of documentation, community-talk, and deep-dives into the code
has extensions that use Advanced Cryptography (like Zero-Knowledge Proofs, Homomorphic Encryption, Post-Quantum Cryptography, Verifiable Random Functions, Verifiable Delay Functions) with Standardized API known as sumatracryptadvanced-standardized-api
The purpose of libsumatracrypt-rs
is to make a lightweight, pure-rust, cryptography library available to more people with security at its core (defending against even the most advanced attacks, like side-channel attacks) while maintaing ease-of-access and easy-to-use API, even against advanced attackers.
It also wants to offer easy usage of more advanced cryptographic algorithms like Zero-Knowledge Proofs, Homomorphic Encryption, and Post-Quantum Cryptography to the general public with simple front-facing API.
The idea of development for future developers/contributors for libsumatracrypt-rs
is to remain:
Sumatra-Standardized-API-Model
.It also is meant to combat side-channel attacks and remain constant-time. Other security measures are also desirable.
Elliptic Curve Integrated Encryption Scheme (ECIES) on curve25519-dalek
is chosen as the primary choice for encryption.
RSA4096-OAEP uses the pure-rust rsa
crate. It only gener
PKCS#8 Note: uses LF
(\n
) by default for privacy so no-one can figure out where you generated the key from.
Zeroize/ZeroizeOnDrop
for all structsED25519 is a cryptographic digital signature algorithm that uses Curve25519.
PublicKey: 32-bytes (256 bits)
SecretKey: 32-bytes (256 bits)
Signature: 64 bytes (512 bits)
By default, all keys are encoded as a String
in upper-hexadecimal encoding and will result in 2*x
the size in characters. This means the public key is 64 characters long, the secret key is 64 characters long, and the signature is 128 characters long.
[Security] [Secret-Key-Generation] Secret Key comes from Operating-System CSPRNG of size 32-bytes as an array.
[Security] [Zeroize] Implements Zeroize/ZeroizeOnDrop
for all structs
The structs (ED25519PublicKey
, ED25519SecretKey
, ED25519Signature
) are stored as String
in Upper-Hexadecimal Encoding.
[u8;32]
| array
SumatraEncryptECIES
| Elliptic Curve Integrated Encryption Scheme (ECIES) over Twisted Edwards Curve25519 using AES-GCM and HKDF-SHA256 in pure-rust.ecies-ed25519
crate with the pure
feature flag.SumatraRSA4096
| RSA4096 using Optimal Asymmetric Encryption Padding (OAEP) in pure-rust.rsa
crateSumatraEd25519
| Constant-Time ED25519 Sinature Scheme in pure-rust.Ed25519 (view Website) is a cryptographic digital signature scheme that offers strong security with protection against various side-channel attacks and branching prediction. It is blazingly fast, offering
SumatraEd25519
offers strong security through its extensive use of the ed25519-dalek
crate for ED25519 signatures. These signatures offer strong security by remaining constant-time, implementing zeroize, and being less vulnerable to side-channel attacks. It uses Curve25519.
Constant-Time