175 Commits

Author SHA1 Message Date
hashlag 47b8248586 Fix exception message. Mentioned class was renamed.
Chaos Ci / test-and-benchmark (push) Successful in 2m17s
2026-03-23 00:14:04 +03:00
hashlag 6998d81e98 Fix compilation with apple clang.
Chaos Ci / test-and-benchmark (push) Successful in 2m17s
Provide the template parameter for std::min<> explicitly. :)
2026-03-23 00:00:59 +03:00
hashlag 797a5428cc Add Padder<>. A CRTP base for padding algorithms.
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.
Chaos Ci / test-and-benchmark (push) Successful in 1m58s
2026-02-08 23:05:57 +03:00
hashlag 0647a7c3dc DesEncryptor/DesDecryptor: expose key type.
Chaos Ci / test-and-benchmark (push) Successful in 1m57s
2026-02-08 02:57:00 +03:00
hashlag 7c86d704b7 Merge branch 'block-expose-key-size'
Chaos Ci / test-and-benchmark (push) Successful in 1m54s
Expose block ciphers' key sizes for usage in compile-time context.
2026-02-07 18:14:09 +03:00
hashlag 9f6265395d DesCryptTests: Replace magic const 8 (where used as the key length) with DesCrypt::KeySize.
Chaos Ci / test-and-benchmark (push) Successful in 1m51s
2026-02-07 18:09:42 +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 ccf1397595 Merge branch 'exception-tests'
Chaos Ci / test-and-benchmark (push) Successful in 1m56s
Add missing ChaosException tests.
2026-02-06 18:18:45 +03:00
hashlag 6a09d81ae2 Add ChaosExceptionTests.
Chaos Ci / test-and-benchmark (push) Successful in 2m2s
2026-02-06 18:05:57 +03:00
hashlag b4f015f501 Compile tests with -Wunused -Werror=unused.
Chaos Ci / test-and-benchmark (push) Successful in 1m54s
Promotes cleaner and less error-prone code.
2026-02-05 16:16:38 +03:00
hashlag 95e74db6ec Perform aggregate zero-init instead of .fill(0) where appropriate.
Chaos Ci / test-and-benchmark (push) Successful in 1m50s
Simpler and more consistent code.
2026-02-05 00:40:55 +03:00
hashlag ed22d29af0 Merge branch 'explicit-bounds'
Chaos Ci / test-and-benchmark (push) Successful in 1m50s
Harden against out-of-bounds writes.
2026-02-04 23:52:50 +03:00
hashlag 65eb51c133 Remove unused CrunchUInt64() overload.
Chaos Ci / test-and-benchmark (push) Successful in 1m57s
2026-02-04 23:47:45 +03:00
hashlag b34fda75ef DesCryptTests: IteratorUsage tests: Add testcases with begin == end.
Chaos Ci / test-and-benchmark (push) Successful in 1m57s
2026-02-04 23:37:05 +03:00
hashlag 15d841893c IteratorUsage tests: Add some canary nulled space before begin.
Hardening against write-before-begin.
2026-02-04 23:31:14 +03:00
hashlag 5fd27cd7b5 Merge branch 'stream-bounds-tests' into explicit-bounds
Chaos Ci / test-and-benchmark (push) Successful in 1m50s
Add some past-the-end write hardening tests for stream ciphers.
2026-02-04 01:02:56 +03:00
hashlag 1bf91a90d0 Add Arc4CryptTests, DecryptOutIteratorUsageTest.
Harden against past-the-end write.
2026-02-04 01:01:54 +03:00
hashlag 2d64389d66 Add Arc4CryptTests, EncryptOutIteratorUsageTest.
Harden against past-the-end write.
2026-02-04 00:43:40 +03:00
hashlag ccdf14d31a Add Arc4GenTests, GenerateOutIteratorUsageTest.
Harden against past-the-end write.
2026-02-04 00:25:15 +03:00
hashlag 9734f9a517 Merge branch 'block-exp-bounds' into explicit-bounds
Chaos Ci / test-and-benchmark (push) Successful in 1m49s
Implement explicit bounds requirements for block ciphers.
2026-02-02 01:51:58 +03:00
hashlag 3de69d3298 Fix assertion style.
It should be expectation-first...
2026-02-02 01:15:38 +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.
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.
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 8897d7a910 Merge branch 'block-cipher'
Chaos Ci / test-and-benchmark (push) Successful in 1m43s
Introduce fixed CRTP interfaces for block cipher
encryption and decryption.
2026-01-31 18:50:10 +03:00
hashlag 73c455901b Introduce Block::Decryptor<> CRTP base class.
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.
Chaos Ci / test-and-benchmark (push) Successful in 1m43s
Maintain naming consistency with Hash subproject.
2026-01-31 17:22:14 +03:00
hashlag 9a3b6edfc3 Rename DesCrypt::Encryptor --> DesEncryptor, DesCrypt::Decryptor --> DesDecryptor.
Chaos Ci / test-and-benchmark (push) Successful in 1m46s
Maintain naming consistency with Hash subproject.
2026-01-31 17:18:25 +03:00
hashlag 3c98b75986 Create dedicated Cipher/Block directory for block ciphers
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
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 2c9200ab21 Merge branch 'mac-bench'
Chaos Ci / test-and-benchmark (push) Successful in 1m44s
Add benchmarks for MAC algorithms.
2026-01-29 23:43:28 +03:00
hashlag 6246bf4538 Add HmacSha1_PartialUpdate100Bench 2026-01-29 23:40:39 +03:00
hashlag 78c59dc668 Add HmacSha1_ReuseBench 2026-01-29 23:39:00 +03:00
hashlag d4fa11795b Add HmacSha1_CreateComputeDeleteBench 2026-01-29 23:38:22 +03:00
hashlag 3780586e63 Add HmacMd5_PartialUpdate100Bench 2026-01-29 23:34:53 +03:00
hashlag cc9963f1ca Add HmacMd5_ReuseBench 2026-01-29 23:34:20 +03:00
hashlag 05533e7c6b Add HmacMd5_CreateComputeDeleteBench 2026-01-29 23:33:45 +03:00
hashlag 961a521c57 Add HmacBenches.cpp to ChaosBenches_SOURCE 2026-01-29 23:31:15 +03:00
hashlag 029055f9a3 Add HmacMd4_PartialUpdate100Bench 2026-01-29 23:30:16 +03:00
hashlag b5f86b5633 Add HmacMd4_ReuseBench 2026-01-29 23:29:33 +03:00
hashlag 0bc29c86e5 Add HmacMd4_CreateComputeDeleteBench 2026-01-29 23:16:07 +03:00
hashlag 11561c9379 ChaosCi.yaml: fix directory path style
Chaos Ci / test-and-benchmark (push) Successful in 1m32s
2026-01-29 01:29:52 +03:00
hashlag b7a31b44df Configure retention policy for coverage reports
Chaos Ci / test-and-benchmark (push) Successful in 1m32s
2026-01-29 00:42:20 +03:00
hashlag 4ae55f93fc Sha1HasherTests: Add a longer than 56 (mod 64) byte message testcase
Chaos Ci / test-and-benchmark (push) Successful in 1m30s
2026-01-29 00:28:16 +03:00