meditationatae

Just another WordPress.com site

Bash script to encipher given file 10 times in aes-256-cbc with initialization vector

To start, copy the “random” file to:

aesrandom_bestofthree.bin0

The purpose of encrypting 10 times with AES-256 in CBC mode is to obscure any relationship with the *.wav file on the insecure Windows 10 laptop. Done on a Linux box running CentOS 6.8 x64 in SELinux enforcing mode:

 

(script follows with actual values of keys used last time):

 

#!/bin/bash
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin0 -out aesrandom_bestofthree.bin1 -e -K “a327df2d119f2f6ec73606eeeb320b875a247ee657098bd5394946b580fc15b5” -iv “ea2f50e196c57dfacb7e141d66f54f57”
chmod go-rwx aesrandom_bestofthree.bin1
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin1 -out aesrandom_bestofthree.bin2 -e -K “553da66e55faa98eb7d9c65dc502f544086a04c333bb7435e306aad3df8fa0e6” -iv “56fc7c8abfd1812f81bf897ddda36b42”
chmod go-rwx aesrandom_bestofthree.bin2
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin2 -out aesrandom_bestofthree.bin3 -e -K “6f68baa5066c20d1bc65c5a4f362bd1c82dc7729b7916123570e1260939e5993” -iv “745dd5ce91f35e79b4cff4fde98085a0”
chmod go-rwx aesrandom_bestofthree.bin3
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin3 -out aesrandom_bestofthree.bin4 -e -K “b2575b91b5d6be4e50743895460c0005915d8322ec917ebcebcf7fcd5cf362cc” -iv “28f9c2483c26959afbea6707595a68b9”
chmod go-rwx aesrandom_bestofthree.bin4
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin4 -out aesrandom_bestofthree.bin5 -e -K “a826761518043298b7ef273f5846c1c7466b630f1331330b3a4c98ad96a42430” -iv “7f67d08fea5ee370eb32bac9cb4012ee”
chmod go-rwx aesrandom_bestofthree.bin5
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin5 -out aesrandom_bestofthree.bin6 -e -K “a71ad2d66503f825d062860dd83dee8da7245a5170fca9beee2f175b2ed1b1f7” -iv “fb0d3d338eccec7f587815f50875c812”
chmod go-rwx aesrandom_bestofthree.bin6
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin6 -out aesrandom_bestofthree.bin7 -e -K “f46ff3795936c2833a10b39ebbb32b6fcd51fbecd50ee3064512822258f9f2a7” -iv “b84f19d6281926cd292a290f46bd221b”
chmod go-rwx aesrandom_bestofthree.bin7
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin7 -out aesrandom_bestofthree.bin8 -e -K “595fb519eb35739f4732dad23846582ab7ba21e1bd3fdf1ebf7c5acb0b989d23” -iv “cfaeabe69249d36949d15393ff5ea927”
chmod go-rwx aesrandom_bestofthree.bin8
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin8 -out aesrandom_bestofthree.bin9 -e -K “6475d2a36c689c697727463c306c8090e8e527a49f4dfc7d1de05a90042c6d9b” -iv “c8b424e9f7e9a276bd40c287653cadfc”
chmod go-rwx aesrandom_bestofthree.bin9
openssl enc -aes-256-cbc -in aesrandom_bestofthree.bin9 -out aesrandom_bestofthree.bin10 -e -K “a3863f9fdead1dfbb16317f7efa7ec11a4ca515310690237222c09280e9612b4” -iv “5ab11fc5ea7086002d1eaa34eba3eb83”
chmod go-rwx aesrandom_bestofthree.bin10
rm aesrandom_bestofthree.bin0
rm aesrandom_bestofthree.bin1
rm aesrandom_bestofthree.bin2
rm aesrandom_bestofthree.bin3
rm aesrandom_bestofthree.bin4
rm aesrandom_bestofthree.bin5
rm aesrandom_bestofthree.bin6
rm aesrandom_bestofthree.bin7
rm aesrandom_bestofthree.bin8
rm aesrandom_bestofthree.bin9
mv aesrandom_bestofthree.bin10 aesrandom_bestofthree.bin0

 

END OF SCRIPT ABOVE

 

Advertisements

Written by meditationatae

January 14, 2017 at 7:48 pm

Posted in History

%d bloggers like this: