Commit Graph

23 Commits

Author SHA1 Message Date
dd07a1d29b
docs(aes,des): add crate documentation and improve re-exports
Add crate-level doc comments with usage examples. Export additional
types for library users:
    - aes: Block32 (32-bit word type)
    - des: LR (Feistel round state)
2025-12-31 00:18:24 +02:00
54b3d8716d
docs(des): document Feistel network and cipher operations
Add doc comments to LR struct and DES helper functions explaining the
Feistel network structure: IP -> 16 rounds -> FP, with each round using
expansion, S-box substitution, and P-box permutation.
2025-12-31 00:16:14 +02:00
aacb836e77
refactor(cipher-core): unify secret_block! and secret_key! macros
Move duplicated macro definitions from aes and des crates into
cipher-core for shared use. Both macros now:
    - Support u8 through u128 integer types
    - Include Zeroize derive for secure memory handling
    - Generate consistent formatting and conversion methods
2025-12-31 00:07:26 +02:00
451986d702
refactor(cipher-core): extract shared block parsing logic
Add generic BlockInt trait and parse_block_int<T>() function to
cipher-core, eliminating duplicate parsing code in aes and des crates.
    - BlockInt trait abstracts over u64/u128 integer types
    - Supports hex (0x), binary (0b), and ASCII string formats
    - Improved BlockError::InvalidByteStringLength with max/actual fields
2025-12-31 00:07:24 +02:00
0687fe0431
fix: clippy warnings 2025-12-18 18:42:50 +02:00
46a47102b9
feat(factory): add cipher/algorithm helper functions 2025-11-24 12:02:22 +02:00
4007a9a04d
fix: clippy warnings 2025-11-24 08:50:22 +02:00
bf6ae712a7
feat(aes): generate subkeys 2025-11-24 08:50:22 +02:00
bc1622e43f
chore: use workspace package vars 2025-11-24 08:50:22 +02:00
262c7decfe
fix(des): 64 bit block creation 2025-11-06 11:03:29 +02:00
db53ae2ee7
refactor(des): use InputBlock trait 2025-11-04 10:03:20 +02:00
211a7cefe6
fix: doctests 2025-10-20 11:59:53 +03:00
66b440adf6
feat(cli): make flat command structure 2025-10-17 22:53:35 +03:00
76a808e1b3
feat(core): add CipherOutput type 2025-10-17 21:35:47 +03:00
74dd8eb27d
test(des): add edge cases 2025-10-17 20:52:01 +03:00
14ccb2288d
feat(block): add secret_block! macro 2025-10-17 20:46:04 +03:00
db52714d52
refactor(key): improve secret_int! macro 2025-10-17 20:37:13 +03:00
2d59f4fb70
fix: wrong value in S8 box 2025-10-17 19:42:02 +03:00
6175305641
feat(des): implement basic encryption 2025-10-17 17:14:43 +03:00
9e91e90303
feat: add Key56 and Half28 2025-10-14 10:00:13 +03:00
e75eff8cd5
feat: add secret_int macro 2025-10-13 19:01:52 +03:00
27b31d1fcc
refactor: update error methods 2025-10-13 15:02:34 +03:00
cb8128addf
Initial commit 2025-10-13 12:49:49 +03:00