Quiz 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

[TYPE THE COMPANY NAME]

[Type the document title]


[Type the document subtitle]
Tesfu
[Pick the date]

[Type the abstract of the document here. The abstract is typically a short summary of the contents of
the document. Type the abstract of the document here. The abstract is typically a short summary of the
contents of the document.]
Quiz 2: DES, RSA and Certificates with openSSL

Cipher a file with a symmetric algorithm of your choice (DES). Cipher the key
with public key of your left/right neighbor (ask him on USB key if you don’t
have it, RSA). Send him the encrypted file and the encrypted symmetric key

1. First generate a pair of keys i.e. public and private keys by using RSA
 openssl> genrsa –out privatekey.pem 1024 ………for private key
 openssl> rsa -in private_key.pem –pubout –out publickey.pem ……..for public key
To visualize the content of privatekey.pem containing RSA key pairs, we can use the
following commands:
 openssl>rsa –in privatekey.pem -text -noout
2. After create these pair keys we can send our public key i.e. “publickey.pem” to neighbor
group and at same time we are accept their public keys from neighbor.
3. We accept file that are encrypted by our public key and we are also send a file after we
encrypted it by neighbor public key’s
4. Then we decrypt the key file by our private key,
 Openssl> rsautl –decrypt -in passwordenc –inkey privatekey.pem –out encfile
5. After that we decrypt the message file by decrypted key called encfile, and get original
file name, then save file as “originalfile”.
 Openssl>enc –des3 –d –in original_enc –out originalfile pass file: encfile
6. Finally we have get the original message

You might also like