This project leverages the OpenSSL library to implement cryptographic algorithms in C. It currently supports the following algorithms:
- Hashing: SHA-256 (Secure Hash Algorithm)
- Symmetric Encryption: AES (Advanced Encryption Standard)
This library is designed for educational purposes and as a foundation for building more complex cryptographic applications.
- SHA-256 Hashing: Generate a fixed-size 256-bit (32-byte) hash from an input string.
- AES Encryption/Decryption: Encrypt and decrypt data using the AES-128 algorithm in ECB mode.
This project requires the OpenSSL library to be installed on your system.
- Debian/Ubuntu:
sudo apt install libssl-dev
- Arch Linux:
sudo pacman -S libssl-dev
- Mac OS:
brew install openssl
For compilation, you can use the following commands:
gcc -o test_hash tests/test_hash.c src/crypto_hash.c -lssl -lcrypto
./test_hash
gcc -o test_aes tests/test_aes.c src/crypto_aes.c -lssl -lcrypto
./test_aes