I want to load the following hexadecimal file that has
1) initializing value (IV) on the first line,
2) encrption key on the second line,
3) number of plain texts on the third line, and
4) actual plain texts for AES encryption in Cipher Block Chaining (CBC) mode
into numpy array.
6bce1cb8d64153f82570751b6653c943
b15a65475a91774a45106fbc28f0df70
10
f493befb2dcad5118d523a4a4bf4a504
54fc4e0a82ae8dc56cc7befc9994b79d
878d287647b457fd95d40691b6e0c8ab
dc0adc16665eb96a15d3257752ae67dc
8cda3b8f23d38e9240b9a89587f69970
e06301763146c1bac24619e61015f481
c19def2f12e5707d89539e18ad104937
048d734a1a36d4346edc7ceda07ff171
5e621ce0a570478c1c2ec3e557ca3e0d
e55c57b119ff922b7f87db0ead2006cd
If the uniformity of the file is bothering you, you may ignore the third line which tells about the number of plain texts to be encrypted. All lines except the third line are 128 bit hexadecimal entries
The idea is to load this file into numpy array and then do AES encryption efficiently.
How can i load this into numpy array and then use AES from Crypto.Cipher to do AES encryption of this file and similar files. I have files of this format having as large as 100 million plain texts.
Thanks and please let me know if you have any questions
Crypto.Cipher.AESany faster, I shouldn't think.