sábado, 12 de janeiro de 2019

HOW TO ENCRYPT AND DECRYPT FILE USING PGPTOOL FOR UBUNTU

First, download file: https://pgptool.github.io/

for ubuntu: https://github.com/pgptool/pgptool/releases/download/0.5.1.0/pgptoolgui-0.5.1.0.zip

unzip file downloaded and access this folder: pgptoolgui-0.5.1.0.zip
after that execute this command:
java -jar pgptoolgui-0.5.1.0.jar

now in this case execute follow the steps:

1) define the root password, by the option above >> Create << and set file and personal of information how: name, email  and password in my case was create the password xuxa@123





2) set encryption file







3) for decrypt file follow, decrypt file and set choose an than set the password






HOW TO DECRYPT FILE BY OPENSSL USING PRIVATE KEY FOR UBUNTU

first install openssl, after that execute this command:

string command:

openssl rsautl -decrypt -inkey ChavePrivada.key -in Criptograma -out Criptograma.decrpt

description string commands:

openssl rsautl <<< for start the decrypt file
-decrypt            << for decrypt file request
-inkey               << for set private key
-in                    << for set cripto file
-out                 << for registry output file decrypt




for check the valid cert before just execute:

openssl  rsa -in ChavePrivada.key -check