0% found this document useful (0 votes)
106 views8 pages

U2 Ángel

The document provides instructions for various cryptography and steganography activities: 1. It asks to identify classical encryption algorithms and whether they are transposition or substitution ciphers. 2. It asks about current applications of steganography and provides examples of hiding information in images, audio, and video files. 3. It provides steps to hide a text file within an image using LSB steganography and share the encoded image. 4. It instructs on how to encrypt and decrypt a test file using symmetric encryption with GnuPG and notes any problems encountered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views8 pages

U2 Ángel

The document provides instructions for various cryptography and steganography activities: 1. It asks to identify classical encryption algorithms and whether they are transposition or substitution ciphers. 2. It asks about current applications of steganography and provides examples of hiding information in images, audio, and video files. 3. It provides steps to hide a text file within an image using LSB steganography and share the encoded image. 4. It instructs on how to encrypt and decrypt a test file using symmetric encryption with GnuPG and notes any problems encountered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Activities

1. Identify the algorithm and the key in each of the following classical methods. Indicate
whether it is a transposition or a replacement system.

a. Scytale: is a tool used to perform a transposition cipher, consisting of a cylinder with a strip of
parchment wound around it on which is written a message. (TRANSPOSITION)

b. Polybios: Polybius was responsible for a useful tool in telegraphy that allowed letters to be easily
signaled using a numerical system (mentioned in Hist. X.45.6 ff.). This idea also lends itself to
cryptographic manipulation and steganography. (SUSTITUON)

c. Caesar: is one of the simplest and most widely known encryption techniques. It is a type of
substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of
positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would
become B, and so on. (SUSTITUTION)

d. Vigenère: In a Caesar cipher, each letter of the alphabet is shifted along some number of places;
for example, in a Caesar cipher of shift 3, A would become D, B would become E, Y would become
B and so on. The Vigenère cipher consists of several Caesar ciphers in sequence with different shift
values. (SUSTITUTION)

2. Research what are the current applications are Steganografy. Give some examples of
steganographic techniques in images, audio, video or text.

Is the practice of concealing a file, message, image, or video within another file, message, image, or
video. The word steganography combines the Greek words steganos (στεγανός), meaning "covered,
concealed, or protected," and graphein"writing".

In pictures

Example using LSB technique.


The most used method is the LSB, since for a computer an image file is simply a file that shows
different colors and light intensities in different areas (pixels).

In audio

When information is hidden within audio files, usually the technique used is low bit encoding,
which is similar to the LSB commonly used in images. The problem with the low bit encoding is
that it is generally perceptible to the human ear.

In video

In video, the DCT (Discrete Cosine Transform) method is usually used. DCT works by slightly
changing each of the images in the video, only in a way that is not perceptible by the human eye.
3. Oculta un texto dentro de una imagen. Ayuda: http://www.taringa.net/posts/info/15371860/Como-
ocultar-archivos-adentro-de-imagenes-audio-o-videos.html

a. Crea un archivo que contenga un texto sencillo.

b. Comprime el fichero de texto.

c. Busca una imagen de un tamaño medio.

d. Oculta el archivo comprimido en la imagen. Llama a la nueva imagen tunombre.jpeg

e. Comprueba cómo el tamaño de tunombre.jpeg es mayor que la imagen inicial (siempre que el
fichero de texto tenga un tamaño considerable).

f. Comparte tunombre.jpeg en el servidor del aula.

g. Descarga la imagen de un par de compañeros y visualiza las imágenes ¿Qué información ocultan
sus imágenes?
4. El comando gpg (GnuPG en Windows) se utiliza para realizar el cifrado y descifrado simétrico de
un documento de prueba. Crea un texto de prueba y cifra y descífralo. Anota los pasos realizados y
problemas encontrados. Ayuda: http://www.genbetadev.com/seguridad-informatica/manual-de-gpg-
cifra-y-envia-datos-de-forma-segura

a. Crea un nuevo archivo llamado simetrico (sin extensión) que contenga el texto Esto es una
prueba

b. Cifra mediante el comando gpg el fichero simetrico (empleando un algoritmo de cifrado


simétrico. Emplea la clave si

si@siVM ~/Escritorio $ gpg -c simetrico

c. Abre el texto fichero con el texto cifrado (se llama simetrico.gpg) ¿Puedes leer el texto que
escribiste? NO

d. Descifra mediente gpg el archivo simetrico.gpg empleando la clave si. Almacena el texto
descifrado en un fichero llamada descifrado

si@siVM ~/Escritorio $ gpg -d simetrico.gpg

e. ¿Qué ocurre si introducimos mal la contraseña?

gpg: descifrado fallido: clave incorrecta

f. Comprueba cómo cada vez que se utiliza gpg -c, se genera un archivo cifrado distinto.
5. Utiliza el comando gpg (GnuPG) para realizar las siguientes operaciones, anotando los pasos
realizados y problemas encontrados: Ayuda: http:
//www.genbetadev.com/seguridad-informatica/manual-de-gpg-cifra-y-envia-datos-de-forma-segura

a. Genera una clave pública y una privada (utiliza una contraseña sencilla) y lista las claves públicas
y privadas que hay en tu anillo de claves local.

gpg --gen-key

b. Extrae la clave pública a un fichero llamado tunombre.pub

gpg --output angel.pub --export B92F034B

c. Exporta cifrada la clave privada al fichero tunombre.priv (recuerda siempre mantenerla en un


lugar seguro) $ gpg --export-secret-keys -a [IDdeLaClavePublica] > tunombre.priv

si@siVM ~/Escritorio $ gpg --export-secret-keys -a B92F034B > angel.priv

d. Sube al servidor FTP del ordenador de la profesora tu clave pública (tunombre.pub)

e. Descarga del servidor FTP las claves públicas de dos alumnos de tu curso (extensión .pub).

f. Importa las claves públicas que acabas de descargar (extensión .pub).

si@siVM ~/Escritorio $ gpg --import agustin.pub

g. Genera un fichero de prueba llamado paraNombreCompañero y cífralo con la clave pública que
antes importaste. Repite el proceso con otro fichero y cífralo con la segunda clave pública que
descargaste. Súbelo al ordenador de la profesora.

si@siVM ~/Escritorio $ gpg --import agustin.pub


si@siVM ~/Escritorio $ gpg --import Leeroy.pub

h. Sube al servidor FTP de clase los dos ficheros cifrados (extensión gpg) que creaste en el punto
anterior.

i. Recoge del servidor FTP todos aquellos ficheros de los que seas el destinatario. Descífralos
empleando tu clave privada.

gpg -d Angel.gpg

j. Publica tu clave pública en un servidor de claves (por ejemplo pgp.rediris.es).


(Necesitarás conexión a Internet). Una vez enviada nuestra clave al servidor de
claves, esta automáticamente es reenvíada a todos los servidores de claves del
mundo y NO ES POSIBLE borrarla de ellos. Comprobad que tenéis bien escrito el
nombre, dirección de correo y comentario antes de enviar la clave (es mejor evita
los acentos y las ñ).
l. Revocación de las claves publicadas.
Imagina que la clave pública que has generado deja de ser válida antes de la
fecha que estableciste establecida por algún motivo (por ejemplo, al verse
comprometida su seguridad). Deberemos entonces revocarla, es decir, dejarla
inutilizada.
Una clave pública revocada no puede ser empleada para encriptar mensajes pero
sí se puede emplear para desencriptar mensajes generados antes de la fecha de
revocación.
 Genera el certificado de revocación llamado revocartunombre.asc en
formato ASCII.

6. Calculate how many keys need to be exchanged in a group of five persons who want to send
encrypted emails each other, both for the case of using symmetric and asymmetric cryptography.
What if there are ten persons in the group? And what if there are one hundred?

For 10 users in simetric is a 45 keys.

For 10 users in asimetric is a 20 keys.

For 100 users in simetric is a 4950 keys.

For 100 users in asimetric is a 200 keys.


7. Use the application WinMD5, that computes the hash value of a file using the MD5 algorithm.

a. Create several text documents.

Wololo.txt lololo.txt Trololo.txt

b. Compute their hash values. Write down the steps performed.

Wololo.txt=a438d59a61d0e8b57c127b59c1877da2

lololo.txt=bf6d6d7226bfe447a48e3a405c6ec406

Trololo.txt=82d8a1bc6a5cbb369011e1bfdab81d5d

c. Are you getting very similar hash values?

Are not similar.

d. How much different are the hash values from two documents that differ only in a character?

Totally changes.

8. Use the md5sum command of the GNU Core Utilities hash function to generate a test file. Write
down the steps taken and problems encountered.

9. Utiliza GnuPG (comando gpg) para generar la firma digital de un documento de prueba. Utiliza
el comando gpg (GnuPG) para realizar las siguientes operaciones, anotando los pasos realizados y
problemas encontrados: Ayuda:
http://www.genbetadev.com/seguridad-informatica/manual-de-gpg-cifra-y-envia-datos-de-forma-
segura https://www.gnupg.org/gph/es/manual/x154.html

a. Crea un documento de texto con un texto cualquiera y llámalo firma.

b. Genera una clave pública y una privada

c. Firma con la clave privada el archivo firma. Llama al archivo firmado firma.sig
d. Comprueba la firma

e. Comprueba la firma y recupera el documento original al mismo tiempo.

f. ¿Para qué sirve el parámetro --clearsign? ¿Cómo se utiliza?

Se emplea para firmar un documento sin cifrarlo.

g. ¿Qué hace el siguiente comando gpg --detach-sign -a firma? ¿Cuándo puede ser útil?

crea un documento con extensión .asc sólo con la firma.

Se puede usar perfectamente para firmar archivos que no sean de texto.

h. Verifica la firma del punto anterio

gpg –verify firma.sig

10.Have a look the digital certificate used by any secure website. What relevant information is
included
11. Find out the steps to be performed in order to get and install a certificate from the Agencia de
Tecnología y Certificación Electrónica? How can be validated whether a certificate has been
revoked or not?

Go to any of the User Registration Points in the Valencian Community and identify yourself with
your valid ID, NIE or Spanish passport.

12. Descarga el certificado raíz de la Fábrica Nacional de Moneda y Timbre (FNMT). Incorpórala a
tu navegador como Autoridad de Certificación Válida. Comprueba que la descarga es correcta
(sha1sum fichero)

13.Obtén un certificado digital dándote de alta en CAcert. ¿Para qué se puede utilizar este
certificado?

You might also like