Howto gpg: Difference between revisions
Jump to navigation
Jump to search
Mandulete1 (talk | contribs) No edit summary |
Mandulete1 (talk | contribs) No edit summary |
||
Line 20: | Line 20: | ||
decrypt file: | decrypt file: | ||
gpg -r NAME --output OUTFILE --decrypt INFILE.gpg | gpg -r NAME --output OUTFILE --decrypt INFILE.gpg | ||
sign key using specific key: | |||
gpg -u my-key-id --sign-key public-key-id | gpg -u my-key-id --sign-key public-key-id | ||
search for public keys: | |||
gpg --keyserver pgp.mit.edu --search-keys orders@offensive-security.com | gpg --keyserver pgp.mit.edu --search-keys orders@offensive-security.com | ||
import public key from keyserver pgp.mit.edu: | |||
gpg --keyserver pgp.mit.edu --recv-keys 38707F0CDF4D52D4 | gpg --keyserver pgp.mit.edu --recv-keys 38707F0CDF4D52D4 | ||
make your public key available at keyserver pgp.mit.edu: | |||
gpg --send-keys --keyserver pgp.mit.edu 38707F0CDF4D52D4 | gpg --send-keys --keyserver pgp.mit.edu 38707F0CDF4D52D4 | ||
= | = encrypt file = | ||
to encrypt a file using another person gpg public key do the following: | |||
gpg --import | gpg --import other_person_pub_key_file.asc | ||
sign public key: | |||
gpg --sign-key " | gpg --sign-key "User ID" | ||
encrypt file with another person pgp public key: | |||
gpg --yes -eq -r "their User ID" -o archivo_encriptado.pgp nombre_archivo | gpg --yes -eq -r "their User ID" -o archivo_encriptado.pgp nombre_archivo |
Revision as of 02:39, 30 April 2021
Comandos de GPG
create key:
gpg --gen-key
list all keys:
gpg --list-keys
list private keys:
gpg --list-secret-keys
export public key:
gpg --export --armor -o llave.key key-id
export private key to file:
gpg --export-secret-keys -a 1234ABCD > secret.asc
import key:
gpg --import llave.key
delete public key:
gpg --delete-key key-id
delete private key:
gpg --delete-secret-keys key-id
encrypt file:
gpg -r NAME --output OUTFILE.gpg --encrypt INFILE
decrypt file:
gpg -r NAME --output OUTFILE --decrypt INFILE.gpg
sign key using specific key:
gpg -u my-key-id --sign-key public-key-id
search for public keys:
gpg --keyserver pgp.mit.edu --search-keys orders@offensive-security.com
import public key from keyserver pgp.mit.edu:
gpg --keyserver pgp.mit.edu --recv-keys 38707F0CDF4D52D4
make your public key available at keyserver pgp.mit.edu:
gpg --send-keys --keyserver pgp.mit.edu 38707F0CDF4D52D4
encrypt file
to encrypt a file using another person gpg public key do the following:
gpg --import other_person_pub_key_file.asc
sign public key:
gpg --sign-key "User ID"
encrypt file with another person pgp public key:
gpg --yes -eq -r "their User ID" -o archivo_encriptado.pgp nombre_archivo