Thursday, February 4, 2016

Set 1 - Challenge 7


Original Challenge Description from matasano

AES in ECB mode

The Base64-encoded content in this file has been encrypted via AES-128 in ECB mode under the key
"YELLOW SUBMARINE".
(case-sensitive, without the quotes; exactly 16 characters; I like "YELLOW SUBMARINE" because it's exactly 16 bytes long, and now you do too).
Decrypt it. You know the key, after all.
Easiest way: use OpenSSL::Cipher and give it AES-128-ECB as the cipher.

Do this with code.

You can obviously decrypt this using the OpenSSL command-line tool, but we're having you get ECB working in code for a reason. You'll need it a lot later on, and not just for attacking ECB.


My Solution


  • OK, I'm going to incur some technical debt here is the way to decrypt using openssl.


Having said that I know in python or java  its probably going to take a few lines of code to do this once your using a crypto library.  I will try to spend sometime figuring out how to do this in C.
Please let me know if you can recommend any in C library.   or are we supposed to write our own AES program ?




1 comment:

  1. Hi,
    I wonder May I decrypt it by coding a small program? If it's posible, how to do it?
    Thanks!

    ReplyDelete