b4ae 2.1.3

B4AE (Beyond For All Encryption) - Quantum-resistant secure communication protocol
Documentation
[package]
name = "b4ae"
version = "2.1.3"
edition = "2021"
authors = ["B4AE Team"]
description = "B4AE (Beyond For All Encryption) - Quantum-resistant secure communication protocol"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rafaelsistems/B4AE-Beyond-For-All-Encryption-"
documentation = "https://docs.rs/b4ae"
homepage = "https://github.com/rafaelsistems/B4AE-Beyond-For-All-Encryption-"
readme = "README.md"
keywords = ["cryptography", "post-quantum", "encryption", "security", "messaging"]
exclude = [
    # Subdirektori non-library
    "elara/", ".github/", "docs/", "research/", "specs/", "specs/**",
    "bindings/", "bindings/**",
    "b4ae-android/", "b4ae-ffi/", "b4ae-wasm/", "wasm-demo/",
    "b4ae-android-app/", "b4ae-android-app/**",
    "fuzz/", "scripts/", "tla/",
    # Docker & CI
    "Dockerfile", "docker-compose.yml", ".dockerignore",
    "docker-publish.ps1", "docker-publish.sh",
    ".gitignore", ".gitmodules", ".gitlab-ci.yml",
    # File konfigurasi dev
    "cbindgen.toml", "Cargo.toml.orig", "Cargo.lock",
    # Dokumen internal dev (tidak untuk publik)
    "AUDIT_FAKTUAL_KODEBASE.md",
    "CI_WORKFLOW_FIXES.md",
    "COMMIT_PLAN.md",
    "GIT_STATUS_ANALYSIS.md",
    "DOCKER_BUILD_PUBLISH_GUIDE.md",
    "DOCKER_DEPLOYMENT_STATUS.md",
    "DOCKER_PUBLISH_SUMMARY.md",
    "DOCKER_QUICK_START.md",
    "DOCKER_DEPLOYMENT_STATUS.md",
    "IMPLEMENTATION_SUMMARY.md",
    "PRODUCTION_ASSESSMENT.md",
    "SECURITY_AUDIT_REPORT.md",
    "STABILITAS_PROYEK.md",
    "CONTRIBUTORS.md",
    "pending_files.txt",
    "remove_sensitive_docs.sh",
    # Dokumen release & panduan (sudah ada di repo, tidak perlu di crates.io)
    "RELEASE_NOTES_*.md",
    "TESTING_GUIDE.md",
    "CONTRIBUTING.md",
    "CHANGELOG.md",
]
categories = ["cryptography", "network-programming"]

[dependencies]
# Post-Quantum Cryptography (NIST PQC Standards)
pqcrypto-mlkem = { version = "0.1", optional = true }     # ML-KEM-1024 (menggantikan Kyber — FIPS 203)
pqcrypto-mldsa = { version = "0.1", optional = true }     # ML-DSA-87 (menggantikan Dilithium5 — FIPS 204)
pqcrypto-traits = "0.3"
# Crate lama dipertahankan untuk backward compatibility
pqcrypto-kyber = { version = "0.8", optional = true }
pqcrypto-dilithium = { version = "0.5", optional = true }

# Classical Cryptography
ring = "0.17"
x25519-dalek = { version = "2.0", features = ["static_secrets"] }
curve25519-dalek = "4.0"
sha2 = "0.10"
aes-gcm = "0.10"
chacha20poly1305 = "0.10"
sha3 = "0.10"
hkdf = "0.12"

# Utilities
hex = "0.4"
zeroize = { version = "1.7", features = ["derive"] }
# Pin 0.8 to avoid rand 0.10 (breaking API, Edition 2024)
rand = "=0.8.5"
thiserror = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"
subtle = "2.5"  # Constant-time comparison untuk mencegah timing attacks
bloomfilter = "1.0"  # Bloom filter for replay protection

# Async runtime
tokio = { version = "1.35", features = ["full"], optional = true }
async-trait = "0.1"

# Networking
quinn = { version = "0.11", optional = true }

# ELARA Transport (UDP, NAT traversal via STUN, packet delivery)
elara-transport = { version = "0.1", optional = true }

# SOCKS5 proxy (IP anonymization, Tor)
socks = { version = "0.3", optional = true }

# Logging
tracing = "0.1"
tracing-subscriber = "0.3"

# HSM (PKCS#11)
cryptoki = { version = "0.11", optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1.4"
tokio-test = "0.4"

[features]
default = ["pqcrypto-alt", "full-crypto"]
full-crypto = ["pqcrypto-mlkem", "pqcrypto-mldsa"]
pqcrypto-alt = ["pqcrypto-mlkem", "pqcrypto-mldsa"]      # Gunakan NIST standards terbaru sebagai default
async = ["tokio"]
networking = ["quinn", "tokio"]
elara = ["elara-transport", "tokio"]
proxy = ["socks"]
hsm = []
hsm-pkcs11 = ["hsm", "cryptoki"]
v2_protocol = []

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true

# Faster CI builds (avoids 6h timeout on macOS/Windows runners)
[profile.ci]
inherits = "release"
lto = false
codegen-units = 16

[profile.bench]
inherits = "release"

[[bench]]
name = "crypto_bench"
harness = false

[[bench]]
name = "protocol_bench"
harness = false

[lib]
name = "b4ae"
path = "src/lib.rs"

# Phase 3: Integration & Testing
[[test]]
name = "integration_test"
path = "tests/integration_test.rs"

[[test]]
name = "security_test"
path = "tests/security_test.rs"

[[test]]
name = "performance_test"
path = "tests/performance_test.rs"

[[test]]
name = "fuzzing_test"
path = "tests/fuzzing_test.rs"

[[test]]
name = "penetration_test"
path = "tests/penetration_test.rs"

[[test]]
name = "elara_integration_test"
path = "tests/elara_integration_test.rs"
required-features = ["elara"]

[[test]]
name = "proptest_invariants"
path = "tests/proptest_invariants.rs"

[[example]]
name = "b4ae_elara_demo"
path = "examples/b4ae_elara_demo.rs"
required-features = ["elara"]

[[example]]
name = "b4ae_chat_demo"
path = "examples/b4ae_chat_demo.rs"
required-features = ["elara"]

[[example]]
name = "b4ae_file_transfer_demo"
path = "examples/b4ae_file_transfer_demo.rs"
required-features = ["elara"]

[[example]]
name = "b4ae_gateway_demo"
path = "examples/b4ae_gateway_demo.rs"
required-features = ["elara"]