The "-armor" will add some line to the file used by OpenGPG to reconstruct data later. Gpg -export-secret-key -armor > james_private_key.asc For example if you loose your key, then you will not be able to decrypt your documents anymore.įor do this, you can export the key to an. Next step is to backup your secret keys, this mostly because security reasons. Second, if we look at the first column we can see that for the first command we have " pub" and " sub" while for the second " sec" and " ssb". You can see that the output of this two commands is quite the same, only for few exceptions.įirst the " -list-secret-key" takes the information from the secring.gpg file. If you want to list your secret key you can use gpg gpg -list-secret-key As you can see, these information come from the pubring.gpg file. When you have generated your keys, you can list them with the gpg -list-key gpg -list-key Gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model The fingerprint is the " signature" of your keys and you can check it with gpg -fingerprint gpg: checking the trustdb The summary of your first key show some information like the fingerprint of the key. Public and secret key created and signed. Gpg: key 4CF30FD4 marked as ultimately trusted We need to generate a lot of random bytes. The OS a chance to collect more entropy! (Need 268 more bytes) Generator a better chance to gain enough entropy. Some other action (type on the keyboard, move the mouse, utilize theĭisks) during the prime generation this gives the random number As you can see the keys are generated using “a lot of random bytes” and is better if you can perform some other actions (move the mouse, type something with the keyboard, open some applications, etc.).Īt the end of the process you will obtain the key ID. In this step gpg will generate the public and private key. You need a Passphrase to protect your secret key. Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O If an attacker will gain the access on your private key, he must first bypass the encryption on the key (he must break the passphrase), so a weak password means that the risk to lose all the encrypted files is very high. Instead use numbers, lower and upper case letters and punctuation. Like every password, don’t use dictionary words, real name, birth date and everything that can be found easily. This is one of the most important steps, because the passphrase will protect your private key, so you must to be careful and choose a very strong password. It’s time to insert the passphrase of your key. You need a user ID to identify your key the software constructs the user IDįrom the Real Name, Comment and Email Address in this form: So insert the real name, the email address and a comment about the key. Now it’s time to insert the data about the user ID, which will identify your key. Please specify how long the key should be valid.Īt the end, if you’re satisfied confirm whit “y”. Then you have to choose the length of your keys. In our example the key will never expire. Choose the most appropriate option that fits your needs. Here, you’re asked to choose the expiration date of your key. There is NO WARRANTY, to the extent permitted by law. This is free software: you are free to change and redistribute it. Gpg (GnuPG) 1.4.10 Copyright (C) 2008 Free Software Foundation, Inc. Note that with the third and fourth options, you’ll obtain a key that can be used only to sign and not to encrypt. The first option is selected by default and you should choose it so at the end, in your keyring, will be available two keys. This command acts in an interactive way and you must answer to some questions.įirst, you have to choose the kind of key. So use the “gpg –gen-key” to generate the keys. With the keys you’ll be able to encrypt and decrypt file. The first step you have to do in order to use gpg, is to generate your keys. You can use it to encrypt file, emails and everything you want! Key management Generate your first keys With this software you can easly manage your keys and use cryptography to secure your file and communication. GPG uses the public/private key cryptography architecture to encrypt/decrypt the contents in a safe way. The GNU Privacy Guard (GPG) is a cryptographic suite released under the GPL license.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |