GnuPG GPG
GnuPG GPG
Key Type = RSA
Keysize = 4096
Validity = 2 years
Real name = erpstuff
Email address = info@erpstuff.com
Comment = training by ERPstuff.com
Passphrase = ERPstuff123
Key ID = ?
Listing Existing Keys
$ gpg2 –list-keys
$ gpg2 –list-secret-keys
Keys Generation
$ gpg2 --gen-key
Signing & Checking Keys
gpg2 --sign-key 74F9099D
gpg2 --check-sig 74F9099D
Deleting a Key
$ gpg2 --delete-key <private key>
$ gpg2 --delete-key <public key>
Exporting Key
$ gpg2 --export --output "/home/erpstuff_key.asc" 26AB33BC
Importing Key
$ gpg2 --import "/home/erpstuff_key.asc"
Encryption
$ gpg2 -se --batch --passphrase Erpstuff_234 -r 74F9099D -o erpstuff_file.599.csv.gpg erpstuff_file.599.csv
if multiple keys are there then you can use -u to specify the key
gpg2 -se -r 94F9096D -u ACF1C734 --batch --passphrase Erpstuff_234 -o erpstuff_file.599.csv.gpg erpstuff_file.599.csv
94F9096D = Public key of the company to whom you are sending the file and this key was imported by you in your instance.
ACF1C734 = This public key was created by your in your instance and sent to the other company and they imported in their instance.
$ gpg2 -se --batch --passphrase Erpstuff_234 -r 74F9099D -o erpstuff_file.599.csv.gpg erpstuff_file.599.csv
s : sign & e : encrypt
Decryption
$ gpg2 --decrypt-files --batch --passphrase ERPtuff123 erpstuff_file.599.csv.gpg
$ gpg2 --decrypt-files --batch --passphrase ERPtuff123 *.gpg
gpg: B0C6B187: There is no assurance this key belongs to the named user
gpg: erpstuff_file.csv: sign+encrypt failed: Unusable public key
$ gpg2 --edit-key 74F9099D
gpg> trust
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
Change Passphrase
gpg2 --edit-key 74F9099D (Your-Key-ID-Here)
gpg> passwd
gpg> save
Files location
cd ~
ls -la
cd .gnupg
Deleting folder
rm -r .gnupg/
Download for Windows
https://gpg4win.org/download.html
Videos
GnuPG GPG Encryption and Decryption
Privacy and Security for Integrations with Banks
Videos
Part 1
Encryption and Decryption Concepts
Part 2
Creating Keys
Listing Keys (Secret & Public)
Encrypting a File
Decrypting a File
Exporting Keys
Importing Keys
Changing Passphrase
Creating Trust
GPG Setup in Oracle Linux
Malik Sikandar Hayat
admin@erpstuff.com
admin@erpstuff.com
Who is online
Users browsing this forum: No registered users and 1 guest