Friday, April 7, 2017

Encryption

Encryption  is a method used to ensure the Integrity and confidentiality of of data. Encryption algorithms convert the data into cipher text which is not readable unless it is decrypted.

Data encryption can be divided into 2 as

  1. Symmetric Encryption
  2. Asymmetric Encryption   


In Symmetric encryption a single key is used for both encryption and decryption.



Asymmetric encryption uses 2 keys for encryption  and decryption,
When encrypted with one, only the other key of the key pair can be used to decrypt the data.


Lets create a simple bash script to encrypt files inside a given directory

code can be found here.

execute the bash script after downloading. and provide the directory you want to encrypt.


Encrypted file now looks like below


to decrypt the file run the command
"sh ccrypt.sh -D"


after decryption the data in the file is now readable.




you can download the script from the git hub.

No comments:

Post a Comment