Skip to content

Commit b63d7d7

Browse files
committed
Docs: Clang and SSL sys requirements
1 parent 9c94576 commit b63d7d7

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

bench_encryption.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,43 @@
33
44
This file contains benchmarks for various Rust encryption libraries using Criterion,
55
comparing AEAD (Authenticated Encryption with Associated Data) ciphers commonly used
6-
in the Noise Protocol Framework and TLS 1.2/1.3.
6+
in TLS 1.2/1.3 and the Noise Protocol Framework.
77
88
The benchmarks focus on:
99
- **AES-256-GCM**: Hardware-accelerated AEAD cipher
1010
- **ChaCha20-Poly1305**: Software-optimized AEAD cipher
1111
12-
For accurate stats aggregation, on each iteration, the whole file is scanned.
13-
Be warned, for large files, it may take a while!
14-
1512
The benchmarks are organized into three categories:
1613
1714
**Key Generation/Setup**:
18-
- ring key generation
15+
- Ring key generation
1916
- OpenSSL cipher initialization
2017
2118
**Encryption** (encrypting dataset tokens):
22-
- ChaCha20-Poly1305 via ring
23-
- AES-256-GCM via ring
19+
- ChaCha20-Poly1305 via Ring
20+
- AES-256-GCM via Ring
2421
- ChaCha20-Poly1305 IETF via OpenSSL
2522
- AES-256-GCM via OpenSSL
2623
- ChaCha20-Poly1305 IETF via libsodium
2724
- XChaCha20-Poly1305 IETF via libsodium (extended nonce)
2825
2926
**Decryption** (decrypting previously encrypted data):
30-
- ChaCha20-Poly1305 via ring
31-
- AES-256-GCM via ring
27+
- ChaCha20-Poly1305 via Ring
28+
- AES-256-GCM via Ring
3229
- ChaCha20-Poly1305 IETF via OpenSSL
3330
- AES-256-GCM via OpenSSL
3431
- ChaCha20-Poly1305 IETF via libsodium
3532
- XChaCha20-Poly1305 IETF via libsodium (extended nonce)
3633
37-
## Noise Protocol Framework & TLS Context
34+
## System Dependencies
3835
39-
These ciphers are commonly used in:
40-
- **Noise Protocol Framework**: ChaCha20-Poly1305 (most common), AES-256-GCM
41-
- **TLS 1.2/1.3**: AES-128-GCM, AES-256-GCM, ChaCha20-Poly1305
42-
- Often paired with SHA-256 for hashing/HMAC operations
36+
Before running these benchmarks, ensure the following system packages are installed:
37+
38+
```sh
39+
sudo apt install -y build-essential pkg-config libssl-dev libsodium-dev # for Ubuntu/Debian
40+
sudo dnf install -y gcc pkg-config openssl-devel libsodium-devel # for RHEL/Fedora
41+
brew install pkg-config openssl libsodium # for macOS
42+
```
4343
4444
## Usage Examples
4545
@@ -70,8 +70,6 @@ RUSTFLAGS="-C target-cpu=native" \
7070
STRINGWARS_FILTER="(cryption/openssl|cryption/ring)" \
7171
cargo criterion --features bench_encryption bench_encryption
7272
```
73-
74-
Note: AES-GCM benefits significantly from hardware acceleration (AES-NI on x86_64, AES extensions on ARM).
7573
"#]
7674
use std::hint::black_box;
7775

bench_hash.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The benchmarks are organized into three categories:
1717
- FoldHash
1818
- CRC32 (IEEE) via `crc32fast`
1919
- MurmurHash32 via `murmurhash32`
20-
- CityHash64 via `cityhash` (x86_64 only)
20+
- CityHash64 via `cityhash` (x86_64 & Clang only)
2121
2222
**Stateful Hashes** (incremental/streaming):
2323
- StringZilla `Hasher`
@@ -33,6 +33,16 @@ The benchmarks are organized into three categories:
3333
- SHA256 via `ring` (cryptographic)
3434
- SHA256 via `stringzilla` (cryptographic, stateless and stateful)
3535
36+
## System Dependencies
37+
38+
Before running these benchmarks, ensure the following system packages are installed:
39+
40+
```sh
41+
sudo apt install -y build-essential llvm-18-dev libclang-18-dev clang-18 # for Ubuntu/Debian
42+
sudo dnf install -y gcc llvm-devel clang-devel # for RHEL/Fedora
43+
brew install llvm clang # for macOS
44+
```
45+
3646
## Usage Examples
3747
3848
The benchmarks use environment variables to control the input dataset and mode:

0 commit comments

Comments
 (0)