next up previous contents
Next: SSH, SSL, TLS Up: Implementaciones Previous: Implementaciones   Índice General

PGP

El principal programa utilizado hoy en día --y desde hace 1991, cuando fue desarrollado por Phillip Zimmerman-- para cifrar comunicación que viaja por correo electrónico es el PGP (Pretty Good Privacy), o su contraparte libre, el GPG (GNU Privacy Guard). Este puede cifrar mensajes completos, generar firmas digitales y mantener listas de contactos en llaveros de confianza (ver sección 4.1). Una llave pública de PGP se ve como la siguiente:

---BEGIN PGP PUBLIC KEY BLOCK--- Version: 2.6.3i 
mQCNAzh/gZwAAAEEAL4wTB0IbqzpH7XQxlCFXMidpQ3Gs0o6otB98600D5clWLTO  
QGvB1fVzZCriYubnYH/ySHXoz0xwqCcexPKLgKNOZjgs6yP4HZ6/uHE/QtMtL/5W  
GbfWL7MVe5Zjj30SKbuax26ivCvgWUG6yyBWajtObd5QJL8z1tMzDJJgDm8tAAUR  
tB9HdW5uYXIgV29sZiA8Z3dvbGZAYXNjLnVuYW0ubXg+iQCVAwUQOH+BnNMzDJJg  
Dm8tAQG9RAQAgPb6Gy+qz+9+lQxg5PsWcMdm9jHUNYHX1pSsBeq/m6oAxBdwVk+E  
NNwMRyE7G2iXb2fWoZ7fUrqTP05AbeIzYz88ql5bjQhgiCbCNL8Wqvn2/UTJOtuR  
LgFeoqNMeuzst1IqtePhg/OGI73lLYRoPniwggR7D2s/5dxwnmGGxxY=  
=2dPb  
---END PGP PUBLIC KEY BLOCK---

Partimos de un archivo llamado test.txt, que contiene el siguiente texto:

Este es mi mensaje de prueba

Para cifrar un mensaje utilizando esta llave, utilizaríamos el comando:

pgp -ea test.txt

El sistema nos pide el nombre del destinatario. En este caso, el mensaje va dirigido a gwolf:

Recipients' public key(s) will be used to encrypt.

A user ID is required to select the recipient's public key.

Enter the recipient's user ID: gwolf

Tenemos ahora un archivo test.asc, con el siguiente contenido:

---BEGIN PGP MESSAGE--- Version: 2.6.3i 
hIwD0zMMkmAOby0BA/447eMxEGVrTHGZxI+J4zwwJktboylzoj84bPPZwEG8sYqC  
ybW9bGZwra5vfojj7YByJq+uKHgNlzwivEOtZAUfjRH+fso3IlM5vJFnu32o7Y8f  
lkm8mIYJ9/JpYtxK2NEZmZ8GWoLGer9+LcFjhJh1QkgSzz2hck7ZvVuEXbA2SaYA  
AAA5/Mc6Ji/KcJQXE7FQJKfFTHoYBTO1Kc3X9o7mPK7Qj6yUxQqNG1DfV2oN7BuZ  
JK6RlNug3b62J2dM  
=z259  
---END PGP MESSAGE---

Ahora, para descifrar el mensaje, el usuario dueño de la llave utilizada da el comando:

pgp -d test.asc

El sistema pide la contraseña, tras lo cual recupera el mensaje que le dimos originalmente.

You need a pass phrase to unlock your RSA secret key.

Enter pass phrase: Pass phrase is good. Just a moment......

Plaintext filename: test.txt

Y en el archivo test.txt encontraremos nuestro texto original:

Este es mi mensaje de prueba


next up previous contents
Next: SSH, SSL, TLS Up: Implementaciones Previous: Implementaciones   Índice General
Gunnar Wolf
2000-12-15