EXPERIMENTAL — NOT PRODUCTION READY
ANONEURX BLACK CIPHER is experimental cryptographic research. The security of the current construction has not been established through sufficient independent cryptanalysis. Do not use it to protect production secrets.
Black Cipher is a Substitution-Permutation Network (SPN) block cipher designed for cryptographic research. It operates on 128-bit blocks with support for 128, 192, and 256-bit keys.
This project exists to explore SPN cipher design, conduct cryptanalysis, and attempt to break the construction before asking anyone to trust it.
Status: Experimental research — not audited, not production-ready.
- No independent peer review has been completed
- No formal security proof exists
- Extensive cryptanalysis is required before any security claims can be made
- Do not use this to protect real secrets
See SECURITY.md for the full security notice.
black-cipher/
├── src/
│ ├── lib.rs # BlackCipher struct, ECB mode, public API
│ ├── cipher.rs # SPN round operations (SubBytes, ShiftRows, MixColumns, AddRoundKey)
│ └── primitives/
│ ├── mod.rs # GF(2^8) arithmetic
│ ├── sbox.rs # AES S-box (FIPS 197), inverse S-box
│ └── key_schedule/
│ └── mod.rs # Round key expansion
├── tests/ # Integration tests
├── benches/ # Criterion benchmarks
├── fuzz/ # Fuzz testing harnesses
├── crypto-lab/ # Cryptanalysis research tools
│ ├── avalanche/
│ ├── differential/
│ ├── linear/
│ ├── reduced_round/
│ └── statistical/
├── docs/
│ ├── architecture.md # System architecture
│ ├── cryptographic-design.md # Algorithm design rationale
│ ├── security-model.md # Security goals and assumptions
│ ├── threat-model.md # Attacker capabilities and assets
│ ├── cryptanalysis.md # Research progress and results
│ ├── implementation-security.md # Implementation hardening notes
│ ├── testing.md # Test strategy and coverage
│ ├── benchmarks.md # Performance measurement methodology
│ └── security-review.md # Review process and checklist
├── Cargo.toml
├── SECURITY.md
├── CONTRIBUTING.md
└── LICENSE # Apache 2.0
use black_cipher::BlackCipher;
let key = [0xABu8; 32]; // 256-bit key — use a CSPRNG in real code
let cipher = BlackCipher::new(&key).expect("valid key length");
let mut block = [0x01u8; 16];
cipher.encrypt_block(&mut block);
// block is now encrypted
cipher.decrypt_block(&mut block);
// block is now decrypted back to [0x01u8; 16]| Parameter | Value |
|---|---|
| Type | SPN block cipher |
| Block size | 128 bits (16 bytes) |
| Key sizes | 128, 192, 256 bits |
| S-box | AES S-box (FIPS 197) |
| Rounds | 4 (research configuration) |
| Round function | SubBytes → ShiftRows → MixColumns → AddRoundKey |
| GF polynomial | 0x11b (irreducible) |
| Mode (current) | ECB (for block primitive) |
- Security first — performance is secondary; never reduce security margins for benchmarks
- Kerckhoffs's principle — assume the attacker knows everything except the key
- Transparency — all design decisions are documented with rationale
- Aggressive self-analysis — try to break it before asking anyone to trust it
- Avalanche testing and bit independence analysis
- Differential cryptanalysis (full and reduced rounds)
- Linear cryptanalysis
- Weak key search
- Related-key attack analysis
- Side-channel resistance evaluation
- Independent implementation for cross-validation
- AEAD mode construction
- Formal specification
cargo build
cargo test
cargo benchSee CONTRIBUTING.md. Cryptographic changes require thorough security analysis before merge.
Apache 2.0 — see LICENSE.