12xyzz/NeuroDiffTorch
The implementation of "NeuralCPA: A Deep Learning Perspective on Chosen-Plaintext Attacks".
What's novel
The implementation of "NeuralCPA: A Deep Learning Perspective on Chosen-Plaintext Attacks".
Code Analysis
14 files read · 4 roundsA PyTorch framework that trains neural differential distinguishers (GohrNet/DBitNet) on block cipher output pairs to perform Chosen-Plaintext Attacks, supporting 14 ciphers from SPECK to AES.
Strengths
Genuine cryptographic implementations (AES, SPECK, etc.) with NIST test vectors, a well-structured plugin architecture for ciphers/models/losses, and a sophisticated CPA attack that properly filters training data leakage. The DBitNet wide-narrow dilated convolution architecture is a non-trivial design choice for capturing multi-scale differential patterns.
Weaknesses
No test suite exists despite the cryptographic correctness being critical; the CPA attack's data generation logic is complex with edge cases around bit vs word-based ciphers that could harbor subtle bugs; use of eval() for config parsing is a security anti-pattern even in a research context.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
6
Contributors
1
Files
138
Active weeks
6
Repository
Language
Python
Stars
2
Forks
0
License
—