[feat] add DES, SM4, and RC4 algorithm unit tests - #15
Merged
Conversation
Add tests/unit/test_des.py (15 test cases): - DES constants: PC1, PC2, LS, IP, FP, S-boxes, P, E, CP1, CP2 - DES key schedule: 16 round keys generation - DES mathematical properties Add tests/unit/test_sm4.py (20 test cases): - SM4 constants: IV, FK, CK, Sbox - SM4 functions: tau, L, T - SM4 key expansion: 32 rounds - SM4 encryption/decryption roundtrip Add tests/unit/test_rc4.py (13 test cases): - RC4 constants and functions - KSA initialization and determinism - PRGA keystream generation - RC4 encrypt/decrypt symmetry Also update tests/unit/test_ecc.py: - Fix key_size reference (was PRIVATE_KEY_SIZE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
新增测试文件
tests/unit/test_des.py (15 测试用例)
tests/unit/test_sm4.py (20 测试用例)
tests/unit/test_rc4.py (13 测试用例)
更新的文件
验证结果