Termux Encryption : Encrypt and Decrypt Files in Termux

Now a Day's Encryption 🔐 is The most common method To Protect the data from unauthorized access even if it is Stolen. And we all use some applications to secure our data but is it really safe? In this post, I am gonna show you how you can Encrypt your own data in Termux and Deycrypt it whenever you want with your private password.


What is Encryption in Termux?

Encryption is a method of converting data to a Secret code using a Key, Then the Encrypted code will not understandable by Humans as well as computers, The only way to Read the Encrypted data is to Decrypt it with the Perfect key. 

Termux Encryption : Encrypt and Decrypt Files in Termux

There are Multiple Types of Encryption and Encrption methods but In this post, we are Only gonna use Symmetric-key encryption in Termux. In this method, we will use a Password to Encrypt our files and Termux and we will use the same password to decrypt it again. 

You can Encrypt any file using this method, Like images, Audio files, Video Files, Text files, and If you have a Big Folder of data then you can convert that folder into a Zip File and you can Encrypt it using the Termux-Encryption method.




Why You Need To Learn Encryption? 

Let's say you have a list of all of your usernames and passwords, and you have kept it in a Secret folder of your phone or Computer, But What if someone Digs deep and finds it out? we can use Encryption to make our files Non-Readable, Even if someone finds it out they can't have the data because they will require The Password to Decrypt It.

Termux Encryption  Encrypt and Decrypt Files in Termux

Encryption can become handy when someone knows you have a Specific data and they know where to find it, But if we know how to encrypt the data, it will be useless for someone even if we hand it ower to them. Encrypting Recorded Audios and Video data will add another layer of Security. And as a good hacker, you must know all those ways you can secure your data.

Learning Encrption is only not about securing your data, it's also about how the encryption actually works so them if you find any Encrypted file, you will have some Clue of how you can Decrypt it.


How to Encrypt files in Termux?

There are multiple ways you can Encrypt your files in termux but for now, we will use a basic package in termux, that will allow us to Encrypt as well as Decrypt data Easily.

Installation:

First of all, you will have to install the Scrypt package in Termux. It a just a Small package and won't take less than 5 seconds to install but it's gonna save you a lot of times. Just type the below command to install It.
pkg install scrypt

 

Termux Encryption : Encrypt and Decrypt Files in Termux


Encryption with Termux:

To Encrypt any file you just have to use a Single command, This command will encrypt any file you want within Termux. Here I am Encrypting an Image but you can literally encrypt any file. 
scrypt enc -v image.png newname.png
Termux Encryption : Encrypt and Decrypt Files in Termux

Now you will see "Please Enter Passphrase:" on your Screen here you have to type a password that we will use to decrypt the file. also, keep in mind that when you are typing a password you won't see anything getting printed on the screen but it's there. After you type the password press Enter, you have to Retype the password to confirm it.

Termux Encryption : Encrypt and Decrypt Files in Termux

Now when you will type ls on your termux you will see both the original and the Encrypted file, Just delete the original file and now you have an Encrypted Image file. Now you can try to open it with any Image Viewer but it will only load or show you a black screen. If you Don't how to open a File in Termux then Read here [How to Open any File In Termux - 2020

Termux Encryption : Encrypt and Decrypt Files in Termux


How to Decrypt files in Termux?

Now, Since you know how to encrypt the files, you can easily Decrypt them using the Scrypt tool. Move to the folder where you have the encrypted file (You can also give the path of the file.) and then use the below command to decrypt it.
scrypt dec -v encryptedimage.png newname.png
Termux Encryption : Encrypt and Decrypt Files in Termux

When you type this command it will ask you for a password, Just type the password that we use while encrypting the file and it will be decrypted.

Termux Encryption : Encrypt and Decrypt Files in Termux

Now You can type ls and you will be able to see your decrypted file. If you Don't know the basic command of Termux then it's recommended for you to checkout [ Termux all Basic Commands ].

Termux Encryption : Encrypt and Decrypt Files in Termux




Conclusion:

Encryption is one of the most important things that a Hacker Should Understand. It's a Basic thing that every Termux user should know. I use Encryption to encrypt the important data and then I put it on any online storage, it just adds a new layer of security. If you wanna know more of these things then you should check out [ All the Basics of Termux ]. If you have any questions related to this post then you can comment down below. Thanks For Reading guys and as always Stay Ethical👾.

Post a Comment

4 Comments

Popup Image