• Log In
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • HomePage
  • About
  • Syllabus
  • Schedule
    • Section 1
      • Week 1: Course Introduction
      • Week 2: Access Controls
      • Week 3: Systems Software Security
      • Week 4: Applications Software Security
      • Week 5: Cryptography Protocols
      • Week 6: Practical Cryptography
      • Week 7: Midterm Exam
    • Section 2
      • Week 8: Business Continuity & Disaster Recovery
      • Week 9: Security Operations
      • Week 10: Physical & Environmental Security
      • Week 11: Security Architecture & Design
      • Week 12: – Network Protocols
      • Week 13: Telecommunications and Network Security
      • Week 14: Risk Management and Compliance
      • Week 15: Final Exam
  • Course Material
    • Case Studies
      • C2.1 (9/12)
      • C4.1 (9/26)
      • C6.1 (10/10)
      • C8.1 (10/24)
      • C9.1 (10/31)
      • C10.1 (11/7)
      • C11.1 (11/14)
    • Practical Assignments
      • PA1.1 (Due 9/12)
      • PA2.1 (Due 9/26)
      • PA4.1 (Due 10/3)
      • PA5 (Due 10/17)
        • PA5.1
        • PA5.2
        • PA5.3
      • PA8.1 (Due 10/31)
      • PA9.1 (Due 11/7)
      • PA10.1 (Due 11/7)
      • PA11.1 ( Due 11/24)
      • PA12.1 (Due 11/28)
      • PA13 (Due 12/5)
        • PA13.1
        • PA13.2
        • PA13.3
    • Written Assignments
      • WA2.1 (Due 9/19)
      • WA3.1 (Due 9/26)
      • WA4.1 (Due 10/3)
      • WA6.1 (Due 10/17)
      • WA8.1 (Due 10/31)
      • WA9.1 (Due 11/7)
      • WA10.1 (Due 11/14)
      • WA12.1 (Due 11/28)
      • WA13.1 (Due 12/5)
  • Webex
  • Gradebook

ITACS 5209

Temple University

Week 5 Practical Assignment Part 2

PA5.2: Using OpenSSL to work with asynchronous encryption algorithms

In this exercise, we will use OpenSSL on Astro to encrypt/decrypt files using some of the protocols we learned about.

To begin, log in to your Astro account using an SSH client of your choice, and complete the following steps (adopted from http://users.dcc.uchile.cl/~pcamacho/tutorial/crypto/openssl/openssl_intro.html#htoc1)

  1. Use OpenSSL to generate a key pair:
    1. Use the command openssl genrsa -out key.pem 1024 to generate your key file.
      1. Take a look at the contents of the key file, and paste into your answers.  Are there two keys here?
    2. We can also look at the details of the key file using the following command:  openssl rsa -in key.pem -text –noout
      1. Explain what each section of this output means.
    3. Next, we will extract the private key using openssl rsa -in key.pem -des3 -out enc-key.pem
      1. Note that you will be asked for a password, since we are encrypting this key using 3DES.  Why are we encrypting this key?
    4. Next, we will extract the public key using openssl rsa -in key.pem -pubout -out pub-key.pem
  2. Next, make a copy of your public key, naming is <userid>.pem, and place this in the shared class folder.
  3. Find another student’s public key, and copy to your home directory.
  4. You will now encrypt a file to send securely to another student:
    1. Create a file whose contents are the name a character from a work of fiction.
    2. Encrypt that file using the other student’s public key using the following command: openssl rsautl -encrypt -in yourfile.txt -inkey <their userid>.pem -pubin -out <their userid>_<your userid>.enc
    3. Copy the file to the shared class directory for this assignment
  5. Next, check the shared class directory for files left for your userid, which you will decrypt using your private key:
    1. Use this command to decrypt the file, using your private key: openssl rsautl -decrypt -inkey enc-key.pem -in <your userid>_<their userid>.enc -out decrypted.txt
    2. View the contents of your file.
      1. What are the contents?  Did it work?  (If not, repeat with another student, or contact another student and try resolving the issue).

Primary Sidebar

Weekly Discussions

  • Uncategorized (12)

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in