Commit Graph

21 Commits

Author SHA1 Message Date
dd691cfa18
feat(cipher-core): add PKCS#7 padding support
Add pkcs7_pad and pkcs7_unpad functions for block cipher modes:
    - Pad data to block size multiples with N bytes of value N
    - Validate and remove padding on decryption
    - Add InvalidPadding variant to CipherError
2025-12-31 00:48:49 +02:00
f4480ba218
feat(aes): add IV (Initialization Vector) type for CBC mode
Add 128-bit IV type using secret_block! macro with:
    - Parsing from hex/binary/ASCII strings
    - Conversions to/from Block128 for XOR operations
    - Big-endian byte array conversions
2025-12-31 00:45:26 +02:00
2f41a0b773
docs(cipher-core): add documentation to public traits
Document BlockCipher, InputBlock, and BlockParser with usage examples
and method descriptions. Fix incorrect error message in decrypt() that
referenced "plaintext" instead of "ciphertext".
2025-12-31 00:09:26 +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
bb7ef246f8
refactor(web): make smaller components 2025-11-26 05:07:02 +02:00
aa4bd9ecec
feat(web): create CipherForm component 2025-11-26 03:43:23 +02:00
46a47102b9
feat(factory): add cipher/algorithm helper functions 2025-11-24 12:02:22 +02:00
051bba33a8
feat(cli): add AES to cli app 2025-11-24 11:23:37 +02:00
bc1622e43f
chore: use workspace package vars 2025-11-24 08:50:22 +02:00
db53ae2ee7
refactor(des): use InputBlock trait 2025-11-04 10:03:20 +02:00
81a4071c73
refactor: replace anyhow with color-eyre 2025-10-18 14:12:48 +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
db52714d52
refactor(key): improve secret_int! macro 2025-10-17 20:37:13 +03:00
6175305641
feat(des): implement basic encryption 2025-10-17 17:14:43 +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
e36ba664c6
feat: add basic cipher traits 2025-10-13 15:02:24 +03:00
c4ff76ce9b
feat: add CryptoError 2025-10-13 14:12:11 +03:00
cb8128addf
Initial commit 2025-10-13 12:49:49 +03:00