Skip to content

simon-gardier/image-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Command Line Tool for PNM Images Encryption

Release Language

Pixel art of a city Arrow poiting from left to right Encrypted pixel art of a city, noisy image

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
  2. Parameters
  3. Forbidden file name
  4. Usage example
  5. Documentation
  6. Used resources
  7. Future improvements
  8. Credits

Setup

git clone [email protected]:sgardier/CryptLFSR.git locationOfTheProgram
  • Go to the folder of the projet
cd locationOfTheProgram
  • Run the make command at the root of the directory
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"

./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

Documentation

Run the command

make doc

Then open doc/html/index.html

open doc/html/index.html

Used resources

Future improvements

  • Multithreading for the processing of the pixels matrix
  • Support of the other types of pnm images

Credits