A Logo

Feel free to include my content in your page via my
RSS feed

Help Irongeek.com pay for
bandwidth and research equipment:

Subscribestar or Patreon

Search Irongeek.com:

Affiliates:
Irongeek Button
Social-engineer-training Button

Help Irongeek.com pay for bandwidth and research equipment:

paypalpixle


Crypto & Block Cipher Modes (OpenSSL, AES 128, ECB, CBC) (Hacking Illustrated Series InfoSec Tutorial Videos)

Crypto & Block Cipher Modes
(OpenSSL, AES 128, ECB, CBC)


Hopefully this will give a nice visual illustration of how Electronic codebook (ECB) and Cipher-block chaining (CBC) work using AES-128 and OpenSSL. You can learn a lot from a known plain text, and repeating patterns.

Video by Adrian Crenshaw
Inspired by labs from Kevin Benton &
"Crypto Lab 1" SEED

 

Download from:
http://www.archive.org/download/CryptoBlockCipherModesopensslAes128EcbCbc/CryptoBlockCipherModesopensslAes128EcbCbc.wmv

Commands used:

openssl enc -aes-128-ecb -e -in dawn.txt -out dawnciphered.txt \
-K 00112233445566778889aabbccddeeff -iv 0102030405060708

openssl enc -aes-128-ecb -e -in noon.txt -out noonciphered.txt \
-K 00112233445566778889aabbccddeeff -iv 0102030405060708

hexdump noonciphered.txt

hexdump dawnciphered.txt

ls -l

head -c 54 plain.bmp > ecb.bmp

openssl enc -aes-128-ecb -e -in plain.bmp -out temp.bin -K 00112233445566778889aabbccddeeff -iv 0102030405060708

tail -c 266880 temp.bin >> ecb.bmp

head -c 54 plain.bmp > cbc.bmp

openssl enc -aes-128-cbc -e -in plain.bmp -out temp.bin -K 00112233445566778889aabbccddeeff -iv 0102030405060708

tail -c 266880 temp.bin >> cbc.bmp
 

Printable version of this article

15 most recent posts on Irongeek.com:


If you would like to republish one of the articles from this site on your webpage or print journal please contact IronGeek.

Copyright 2020, IronGeek
Louisville / Kentuckiana Information Security Enthusiast