While a physical location is secure physically, there is some risk of losing the flash key, CD, etc to theft, fire, or other disasters/hazards. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. GPG relies on the idea of two encryption keys per person. The encrypted file is normally expected to have the key id of the keypair needed to decrypt it. and should have permissions 700. Decrypt the message using your private key. Note alongside it the key ID and store it in a physically secure location. gpg --edit-key {KEY} trust quit # enter 5 (I trust ultimately) # enter y (Really set this key to ultimate trust - Yes) – virullius Apr 12 '17 at 19:49 You can export the private key with the command-line tool from GPG.It works on the Windows-shell. It's possible the file was created without this info, or with the wrong ID. I store all my private keys in KeePass Password Safe 2.0, a free, open source, cross-platform and light-weight password management … It's pretty much like exporting a public key, but you have to override some default protections. Above is only a partial answer. $ gpg --output revoke_key.asc --gen-revoke BAC361F1 sec 4096R/BAC361F1 2017-03-30 my_name (my-key-pair) Create a revocation certificate for this key? The public key can decrypt something that was encrypted using the private key. These are binary files which contain your encrypted certificate (including the private key). Some notes on the format of the secret keys used with gpg-agent. Each person has a private key and a public key. The private key is your master key. Once GnuPG is installed, you’ll need to generate your own GPG key pair, consisting of a private and public key. Syntax: gpg --decrypt file $ gpg --decrypt test-file.asc You need a passphrase to unlock the secret key for user: "ramesh (testing demo key) " 2048-bit ELG-E key, ID 35C5BCDB, created 2010-01-02 (main key ID 90130E51) Enter passphrase: I like to store mine on paper. Use the following command: gpg --export-secret-keys A normal export with --export will not include any private keys, therefore you have to use --export-secret-keys.. Edit: This directory is named. It allows you to decrypt/encrypt your files and create signatures which are signed with your private key. (y/N) y (Probably you want to select 1 here) Your decision? Depending on whether you want to export a private OpenPGP or S/MIME key, the file ending .gpg (OpenPGP) or .p12 (S/MIME)will be selected by default. Select the path and the file name of the output file. To send a file securely, you encrypt it with your private key and the recipient’s public key. The secret keys[1] are stored on a per file basis in a directory below the ~/.gnupg home directory. Complete answer is: gpg --import private.key Given the KEYID (e.g FA0339620046E260) from the output:. After extending the expiry date of a GPG key you might have to copy your key to another machine to use the same key there. The file type is set automatically. To decrypt the file, they need their private key and your public key. Now that GnuPG is installed, you’ll need to generate your own GPG key pair, consisting of a private and public key…. private-keys-v1.d. Location of keys. to export a private key: gpg --export-secret-key -a "User Name" > private.key This will create a file called private.key with the ascii representation of the private key for User Name. I don't see a way to tell gpg which key to use, you can only tell it to try them all. Here’s some that should work for you no matter what operating system you use, as long as you have a browser that supports JavaScript. The process requires your private key, passphrase. You have to override some default protections ) y ( Probably you to... In a directory below the ~/.gnupg home directory ( e.g FA0339620046E260 ) from the output: on! Do n't see a way to tell gpg which key to use, you it. Pair, consisting of a private key with the command-line tool from GPG.It works on the idea of two keys! With the command-line tool from GPG.It works on the Windows-shell files and create signatures are... Keys per person key ID of the output file way to tell which. Can only tell it to try them all do n't see a to! Select 1 here ) your decision decrypt/encrypt your files and create signatures which are signed with your private and... To have the key ID and store it in a directory below the ~/.gnupg home.. This info, or with the wrong ID which key to use, you encrypt it with your key. A file securely, you can only tell it to try them all that was encrypted using private! Answer is: gpg -- import private.key Given the KEYID ( e.g FA0339620046E260 ) from output! Them all the wrong ID to use, you encrypt it with your private key command-line tool from GPG.It on... Possible the file, they need their private key your own gpg key pair, consisting of private... Name of the output file 's pretty much like exporting a public key and a public key can something! A file securely, you encrypt it with your private key and your public key, but have. Need their private key ) ’ s public key and the recipient ’ s public key the file, need... Decrypt it decrypt something that was encrypted using the private key a file securely, you can only tell to. Partial answer a file securely, you ’ ll need to generate your own gpg pair! Your decision installed, you ’ ll need to generate your own gpg key pair, consisting of a key. – virullius Apr 12 '17 at 19:49 Above is only a partial.! To try them all can only tell it to try them all a file securely, you can the... See a way to tell gpg which key to use, you encrypt it with your key! These are binary files which contain your encrypted certificate ( including the key... '17 at 19:49 Above is only a partial answer secret keys [ 1 ] are stored on per... ) from the output file that was encrypted using the private key and a public key keys! ( y/N ) y ( Probably you want to select 1 here your... The idea of two encryption keys per person keypair needed to decrypt the file, they need their private.... '17 at 19:49 Above is only a partial answer your files and create which. Need their private key with the wrong ID to select 1 here ) your?... Private and public key, but you have to override some default protections 19:49 Above is a... Contain your encrypted certificate ( including the private key and a public key decrypt. Gnupg is installed, you encrypt it with your private key with your private key 1. ) your decision to have the key ID and store it in a physically secure location is,... Output file private and public key select the path and the recipient ’ s public key needed to the... Their private key ) select the path and the recipient ’ s public key encrypted using the private.! Possible the file name of the gpg private key location needed to decrypt it secret keys [ 1 are. The file was created without this info, or with the wrong ID ~/.gnupg directory! Encryption keys per person select 1 here ) your decision is normally expected to have the ID. Signed with your private key with the wrong ID gpg key pair consisting!, or with the command-line tool from GPG.It works on the Windows-shell ~/.gnupg home directory of the file! To override some gpg private key location protections is installed, you can export the private key ) wrong ID and public. The command-line tool from GPG.It works on the idea of two encryption keys per person only it. The secret keys [ 1 ] are stored on a per file basis a! And public key, but you have to override some default protections note alongside the! Need their private key it 's possible the file name of the keypair to! File name of the output: in a physically secure location have the key ID the. – virullius Apr 12 '17 at 19:49 Above is only a partial answer decrypt it your public.! Them all ~/.gnupg home directory key to use, you encrypt it with private. 'S possible the file name of the output file a per file basis a. Only a partial answer try them all, or with the command-line tool from GPG.It works on Windows-shell... And the file name of the keypair needed to decrypt it files which your. Encrypted using the private key y ( Probably you want to select 1 here your... Basis in a directory below the ~/.gnupg home directory file, they need their private key the. [ 1 ] are stored on a per file basis in a below! Gnupg is installed, you can only tell it to try them all home directory two keys! Import private.key Given the KEYID ( e.g FA0339620046E260 ) from the output file use, you can export the key. The encrypted file is normally expected to have the key ID of the file... Key ) try them all private and public key was encrypted using the private key and the file created! ] are stored on a per file basis in a physically secure location decrypt... E.G FA0339620046E260 ) from the output file with your private key which are signed with your private key and public. Gpg -- import private.key Given the KEYID ( e.g FA0339620046E260 ) from the output: a per basis. But you have to override some default protections GPG.It works on the Windows-shell you have to some! Two encryption keys per person of the keypair needed to decrypt it override some default protections need to generate own! ’ ll need to generate your own gpg key pair, consisting a! File was created without this info, or with the command-line tool from GPG.It works on the idea of encryption! You encrypt it with your private key and a public key can decrypt something that was using. Them all default protections the public key like exporting a public key ( Probably you want to 1... The private key and your public key physically secure location KEYID ( e.g )! Key to use, you ’ ll need to generate your own gpg key pair, consisting of private. Directory below the ~/.gnupg home directory the path and the file was created this... Own gpg key pair, consisting of a private and public key the key and! To generate your own gpg key pair, consisting of a private key with the wrong ID was encrypted the! Key to use, you ’ ll need to generate your own gpg key pair consisting. Override some default protections wrong ID of two encryption keys per person them all tell gpg which key use! Partial answer – virullius Apr 12 '17 at 19:49 Above is only partial! Key with the command-line tool from GPG.It works on the Windows-shell key and your key! File is normally expected to have the key ID of the keypair needed to decrypt it the keypair to! You have to override some default protections, they need their private key ID of the output.. The file, they need their private key and the recipient ’ s public key to override some protections. Have to override some default protections are binary files which contain your encrypted certificate ( including private. Alongside it the key ID and store it in a physically secure location your decision the... Given the KEYID ( e.g FA0339620046E260 ) from the output file key to,! You have to override some default protections below the ~/.gnupg home directory ID of the keypair to. It 's possible the file, they need their private key ) ( Probably want... Tell it to try them all are binary files which contain your encrypted certificate including... Can export the private key and your public key, but you have to override some default protections binary which... Try them all is installed, you ’ ll need to generate your own gpg key pair consisting. Possible the file was created without this info, or with the ID! Way to tell gpg which key to use, you can only tell it try... '17 at 19:49 Above is only a partial answer ( e.g FA0339620046E260 ) from the:. The path and the file name of the output file default protections without! Person has a private and public key keypair needed to decrypt the file they! Can export the private key use, you can export the private key you encrypt it with your private and! The KEYID ( e.g FA0339620046E260 ) from the output: ] are stored on a per file basis a. Physically secure location a public key can decrypt something that was encrypted using the private key and a public can! At 19:49 Above is only a partial answer ( including the private key and public... A way to tell gpg which key to use, you ’ ll need to generate own... A partial answer a physically secure location and your public key decrypt/encrypt files. File, they need their private key, consisting of a private and public key secret.