SneppX-ALG v0.9.5.748 is now released. This is a major Python interface release that delivers complete Python bindings for all 7 architectural phases — Foundation, Crypto, Security, Algorithms, Kernels, Infrastructure, and ASM — plus CLI entry points (sneppx-train, sneppx-serve, sneppx-experiment) so the package is immediately usable after pip install sneppx-alg.
What's New
🔧 Phase 1 — Foundation Layer
Unified dispatch architecture with pure-Python fallback:
**`c_loader.py`** — `load_library()` / `find_load()` auto-detects C extension (`.pyd`/`.so`) with graceful Python fallback
**`c_types.py`** — Shared ctypes declarations (int8..uint64, float/double, const_char_p, void_p, DataBuffer, struct builder)
**`dispatch/`** — Factory `get_backend(device)` with CPU/CUDA backends + domain-specific: security, algorithm, kernel, infra
🔐 Phase 2 — Crypto Bindings (6 families, 85+ tests)
| Module | Primitives |
|--------|------------|
| crypto_sign.py | Ed25519, Dilithium2/3/5, SPHINCS+ (SHAKE/SHA2) |
| crypto_kem.py | Kyber512/768/1024 KEM, X25519 ECDH |
| crypto_symmetric.py | AES-GCM, ChaCha20-Poly1305, AEAD unified |
| crypto_hash.py | SHA-256/512, SHA3-256/512, SHAKE128/256, BLAKE3, SipHash |
| crypto_kdf.py | HMAC, HKDF, PBKDF2, Argon2id |
| crypto_util.py | BigNum (Montgomery), DRBG (CTR/HMAC/Hash), SecureRandom, ConstantTime, EntropyPool |
🛡️ Phase 3 — Security Bindings S1–S9 (10 modules, 100+ tests)
Complete S0–S9 security surface exposed to Python:
`secure_memory.py` — SecureAllocator, StackCanary, ASLR, MemoryHardening, MemoryLeakDetector
`s4_network.py` — DDoSMitigation, IdentityManager, TransportSecurity (TLS 1.3, Noise, QUIC)
`runtime_monitor.py` — IntegrityMonitor, ContainerBreakoutDetector, AdvancedMonitor
`key_vault.py` — HSM-backed KeyVault, AuditLogger, Shamir Secret Sharing
`secure_updates.py` — TUF signed updates, ContainerSecurity (SBOM/CVE), bsdiff deltas
`formal_verify.py` — LTLProperty, ModelChecker, StateGraph
`pen_testing.py` — NetworkFuzzer, SelfAuditor, CVE scanner
`obfuscation_bridge.py` — CFG flattening, instruction substitution, opaque predicates, string encryption, VM obfuscation
`ai_safety_ext.py` — RLHFSafety, DataPoisoningDefense, PromptFilter, OutputVerifier
`security_middleware.py` — Auth (none/bearer/api_key), RateLimit, PromptFilter, OutputVerifier, SecurityConfig, SecurityMiddleware
🧠 Phase 4 — Algorithm Bindings (5 modules, 47+ tests)
`algo_arc.py` — Adversarial Robustness: PGD/FGSM attacks, gradient obfuscation, input guard, output verifier
`algo_fm.py` — Federated Memory: Controller, MemoryBank, Node, Sync
`algo_hss.py` — Hierarchical State Space: Discretize, Scan, Step (model as `AlgoHSSModel`)
`algo_npe.py` — Neural Program Execution: Instruction, Program, Compiler, VM, Verifier
`algo_ser.py` — Mixture of Experts: Expert, Route, Layer, Loss (model as `AlgoSERModel`)
⚡ Phase 5 — Kernel Bindings (7 modules, 70+ tests)
`c_attention.py` — Flash/Differential/Flex Attention, block-sparse, multi-modal cross-attention
`c_arch.py` — GELU/SiLU/ReLU/Tanh/Sigmoid/Mish, Mamba2 selective SSM
`c_memory.py` — Allocator, MemoryPool (pre-allocated blocks, stream pool)
`c_thread.py` — ThreadPool, WorkStealingPool
`c_tensor_expr.py` — Symbolic tensor graph compiler
`c_simd_gemm.py` — AVX2/SSE2 GEMM, Strassen fallback, GemmConfig
`c_logger.py` — Structured logger (JSON/color stdout, per-rank, severity)
🌐 Phase 6 — Infrastructure Bindings (4 modules, 26 tests)
`net_bindings.py` — Topology, SocketComm, RDMA, GRPCService, NCCLComm, ProcessGroup
`driver_bindings.py` — CUDADriver, ROCmDriver, TPUDriver (props, streams, events)
🔩 Phase 7 — ASM Integration (5 modules, 23 tests)
`asm_bridge.py` — CPUFeatures (x86 detection), AsmLibrary/Function, ConstantTime, SecureMemory
`crypto_asm.py` — AES-NI, SHA-NI, ChaCha20-AVX2, Poly1305, MontgomeryMul, Ed25519, ConstantTimeOps, FirewallASM
`build.ps1` — MASM x64 build script for assembly routines
CLI Commands (now installed with the package)
pip install sneppx-alg
# Training
sneppx-train --config config.yaml --eval-only --resume checkpoint.sneppx
# Inference server
sneppx-serve --port 8000 --model-config model.json --tokenizer tokenizer.json \
--auth-mode bearer --api-keys "key1,key2" --rate-limit-rpm 60 \
--firewall-config firewall.yaml --tls-enabled --tls-certfile cert.pem --tls-keyfile key.pem
# Experiment tracking
sneppx-experiment list --experiment my-exp
sneppx-experiment view run_abc123
sneppx-experiment compare run_1 run_2 run_3
sneppx-experiment export --output runs.json
Also available via snepp (npm-style dispatcher in snepp-cli).
Bug Fixes
**`experiment_cli.py`**: `import time` moved to module level — was inside `if __name__ == "__main__"` guard, causing `NameError` in `list`/`view`/`compare` commands
**Dependencies declared**: `pyyaml>=5.1` (required by `train_cli.py`), `uvicorn>=0.22` (required by `serve_cli.py`, opt-in via `[serve]` extra)
**Name collisions resolved**: `HSSModel`→`AlgoHSSModel`, `SERModel`→`AlgoSERModel`, `PromptFilter`→`AIPromptFilter`, `OutputVerifier`→`AIOutputVerifier`
Testing
All 31 test suites pass (300+ individual tests) on pure-Python fallback paths (no C compiler needed):
$env:PYTHONPATH = "bindings/python"
python -m pytest tests/python/ -v
Key verified fixes:
GELU uses `math.erf` (not `math.erfc`)
Mamba2 forward: `delta @ A` → `delta * A`
Strassen: even-dimension only fallback
Site Updates
All Arix-Site pages, SEO structured data, and arix-ui package updated to v0.9.5.748.
Links
**PyPI**: https://pypi.org/project/sneppx-alg/ (pending publish)
**Source**: https://github.com/ammar49-cyber/sneppx-alg
**Docker (CPU)**: `docker pull ghcr.io/ammar49-cyber/sneppx-alg:cpu-latest`
**Docker (CUDA)**: `docker pull ghcr.io/ammar49-cyber/sneppx-alg:cuda-latest`
**Documentation**: https://sneppxalg.vercel.app/docs
See the Packages page for full installation options and the CHANGELOG for complete history.