Skip to content

A script that uses cryptography package for password driven encryption and decryption of file

Notifications You must be signed in to change notification settings

ZalakBhojani/password-driven-file-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password-Driven-File-encryption

The python script uses cryptography package for password driven file encryption-decryption.

Getting Started

The user can provide a password that would in turn used to generate a key. The key is generated using SHA256 hash algorithm. The key can be used to further encrypt the file. The encrypted file can then be shared among users, however without the key or password along with the script the user cannot decrypt the content of the file. It is suggested to not share the key.

Prerequisites

Python3, pip

Installing

Clone/Download the repository and run the following command using the terminal

pip install -r requirements.txt

Running the script

The following command helps the user to get familiar with the script

python3 crypt.py -h

which outputs

File Encryptor-Decryptor Script

positional arguments:
  file                File to encrypt/decrypt

optional arguments:
  -h, --help          show this help message and exit
  -g, --generate-key  Whether to generate a new key or use existing
  -e, --encrypt       Whether to encrypt the file, only -e or -d can be
                      specified.
  -d, --decrypt       Whether to decrypt the file, only -e or -d can be
                      specified.

Make sure to change the password at line 14 according to the usage

Built With

The script was made as a part of submissions for 2UCL602 - Cryptography and System Security lab

About

A script that uses cryptography package for password driven encryption and decryption of file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages