https://github.com/simon-gardier/image-encryption
🛡️Image encryption tool written in C
https://github.com/simon-gardier/image-encryption
c command-line command-line-tool doxygen makefile
Last synced: 10 months ago
JSON representation
🛡️Image encryption tool written in C
- Host: GitHub
- URL: https://github.com/simon-gardier/image-encryption
- Owner: simon-gardier
- Created: 2023-10-26T21:07:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-25T18:07:11.000Z (about 2 years ago)
- Last Synced: 2025-09-01T10:59:21.848Z (10 months ago)
- Topics: c, command-line, command-line-tool, doxygen, makefile
- Language: C
- Homepage: https://en.wikipedia.org/wiki/Linear-feedback_shift_register
- Size: 38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🛡️ Command Line Tool for PNM Images Encryption


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.
## Summary
1. [Setup](#setup)
2. [Parameters](#parameters)
3. [Forbidden file name](#forbidden-file-name-for--o)
4. [Usage example](#usage-example)
5. [Documentation](#documentation)
6. [Used resources](#used-resources)
7. [Future improvements](#future-improvements)
8. [Credits](#credits)
## Setup
- Install gcc ([https://gcc.gnu.org/install/])
- Clone the repository
```console
git clone git@github.com:sgardier/CryptLFSR.git locationOfTheProgram
```
- Go to the folder of the projet
```console
cd locationOfTheProgram
```
- Run the ```make``` command at the root of the directory
```console
make
```
## Parameters
`-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
## Forbidden file name for -o
A file name can not contain any of the following characters : `/\\:*?\"<>|`
## Usage example
Encrypt an image using password "secretpassword123"
```console
./CryptLFSR -i img/city.ppm -o city_encrypted.ppm -p veryGoodPassword -t 5
```
Decrypt the image using the encryption password
```console
./CryptLFSR -i city_encrypted.ppm -o city_decrypted.ppm -p veryGoodPassword -t 5
```
## Documentation
Run the command
```console
make doc
```
Then open doc/html/index.html
```console
open doc/html/index.html
```
## Used resources
- 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
## Future improvements
- Multithreading for the processing of the pixels matrix
- Support of the other types of pnm images
## Credits
- [Simon Gardier](https://github.com/simon-gardier) (Author)