Commit Graph

12 Commits

Author SHA1 Message Date
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
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
76a808e1b3
feat(core): add CipherOutput type 2025-10-17 21:35:47 +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