CRYPTOCURRENCY

Metamask: Encryption / Decryption file using metamask pub & private keys

Use Metamas to encryption and decrypt files

As a user APPP platform for a decentralized app (DAP), you are probably familiar with important security while managing sensitive files. In this article, we will explore how to use public and private keys to metamascular encryption and deciphering files on a local machine before loading them on the IPFS network.

Prerequisites

Before you continue, make sure you are:

  • Metamascus portfolio installed on your computer.

  • Metamascus expansion enabled in the web browser (only for users of the desktop).

  • Your private key is certainly stored on a local machine.

The process of cryptography and deciphering

Here’s a detailed guide to encryption and deciphering files using a metamask:

Pass 1: Generate public and private keys

Create a new portfolio metamascus following these steps:

  • Go to the Metamascus website ([Metamask.io] ( on your web browser.

  • Click “Create your wallet” and select “Desktop”.

  • Follow suggestions for generating a new private key (for encryption) and public key (for decoristography).

We will use the following keys for this example:

  • Private Key: `Mymn3W9BQ6AQZUPDJJE9XR7CR1F4SU

  • Public key: `PKIHNBGFNIEV4EIVPBWFUDCBUB25TZXQGY29YZSBWOWNLCMLSWFSLCAIMDEYMC0XOC03NJKNDI5 ''

Step 2: Create a new file

Make a new file on a local machine using anano 'Vim’ textual. This will be our encrypted and deciphered file.

Open the file in the text editor, add some random data (for example “Greetings, the World!”) And a salvo with extension `.txt, for example, Cripted_file.txt.

Step 3: encryp file using a public key metamascus

Open your wallet wallet on the web briefcase and go to the “Account” tab. Find the public key you’ve generated earlier (`PKIKHNBGFNIVEVPBWFFUCB25TZXQGY29YZSBWWNLCMLSAWFSLCAIMDEYMC0XOC03NJJKDIndindi5od9).

Copy the public key and glue it to the new editor of the text. Then use the “encryption” function to metamascus to encrypt the file using a public key.

`Bash

Meta-Maska encrypted-java-key pkiqunbgfniv4eivpbwffudcbUb25tzxqGy29yzsbwwwwwwwnlcmlsawfslcaimDymc0xoC03njndindi5od9-Riverage-chey “encrypted_file.txt”

`

This will generate a new encrypted file with the same name as the original file, but with an extension.inc ‘.

Passage 4: Decrittoni files using private key metamask

Open your encrypted file in the text editor. Therefore, use “Decipt” function to metamask to deciphered it with a private key.

`Bash

Meta-Misera Decrypt-Private-Film Mymmn3W9BQ6Aquiquiquiquiqui9xr7cr1f4su-Pubblic-Cheky PKIHNBGGNIEV4IIEVPBWFUDCBUD lcslslslslslslcgnslsl.

`

This will recover the original file you can now load on the IPFS.

Tips and variants

  • It is possible to use several encryption algorithms, such as AES or RSA, citing them inby Encrytographor.”

  • If you need to decipher multiple files at the same time, it is sufficient to multiply the file number and appropriate keys.

  • To avoid safely archiving a private key on a local machine, consider the use of a safe storage solution such as hardware safety modules or encrypted cloud storage.

Following these steps, you used public and private keys to the encryption and deciphering files on a local machine before loading them on IPFS. Remember that you always keep your private key safely and never share it with anyone.

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *