Gpg

Iš Žinynas.
Jump to navigation Jump to search

macOS install[keisti]

brew install pgp

Gen key[keisti]

gpg --gen-key

List keys[keisti]

gpg --list-keys

Import key[keisti]

gpg --import name_of_pub_key_file
gpg --sign-key [email protected]

Export key[keisti]

gpg --export --armor [email protected]

Encrypt file[keisti]

gpg --encrypt --sign --armor -r [email protected] name_of_file

Decrypt file[keisti]

gpg --output name_of_file --decrypt name_of_file.asc

OpenSSH2GPG[keisti]

ssh-keygen -t rsa -f rsa
openssl req -new -x509 -key ~/.ssh/id_rsa -out ssh-cert.pem
openssl pkcs12 -export -in ssh-cert.pem -inkey ~/.ssh/id_rsa -out ssh-key.p12
gpgsm --import ssh-key.p12