• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2559
  • Last Modified:

Programming AES Encryption - Mix Columns Part

I'm not understanding at all how I can program this... I'm quite confused at the moment..

I'm hoping someone here can break it down into layman's terms for me...

best way probably for me to understand is maybe by picking a couple numbers and showing me in a psuedo code type of way, how I could come up with the correct answer

at the moment i have:

d4  e0  48  28
bf  b4  41  27
5d  52  11  98
30  ae  f1  e5

I guess i'm supposed to break it down into binary and multiply it by

2  3  1  1
1  2  3  1
1  1  2  3
3  1  1  2

end result after mix columns:
04  e0  48  28
66  cb  f8  06
81  19  d3  26
e5  9a  7a  4c
0
nocturn4l
Asked:
nocturn4l
  • 3
  • 3
  • 2
2 Solutions
 
for_yanCommented:

I guess, here is the description:
http://www.angelfire.com/biz7/atleast/mix_columns.pdf

One of the ways is to read the fisrt matrix as strings and then tokenize
into individual numbers use this method Integer.parseInt(String, 16)
and get [4][4] array of integers

Then you read matrix of decimal  integers.

Then you multiply matrices and
transform each one with Integer.toHexString
and you should get another matrix.

I don't understand, though, it should be not just simple multipilication
as all numbers should be no bigger than ff after multiplication -and I'm not
sure I understood from the above metntioned text




0
 
for_yanCommented:
Yes these multiplications and additions are not multiplications and additions, they are fairly  fairly complex - see here:
http://en.wikipedia.org/wiki/Rijndael_mix_columns

0
2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

 
nocturn4lAuthor Commented:
jus go to the computer, will see if your links help, i'll be back to give points or ask more questions - thanks
0
 
nocturn4lAuthor Commented:
got to*
0
 
objectsCommented:
this walks you through the maths required
http://stackoverflow.com/questions/4964515/aes-limitations-and-mixcolumns
should be straight forward to implement it based on that
we are not permitted to code it for you but if you have any problems let me know and I'll help you through it
0
 
objectsCommented:
also a java implementation here that you can probably extract from to meet your needs
http://www.cs.utsa.edu/~wagner/laws/AESEncryptJava.html
0
 
nocturn4lAuthor Commented:
thanks guys, the links were of good help, think i understand it now
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now