Tool to encrypt/decrypt images of type PNM (PBM · PGM · PPM). The encryption is done using LFSR techniques (XOR encryption).
See : https://en.wikipedia.org/wiki/Linear-feedback_shift_register
This project was made in the context of the "Complement to programming" course (INFO0947) given by Pr. Donnet at University of Liège.
Main points of this project :
C-Language, Makefile, static libraries, encryption methods, image processing, unit testing, documentation tool (doxygen) and custom structures.
- Setup
- Parameters
- Forbidden file name
- Usage example
- Documentation
- Used resources
- Future improvements
- Credits
-
Install gcc ([https://gcc.gnu.org/install/])
-
Clone the repository
git clone git@github.com:sgardier/CryptLFSR.git locationOfTheProgram
- Go to the folder of the projet
cd locationOfTheProgram
- Run the
make
command at the root of the directory
make
-i
the path of the image you want to encrypt / decrypt
-o
the path for the encrypted/decrypted image, can not contain /\\:*?\"<>|
-p
a password (e.g., myPassword@!)
-t
the tap value for the LFSR encryption (see : https://en.wikipedia.org/wiki/Linear-feedback_shift_register)
Note :
- Only images of type P1, P2 and P3 (ppm, pnm, pgm) are supported
- All parameters are mandatory
A file name can not contain any of the following characters : /\\:*?\"<>|
Encrypt an image using password "secretpassword123"
./CryptLFSR -i img/city.ppm -o city_encrypted.ppm -p veryGoodPassword -t 5
Decrypt the image using the encryption password
./CryptLFSR -i city_encrypted.ppm -o city_decrypted.ppm -p veryGoodPassword -t 5
Run the command
make doc
Then open doc/html/index.html
open doc/html/index.html
- Seatest : https://code.google.com/archive/p/seatest/
- Arrow image of this README : https://www.deviantart.com/s-a-r-c/art/Right-Arrow-Sticker-823590894
- DALL-E for the pixel art illustration on this README
- Multithreading for the processing of the pixels matrix
- Support of the other types of pnm images
- Simon Gardier (Author)