Commit Graph

65 Commits

Author SHA1 Message Date
hashlag
797a5428cc Add Padder<>. A CRTP base for padding algorithms.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m59s
2026-02-08 23:44:51 +03:00
hashlag
5baede0a1d Rename PadPkcs7 --> PadderPkcs7. 2026-02-08 23:31:24 +03:00
hashlag
2a3185406b Add PKCS#7 padding implementation.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m58s
2026-02-08 23:05:57 +03:00
hashlag
0647a7c3dc DesEncryptor/DesDecryptor: expose key type.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m57s
2026-02-08 02:57:00 +03:00
hashlag
151c93560c Expose DES key size through DesCrypt, DesCrypt::Encryptor, DesCrypt::Decryptor. 2026-02-07 18:02:27 +03:00
hashlag
3059bd4c66 Make SeArray::Size() static. 2026-02-07 17:54:37 +03:00
hashlag
65eb51c133 Remove unused CrunchUInt64() overload.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m57s
2026-02-04 23:47:45 +03:00
hashlag
a0f17ea127 Decryptor: Require end of the output span to be indicated explicitly.
Usage becomes much less error-prone.
2026-02-02 01:10:22 +03:00
hashlag
67709e5361 Encryptor: Require end of the output span to be indicated explicitly.
Usage becomes much less error-prone.
2026-02-02 00:52:08 +03:00
hashlag
d194fef1af Mark all Block::Decryptor<> methods const.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m42s
This allows for convenient usage of const Decryptor<Impl> &.
2026-02-01 00:24:50 +03:00
hashlag
cdcab2f4f7 Mark all Block::Encryptor<> methods const.
This allows for convenient usage of const Encryptor<Impl> &.
2026-01-31 23:56:25 +03:00
hashlag
a97826da88 Expose block sizes of block ciphers.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m45s
Both via static data members and Encryptor/Decryptor interfaces.
Crucial for safe memory allocation routine.
2026-01-31 19:26:51 +03:00
hashlag
73c455901b Introduce Block::Decryptor<> CRTP base class.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m43s
Inherit DesDecryptor from it.
2026-01-31 18:35:23 +03:00
hashlag
4cf79b61ad Introduce Block::Encryptor<> CRTP base class.
Inherit DesEncryptor from it.
2026-01-31 18:12:43 +03:00
hashlag
ba70abd2af Rename DesCrypt::Encryptor --> DesEncryptor, DesCrypt::Decryptor --> DesDecryptor.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m43s
Maintain naming consistency with Hash subproject.
2026-01-31 17:22:14 +03:00
hashlag
3c98b75986 Create dedicated Cipher/Block directory for block ciphers
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m41s
Move Des there.
2026-01-30 01:01:48 +03:00
hashlag
b5d1f9a6fc Make CRTP base classes ctors protected
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m39s
This forbids to create base class instances which direct usage could lead to UB.
2026-01-30 00:44:24 +03:00
hashlag
0ca97cc336 Use DesCrypt::Block type alias in EncryptBlock()/DecryptBlock() signatures
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 35s
2026-01-24 23:53:04 +03:00
hashlag
e8d0b93c5e Overload DecryptBlock() for the whole block as UInt64
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 34s
2026-01-24 23:24:44 +03:00
hashlag
5a2d802a25 Overload EncryptBlock() for the whole block as UInt64 2026-01-24 23:14:03 +03:00
hashlag
15dd7398d2 Implement DES decryption
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 41s
2026-01-23 22:22:28 +03:00
hashlag
5fd92e0c9d Fix long statement formatting 2026-01-23 21:32:57 +03:00
hashlag
da5eaff182 Introduce stateful DesCrypt::Encryptor class, remove static DesCrypt::EncryptBlock() 2026-01-23 21:31:04 +03:00
hashlag
3a2a665031 Fix a layering issue: private EncryptBlock() should use a private key representation 2026-01-22 22:36:14 +03:00
hashlag
fa042e7abf Rename RawKeyArray --> RawKey since it's not an 'array of raw keys' 2026-01-21 23:36:15 +03:00
hashlag
9e67a7e4f4 Add DES main algorithm draft implementation
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 38s
2026-01-19 02:30:06 +03:00
hashlag
d63855a505 Add Bitwise::PackUInt64(<...>) utility function 2026-01-15 03:14:45 +03:00
hashlag
51c2da1e48 Explicitly #include <utility> in DesCrypt.hpp (std::pair<> used) 2026-01-14 01:33:35 +03:00
hashlag
5e35462667 Add DES key schedule pre-draft implementation 2026-01-14 01:31:26 +03:00
hashlag
fc2f100f0c Add SHA1 draft implementation
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 34s
2026-01-06 04:13:31 +03:00
hashlag
5d09391339 Add comments on closing #include guard #endif's
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 31s
2026-01-02 21:40:07 +03:00
hashlag
a93311cad1 Fix #include guards to match project structure
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 1m10s
2026-01-02 21:31:55 +03:00
hashlag
e21e36db87 Add Arc4 cipher class draft implementation 2025-09-16 23:46:24 +03:00
hashlag
1ed705754e Add Arc4Crypt class skeleton 2025-09-13 16:03:19 +03:00
hashlag
79a3b85903 Add SeArray<> draft implementation 2025-09-13 15:52:05 +03:00
hashlag
e309ed5c28 Add stepsCount parameter to private Arc4Gen::Step(), avoiding unnecessary function calls when possible. 2025-09-04 22:48:49 +03:00
hashlag
8843589950 Make Hmac rekey-initializable (like Arc4Gen) 2025-08-26 00:37:13 +03:00
hashlag
b0f5367085 Rename Arc4 PRNG .hpp file appropriately 2025-08-26 00:01:37 +03:00
hashlag
1e6d964d26 Introduce Cipher/Arc4 subdir 2025-08-25 23:55:57 +03:00
hashlag
e884ae7cd4 Add the Arc4 PRNG draft implementation 2025-08-25 00:20:45 +03:00
hashlag
ad10b33a70 Create basic file structure for Arc4 implementation 2025-08-23 00:36:39 +03:00
hashlag
be03a5314c Add HMAC as per RFC 2104 draft implementation 2025-08-21 02:09:30 +03:00
hashlag
ed0ffcf582 Add Reset to the Hasher<T> base 2025-08-15 23:50:10 +03:00
hashlag
81e9d2412f Implement Reset in MD4Hasher 2025-08-15 23:47:36 +03:00
hashlag
80809918cb Implement Reset in MD5Hasher 2025-08-15 23:45:28 +03:00
hashlag
e6703e13af Rename subdir Chaos/Hashing --> Chaos/Hash 2025-08-15 23:01:51 +03:00
hashlag
0006593087 Add a helper Impl() function for CRTP base 'Hasher' 2025-08-10 22:45:03 +03:00
hashlag
36fa81abfd Add a helper Impl() function for CRTP base 'Hash' 2025-08-10 22:40:40 +03:00
hashlag
da4232894a Conceal algorithms' impl details in service namespaces 2025-08-10 21:21:22 +03:00
hashlag
72a8902954 Fix namespace end comments in Md4.hpp, Md5.hpp 2025-08-10 20:43:42 +03:00