Fides is a wrapper for hashing with blake3, asymmetric cryptography on curve 25519 and symmetric cryptography with chacha20poly1305 written in Rust.
In your Cargo.toml
:
```
[dependencies] fides = "2.0.0"
```
Hashing
```
use fides::hash;
let blake3_hash: [u8;32] = hash(&bytes);
```
Symmetric Encryption
```
use fides::chacha20poly1305::encrypt;
let cipher: Vec
```
Symmetric Decryption
```
use fides::chacha20poly1305::decrypt;
let plain: Vec
```
Asymmetric Private Key Generation
```
use fides::Ed25519::private_key;
let privkey: [u8;32] = privatekey();
```
Asymmetric Public Key Generation
```
use fides::Ed25519::public_key;
let pubkey: [u8;32] = publickey(&priv_key);
```
Asymmetric Shared Key Generation
```
use fides::x25519::shared_key;
let sharedsecretkey: [u8;32] = sharedkey(&privkey, &otherpartypub_key);
```
Asymmetric Message Signing
```
use fides::Ed25519::sign;
let signature: [u8; 64] = sign(&message, &privkey, &pubkey);
```
Asymmetric Message Verification
```
use fides::Ed25519::verify;
let verification: bool = verify(&message, &signerpublickey, &signature);
```
Pull requests, bug reports and any kind of suggestion are welcome.
2022-02-26