How To Do Encryption And Decryption Of A Text File In Cryptography

In This Tutorial We Are Going To Learn Cryptography Means How To De Encryption And Decryption In Redhat Enterprise Linux

Firstly Login Whith The Root In Linux

Now First We Create A Folder In Linux Then We Do The Encryption And Decryption Of Text File Inside The Folder But Don’t Do At The Root 

Now Here Is The Command Of Creating Folder In Linux And Then We Do The Encryption 

#mkdir hacking
#cd hacking 
#vim a.txt {After This Press Enter And Then Write Some Content Inside This Text File}
#cat a.txt | openssl enc -base64 > base.txt {To Copy The Content Of a.txt To base.txt In Encypted Form}
#rm -rf a.txt  { To Delete The File a.txt}
#cat base.txt {To See The Content Of base.txt But Now As You Can See This Is Encrypted File }

See This Picture So As You Can Easily Understand How To Create Folder And How To Create File Inside Folder And What Conf I Have Done To Encrypted This File a.txt To base.txt 

Now Base.txt File Is Encrypted Now If You Want To Do Double Security Then We Encrypt This Encrypt Again 

Now How To Do Double Security Means Double Encryption

Here Is The Command For Encryption Again Which File IS Already Encrypted

#cat base.txt | openssl enc -aes-256-cbc > aes.txt   {After Then Give The Password And Copy The Content Of base.txt To aes.txt In Double Encypted Form}
#rm -rf base.txt  {To Delete The File a.txt}
#cat aes.txt {To See The Content Of aes.txt But Now As You Can See This Is Double Encrypted}

See This Picture So As You Easily Understand What Conf I Have Done To Encryptd This Encrypted Text File

Now Our Portion Of Configuration Encryption Now Its Time to Decryption This Encrypted File

Here Is The Command Of Conf The Decryption

#cat base.txt | openssl enc -aes-256-cbc -d > aes.txt
#rm -rf aes.txt
#cat a.txt | openssl enc -base64 -d > base.txt
#rm -rf base.txt
#cat a.txt 

See This Picture So As You Easily Understand How I Do The Decryption Of This File 

This IS All How To Conf Cryptography Means Encryption And Decryption Of Text File

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s