34 Commits

Author SHA1 Message Date
2b4c5a2a6f Merge pull request #8 from avinal/avinal/robust-tests
All checks were successful
Build and Test / build (push) Successful in 26s
feat: add more robust tests
2025-12-07 15:13:55 +05:30
612086dfb7 feat: add more robust tests
- add test to cover corner cases and known failure points

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2025-12-06 18:23:08 +05:30
5448271298 Merge pull request #7 from avinal/avinal/improve
All checks were successful
Build and Test / build (push) Successful in 19s
Improve GitHub Actions flow and increse Cmake version
2025-12-06 15:45:45 +05:30
c940ba9f4d Improve GitHub Actions flow and increse Cmake version
- Increased CMake minimum version to 3.30
- added test run in github workflow

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2025-12-06 15:44:43 +05:30
9d303b7855 Improve GitHub Actions flow and increse Cmake version
Some checks failed
Build and Test / build (Debug, clang) (push) Failing after 18s
Build and Test / build (Debug, gcc) (push) Failing after 17s
Build and Test / build (Release, clang) (push) Failing after 25s
Build and Test / build (Release, gcc) (push) Failing after 17s
Build and Test / sanitize (push) Failing after 3s
- Increased CMake minimum version to 3.30
- added test run in github workflow

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2025-12-04 21:13:31 +05:30
f9ae6fddfd Fix Blowfish and Blowfish2 correctness issues and improve initialization safety
In Blowfish
- Fix incorrect F-function byte extraction (critical bug).
- Correct key-schedule handling by using `uint8_t` key bytes.
- Initialize local variables in `initialize()` to prevent UB.
- Improve decrypt loop and XOR usage for clarity and correctness.

In Blowfish2
- Zero-initialize P-array and S-boxes to guarantee deterministic state.
- Fix incorrect key size comment (448 bits, not 4224 bits).
- Improve F-function byte extraction clarity.
- Normalize round loop logic and use XOR-assignment.

Others
- Replace macro `N` with `constexpr N`.
- Add `noexcept` to internal operations.
- Add `initialize(const uint8_t*, size_t)` overload for binary keys.
- Clean up readability and internal consistency across both ciphers.

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2025-12-04 21:11:16 +05:30
4075aed708 Refactor CMake workflow for simplified build process
Some checks failed
Build C++ Project / Build on Ubuntu with GCC (push) Failing after 1m25s
Updated the CMake workflow to simplify the build process and hardcode the build type to 'Debug'.
2025-10-15 13:20:54 +05:30
da71c0cc13 Update CI matrix in cmake.yml to remove platforms
Some checks failed
build / Ubuntu Latest GCC (push) Has been cancelled
Removed Windows and macOS configurations from the CI matrix.
2025-10-15 13:07:50 +05:30
ccc6593539 Merge pull request #4 from avinal/avinal/blowfish2
fix: fix blowfish2 and add more tests
2024-10-15 19:36:43 +05:30
ee4bd0d21d fix: fix blowfish2 and add more tests
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2024-10-15 15:39:07 +05:30
1f6e896785 Merge pull request #3 from avinal/avinal/blowfish2
feat: add blowfish2 128 bit implementation
2024-09-17 12:28:22 +05:30
960c48573e feat: add blowfish2 128 bit implementation
- regular blowfish only uses 64 bits
- blowfish2 uses 128 bits like AES

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2024-09-17 12:25:32 +05:30
avinal
b6931e3196 sample test file added 2021-03-07 23:51:59 +05:30
avinal
ee4169e0b3 cmake list upadted 2021-03-07 23:46:39 +05:30
avinal
ccc7e8b1e3 header files updated with uint32_t 2021-03-07 23:46:18 +05:30
avinal
279aaf34a4 source files updated with uint32_t 2021-03-07 23:46:04 +05:30
avinal
0abb62b19b gitattributes added 2021-03-07 23:31:28 +05:30
avinal
d66f373902 Merge branch 'main' of https://github.com/avinal/blowfish into main 2021-03-06 23:14:35 +05:30
avinal
f258592a39 modified 2021-03-06 23:13:25 +05:30
avinal
4394ff0b0d changed according to Google Guidelines 2021-03-06 23:13:10 +05:30
avinal
0a366dcbd8 changed according to Google Guidelines 2021-03-06 23:12:59 +05:30
0c3955465e Update README.md 2021-02-21 22:58:54 +05:30
Avinal Kumar
ddeda3c8d4 Update README.md 2021-02-16 18:49:51 +05:30
Avinal Kumar
bb863378ae Update README.md 2021-02-16 18:47:01 +05:30
Avinal Kumar
cf90d90622 Create LICENSE 2021-02-16 18:44:22 +05:30
avinal
9772995fd3 Merge branch 'main' of https://github.com/avinal/blowfish into main 2021-02-16 18:40:28 +05:30
avinal
6555f0ccc5 readme updated 2021-02-16 18:40:18 +05:30
Avinal Kumar
2269d1d88e Added github action build (#1)
* Added github action build

* Update cmake.yml

* small mistake corrected
2021-02-16 18:14:13 +05:30
avinal
5ac40abe4d build script added 2021-02-16 17:53:19 +05:30
avinal
05766204bf cmake build file added 2021-02-16 17:52:55 +05:30
avinal
7448b49405 gitignore updated 2021-02-16 17:49:26 +05:30
avinal
00fb066d2d blowfish source file added 2021-02-16 17:49:04 +05:30
avinal
9fe7c09471 blowfish header file added 2021-02-16 17:48:29 +05:30
d69dc68183 Initial commit 2021-02-15 20:55:49 +05:30