Forum Discussion

ankush82's avatar
ankush82
Icon for Bronze I rankBronze I
14 days ago

Modern Encryption: Demonstrate your skills

I am in the final lab of this collection and the step 3 I need to encrypt the file using aes 256 encryption using the following command and similar other commands I am using for setup 4 & 5 however the commands execute succesfully and a encrypted file is generated however a key file is not generated to decrypt the remaining for encrypted file to complete the lab. I need the help to solve this lab and get the badge.

step 3- openssl enc -aes-256-cbc -a -pbkdf2 -nosalt -in plaintext_1.txt -out plaintext_1.enc

step 4- Encrypt a file using RC4

openssl enc -rc4 -d -pbkdf2 -nosalt -in plaintext_2.txt -out plaintext_2.enc

step 5- Encrypt a file using RC4

openssl enc --des-ede3-cbc -d -pbkdf2 -nosalt -in plaintext_3.txt -out plaintext_3.enc

5 Replies

  • Problem starts from the step 3 itself since I need to encrypt the plaintext1, plaintext2 and plaintext3 to get the key from each step and with the commands mentioned in my post I am able to encrypt but it is not generating the key which required to complete further steps. For step 5 yeah it was typo actually

    • autom8on's avatar
      autom8on
      Icon for Bronze III rankBronze III

      I'm not sure I'm following you... when you encrypt the file for each question, some token_x.txt files should appear on the desktop which contain the token for that question as well as information to complete the further questions... are you saying those files aren't appearing, or don't contain the right information?? 

       

  • The lab has changed a little since I last looked at it in September 2020 - but I've just worked through my notes and completed it without any issue - so it seems to be working OK. 

    For step 5 - you should be passing a "-k" argument with the password (key), as per the instructions in plaintext_3.txt?

     

    • autom8on's avatar
      autom8on
      Icon for Bronze III rankBronze III

      Not sure if you're also missing a "-e"? Won't the "-d" force it to try and decrypt rather than encrypt? 

      My command line for Q5 was:

      openssl enc -e -des-ede3-cbc -in plaintext_3.txt -out plaintext_3.enc -k ShowMeHow2Encrypt -nosalt -pbkdf2