mirror of
https://github.com/avinal/blowfish.git
synced 2026-01-10 06:48:32 +05:30
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
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>
This commit is contained in:
53
README.md
53
README.md
@@ -1,10 +1,17 @@
|
||||
# Blowfish and Blowfish2 Encryption Algorithm
|
||||
|
||||
<p align=center><a href="https://github.com/avinal/blowfish/actions"><img alt="build" src="https://github.com/avinal/blowfish/workflows/build/badge.svg?branch=main"></a><a href="https://github.com/avinal/blowfish/blob/main/LICENSE"><img src="https://img.shields.io/github/license/avinal/blowfish" alt="license"></a></p>
|
||||
[](https://github.com/avinal/blowfish/actions/workflows/cmake.yml)
|
||||
|
||||
Blowfish is a symmetric block cipher that can be used as a drop-in replacement for DES or IDEA. It takes a variable-length key, from 32 bits to 448 bits, making it ideal for both domestic and exportable use. Blowfish was designed in 1993 by Bruce Schneier as a fast, free alternative to existing encryption algorithms. Since then it has been analyzed considerably, and it is slowly gaining acceptance as a strong encryption algorithm. Blowfish is unpatented and license-free, and is available free for all uses.
|
||||
Blowfish is a symmetric block cipher that can be used as a drop-in replacement for DES or IDEA. It
|
||||
takes a variable-length key, from 32 bits to 448 bits, making it ideal for both domestic and
|
||||
exportable use. Blowfish was designed in 1993 by Bruce Schneier as a fast, free alternative to
|
||||
existing encryption algorithms. Since then it has been analyzed considerably, and it is slowly
|
||||
gaining acceptance as a strong encryption algorithm. Blowfish is not patented and license-free,
|
||||
and is available free for all uses.
|
||||
|
||||
Blowfish 2 was released in 2005. It has exactly the same design but has twice as many S tables and uses 64-bit integers instead of 32-bit integers. It no longer works on 64-bit blocks but on 128-bit blocks like AES. 128-bit block, 64 rounds, key up to 4224 bits.
|
||||
Blowfish 2 was released in 2005. It has exactly the same design but has twice as many S tables and
|
||||
uses 64-bit integers instead of 32-bit integers. It no longer works on 64-bit blocks but on 128-bit
|
||||
blocks like AES. 128-bit block, 64 rounds, key up to 4224 bits.
|
||||
|
||||
## About this project
|
||||
|
||||
@@ -12,8 +19,12 @@ This is a C++ implementation of the encryption algorithm.
|
||||
|
||||
## How to use this in your project?
|
||||
|
||||
1. You may fork it and use it like any other source file in your project. You only need [blowfish.hpp](include/blowfish/blowfish.hpp) and [blowfish.cpp](src/blowfish.cpp) files. Just modify the header as per your convienence.
|
||||
2. If you are using CMake, the work is lot easier. You can add this as a git submodule. It isolates your project from this dependency.
|
||||
1. You may fork it and use it like any other source file in your project. You only need
|
||||
[blowfish.hpp](include/blowfish/blowfish.hpp) and [blowfish.cpp](src/blowfish.cpp) files. Just
|
||||
modify the header as per your convenience.
|
||||
|
||||
2. If you are using CMake, the work is lot easier. You can add this as a git submodule. It isolates
|
||||
your project from this dependency.
|
||||
|
||||
```bash
|
||||
# In your project root type these commands
|
||||
@@ -21,9 +32,37 @@ This is a C++ implementation of the encryption algorithm.
|
||||
# considering this addition is your only change
|
||||
git commit -m "blowfish submodule added"
|
||||
git push origin main
|
||||
```
|
||||
```
|
||||
|
||||
Add this to your CMakeLists.txt as well.
|
||||
Add this to your CMakeLists.txt as well.
|
||||
|
||||
## Building
|
||||
|
||||
This library has no dependencies on any other code. Just a C++ compiler should be enough to build
|
||||
this. Although this library is supposed to be used under some other project, sometimes you may need
|
||||
to build this. Here are the prerequisites:
|
||||
|
||||
- [CMake](https://cmake.org/download/)
|
||||
- [G++](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/)
|
||||
- [Make](https://www.gnu.org/software/make/) or [Ninja Build](https://ninja-build.org/) or any other CMake compatible generator.
|
||||
|
||||
Here is how I install them on Fedora:
|
||||
|
||||
```shell
|
||||
sudo dnf install clang cmake g++ make ninja-build
|
||||
```
|
||||
|
||||
Configure CMake, enabled debug for development purposes:
|
||||
|
||||
```shell
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
|
||||
```
|
||||
|
||||
Build using configured generator:
|
||||
|
||||
```shell
|
||||
cmake --build build --config Debug
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
|
||||
Reference in New Issue
Block a user