From Fedora Project Wiki
Line 112: Line 112:
</pre>
</pre>


Your "GPG key ID" consists of 8 hex digits identifying the public key. In the example above, the GPG key ID is 1B2AFA1C. In most cases, if you are asked for the key ID, you should prepend "0x" to the key ID, as in "0x1B2AFA1C".
Su "ID de clave GPG" se compone de 8 dígitos hexadecimales que identifican la clave pública. En el ejemplo anterior, la clave GPG ID es 1B2AFA1C. En la mayoría de los casos, si se le solicita el ID de la llave, se debe anteponer "0x" al ID de la llave, como en "0x1B2AFA1C".


{{admon/warning|If you forget your passphrase, the key cannot be used and any data encrypted using that key will be lost.|}}
{{admon/warning| Si olvida su contraseña, la clave no se puede utilizar y se perderán todos los datos cifrados con esa clave.|}}


Ahora usted debe [[#BackupCLI|  hacer un respaldo]] de su clave privada.
Ahora usted debe [[#BackupCLI|  hacer un respaldo]] de su clave privada.

Revision as of 04:17, 6 June 2015

Esta pagina explica a detalle como obtener una llave GPG mediante utilidades comunes de Fedora. También provee de información sobre la gestión de su clave como colaborador de Fedora. EN CONSTRUCCIÓN

Creando llaves GPG

Creando llaves GPG desde el escritodio GNOME

Instalar la utilidad Seahorse lo cual hace la gestión de claves GPG sencilla. Desde el menú principal seleccionamos Aplicaciones > Añadir/Eliminar Software. Seleccionamos Buscar e introducimos el nombre seahorse. Selecionamos la casilla al lado del paquete seahorse y seleccionamos Aplicar para añadir el software. También puedes instalar Seahorse usando la línea de comando su -c "yum install seahorse"

Para crear una llave vamos a las actividades y seleccionamos Passwords and Encryption Keys la cual comienza la aplicación Seahorse.

Desde menú vamos a la pestaña File seleccionamos New... y luego PGP Key, le damos a Continue. Escriba su nombre completo, dirección de correo electrónico, y un comentario opcional describiendo quien es usted (ej.: John C. Smith, jsmith@example.com, The Man). Clic en Create. Un mensaje aparecerá solicitando una contraseña para la llave. Elija una contraseña fuerte y a la vez fácil de recordar. Clic en OK y la llave es creada.

Warning.png
Si usted olvida su contraseña, la llave no podrá ser usada y se perderá todos los datos cifrados con esa clave.

Para encontrar el ID de su clave GPG haga clic en la pestaña My Personal Keys y busque en la columna Key ID la nueva clave creada. En la mayoría de los casos, si usted pregunta por su clave ID, deberá anteponer "0x" a la clave ID, ej: "0x6789ABCD".

Ahora debe hacer un respaldo de su llave privada.

Creando claves GPG usando el escritorio KDE

Inicio el programa KGpg desde el menú principal seleccionando Utilidades > PIM > KGpg. Si usted nunca ha usado KGpg el programa le guiará a través del proceso de creación de su propio par de claves GPG.

Un cuadro de dialogo aparecerá y le solicitará la creación del nuevo par de claves. Ingrese su nombre, correo electrónico, y un comentario opcional. También puede elegir la fecha de expiración para su clave, así como la dureza de la llave (número de bits) y algoritmos. El siguiente cuadro de diálogo le pedirá su contraseña. Hasta este punto, su llave aparecerá en la ventana principal KGpg.

Warning.png
Si usted olvida su contraseña, la llave no podrá ser usada y se perderá todos los datos cifrados con esa clave.


Para encontrar su ID de la clave GPG, busque en la columna Key ID junto a la clave recién creada. En la mayoría de los casos, si usted pregunta por su clave ID, deberá anteponer "0x" a la clave ID, ej: "0x6789ABCD".

Ahora deberá hacer un respaldo de su clave privada.

Creando claves GPG usando líneas de comando

Use el siguiente comando shell:

gpg --gen-key

Este comando genera un par de claves que consiste en una clave pública y privada. Otras personas usan su clave pública para atenticar y/o desencriptar sus comunicaciones. Distribuye tu clave pública lo más ampliamente posible, especialmente a personas que usted conoce quienes quisieran recibir comuni caciones auténticas de ti, tales como una lista de correo. El proyecto de Documentación Fedora, por ejemplo, pide a los participantes incluir su clave pública GPG en su auto-presentación.

Una serie de indicaciones que te dirigen hacia el proceso. Pulsa la tecla Enter para asignar un valor por defecto si se desea. El primer mensaje le pide que seleecione el tipo de clave que prefieras:

Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection? 

En la mayoría de los casos, la opción por defecto es la correcta. Una llave RSA/RSA no sólo permite firmar las comunicaciones, sino también encriptar archivos. Siguiente, elegir el tamaño de la clave:

RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 

Una vez más, el valor por defecto es suficiente para la mayoría de usuarios, y representa un extremado alto nivel de seguridad.

Siguiente, eligir cuando la clave expirará. Es buena idea elegir la fecha de vencimiento en lugar de usar el valor por defecto, que es no. Si, por ejemplo, la dirección de correo electrónico no es válida, una fecha de caducidad recordará a otros dejar de utilizar esa clave pública.

Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 

Al ingresar el valor 1y, por ejemplo, hará que la llave sea válida por un año. (Usted puede cambiar esta fecha de expiración después de que la clave sea generada, por si cambia de opinión).

Antes de que el programa gpg pida la información de la firma, aparecerá el mensaje siguiente:

Is this correct (y/n)?

Ingrese y para finalizar el proceso.

Después, ingrese su nombre y dirección de correo. Recuerde que este proceso se trata de autenticarte a ti como persona individual. Por esta razón, incluya su nombre real. No use un alias ya que puede confundir su indentidad.

Ingrese su correo electrónico real a su clave GPG. Si usted elige un correo falso, será difícil para otros encontrar tu clave pública. Esto hace que la autentificación de comunicaciones sea difícil. Si usted esta utilizando esta clave GPG para self-introduction en una lista de correo, por ejemplo, introduzca la dirección de correo electrónico que utiliza en esa lista.

Utilice el espacio de comentario para incluir alias u otra información. (Algunas personas usan diferentes claves para diferentes propósitos e indentifica cada una de las claves con un comentario, como "Oficina" o "Poyecto Software Libre.")

Cuando aparezca la confirmación, ingrese la letra O para continuar si todo está correcto, o use las otras opciones para arreglar cualquier problema.

Finalmente, ingrese una frase para su clave secreta. El programa gpg le pedirá que introduzca su contraseña dos veces para asegurarse de que usted no haya cometido algún error al escribirlo.

Por último, gpg genera datos aleatorios para hacer su clave tan único como sea posible. Mueva el puntero del ratón, escriba claves aleatorias o realizar otras tareas en el sistema durante este paso para acelerar el proceso. Una vez terminada esta etapa, las llaves están completos y listos para su uso:

pub  1024D/1B2AFA1C 2005-03-31 John Q. Doe (Fedora Docs Project) <jqdoe@example.com>
Key fingerprint = 117C FE83 22EA B843 3E86  6486 4320 545E 1B2A FA1C
sub  1024g/CEA4B22E 2005-03-31 [expires: 2006-03-31] 

La huella de la clave es una abreviatura asignada a su clave. Esto permite a otros confirmar si han recibido su clave pública actual sin ninguna manipulación. No es necesario escribir esta huella abajo. Para mostrar la huella en cualquier momento, utiliza este comando, sustituyendo tu correo electrónico:

gpg --fingerprint jqdoe@example.com

Su "ID de clave GPG" se compone de 8 dígitos hexadecimales que identifican la clave pública. En el ejemplo anterior, la clave GPG ID es 1B2AFA1C. En la mayoría de los casos, si se le solicita el ID de la llave, se debe anteponer "0x" al ID de la llave, como en "0x1B2AFA1C".

Warning.png
Si olvida su contraseña, la clave no se puede utilizar y se perderán todos los datos cifrados con esa clave.

Ahora usted debe hacer un respaldo de su clave privada.

Making a Backup

Important.png
Make a backup of your private key and put it in a safe location such as a CD, DVD, or USB key stored in a secure container.

Making a Key Backup Using the GNOME Desktop

Right-click your key and select Properties. Select the Details tab, and Export, next to the Export Complete Key label. Select a destination filename and click Save.

Store the copy in a secure place, such as a locked container. Now you are ready to make your public key available to others .

Making a Key Backup Using the KDE Desktop

Right-click your key and select Export Secret Key. At the confirmation dialog, click Export to continue, then select a destination filename and click Save.

Store the copy in a secure place, such as a locked container. Now you are ready to make your public key available to others .

Making a Key Backup Using the Command Line

Use the following command to make the backup, which you can then copy to a destination of your choice:

gpg --export-secret-keys --armor jqdoe@example.com > jqdoe-privkey.asc

Store the copy in a secure place, such as a locked container. Now you are ready to make your public key available to others .

Making Your Public Key Available

When you make your public key available to others, they can verify communications you sign, or send you encrypted communications if necessary. This procedure is also known as exporting.

You should now export your key using GNOME , KDE , or the command line . You can also copy your key manually to a file if you wish to email it to individuals or groups.

Exporting a GPG Key Using the GNOME Desktop

Export the key to a public keyserver where other project members can obtain it. Right-click the key and select Sync and Publish Keys... (or in the seahorse menu bar click on the Remote menu and select Sync and Publish Keys...). Click Key Servers, select hkp://subkeys.pgp.net:11371 in the Publish Keys To combobox, click Close and then Sync.

Note.png
If the key can't be synchronized, the traffic may be blocked by a firewall. In this case you can publish the key with a different method. Copy the key by right-clicking the key and selecting Copy Public Key. Use a web browser to load the page "http://subkeys.pgp.net/", paste (Ctrl+V) the public key in the Submit a Key textbox and click Submit this key to the keyserver!. Your public key then becomes available on the public server for others to copy and use.

You can now read more about safeguarding your key or use your browser to go back to a previous page.

Exporting a GPG Key Using the KDE Desktop

After your key has been generated, you can export the key to a public keyserver by right-clicking on the key in the main window, and selecting Export Public Keys. From there you can export your public key to the clipboard, an ASCII file, to an email, or directly to a key server. Export your public key to the default key server.

Note.png
If the key can't be synchronized, the traffic may be blocked by a firewall. In this case you can publish the key with a different method. Copy the key by right-clicking the key and selecting Copy Public Key. Use a web browser to load the page "http://subkeys.pgp.net/", paste (Ctrl+V) the public key in the Submit a Key textbox and click Submit this key to the keyserver!. Your public key then becomes available on the public server for others to copy and use.

You can now read more about safeguarding your key or use your browser to go back to a previous page.

Exporting a GPG Key Using the Command Line

Use the following command to send your key to a public keyserver:

gpg --send-key KEYNAME

For KEYNAME, substitute the key ID or fingerprint of your primary keypair.

This will send your key to the gnupg default key server (keys.gnupg.net), if you prefer another one use :

gpg --keyserver hkp://pgp.mit.edu --send-key KEYNAME

Replacing "pgp.mit.edu" with your server of choice.

You can now read more about safeguarding your key or use your browser to go back to a previous page.

Copying a Public Key Manually

If you want to give or send a file copy of your key to someone, use this command to write it to an ASCII text file:

gpg --export --armor jqdoe@example.com > jqdoe-pubkey.asc

You can now read more about safeguarding your key or use your browser to go back to a previous page.

Safeguarding Your Secret Key

Treat your secret key as you would any very important document or physical key. (Some people always keep their secret key on their person, either on magnetic or flash media.) If you lose your secret key, you will be unable to sign communications, or to open encrypted communications that were sent to you.

Warning.png
Always keep your passphrase secret!
Even if your secret key is accessed by someone else, they will be unable to use it without your passphrase. Do not choose a passphrase that someone else might easily guess. Do not use single words (in any language), strings of numbers such as your telephone number or an official document number, or biographical data about yourself or your family for a passphrase. The most secure passphrases are very long and contain a mixture of uppercase and lowercase letters, numbers, digits, and symbols. Choose a passphrase that you will be able to remember, however, since writing this passphrase down anywhere makes it immediately less secure.

GPG Key Revocation

When you revoke a key, you withdraw it from public use. You should only have to do this if it is compromised or lost, or you forget the passphrase.

Generating a Revocation Certificate

When you create the key pair you should also create a key revocation certificate. If you later issue the revocation certificate, it notifies others that the public key is not to be used. Users may still use a revoked public key to verify old signatures, but not encrypt messages. As long as you still have access to the private key, messages received previously may still be decrypted. If you forget the passphrase, you will not be able to decrypt messages encrypted to that key.

gpg --output revoke.asc --gen-revoke KEYNAME

If you do not use the --output flag, the certificate will print to standard output.

For KEYNAME, substitute either the key ID of your primary keypair or any part of a user ID that identifies your keypair. Once you create the certificate (the revoke.asc file), you should protect it. If it is published by accident or through the malicious actions of others, the public key will become unusable. It is a good idea to write the revocation certificate to secure removable media or print out a hard copy for secure storage to maintain secrecy.

Revoking a key

gpg --import revoke.asc

Once you locally revoke the key, you should send the revoked certificate to a keyserver, regardless of whether the key was originally issued in this way. Distribution through a server helps other users to quickly become aware the key has been compromised.

Export to a keyserver with the following command:

gpg --keyserver subkeys.pgp.net --send KEYNAME

For KEYNAME, substitute either the key ID of your primary keypair or any part of a user ID that identifies your keypair.

See the Using_GPG page for more ideas on using your new GPG keys.