Not Yet Answered # AES

Discussion Starter mebob Discussion Starter mebob robertl2 Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...

0

no, the aes s-box, used in the SubBytes step: http://edipermadi.files.wordpress.com/2008/03/sbox.png

0

ok, ive figured out more about this. now i need to know how to find the multiplicative inverse of a number in the field GF(2^8).

0

If you trying to find Rcon you can do that with a lookup table, I think there's one posted on Wikipedia. To find those values yourself you need to handle really big numbers ( 2^200 and something ).

If your talking about the Mix-Columns step you need to preform matrix multiplication of some matrix, a, in GF(2^8) such that...

{ 2, 3, 1, 1; 1, 2, 3, 1; 1, 1, 2, 3; 3, 1, 1, 2 } * { a00, a01, a02, a03; a10, a11, a12, a13; a20, a21, a22, a23; a30, a31, a32, a33; } = { b00, b01 .... }

Ultimately you would have

b00 = 2*a00 + 3*a10 + 1*a20 + 1*a30

where the addition is just an xor and the multiplication is preformed in GF(2^8). This multiplication is polynomial multiplication (mod 2) modulo the polynomial x^8 + x^4 + x^3 + x + 1. You can implement this either logarithmically with a lookup table or you can do it the crazy-ass way I did it.

```
int mod ( int a, int b = 283 ) {
while ( a >= 256 ) {
int product = b;
while ( product < a/2 ) { product = product*2;}
a = a ^ product;
} return a;
}
int polyMod2 ( int a, int b, int N = 8 ) {
int sum = 0;
for ( int i = 0; i < N; ++i ) {
int place = pow ( 2, (N-1)-i );
if ( a >= place ) { sum = sum ^ b*place; a -= place; }
} return sum;
}
int ga ( int a, int b ) {
return mod ( polyMod2 ( a, b ) );
}
```

Doing it logarithmically would probably be smarter, but I like it this way because this is, more or less, how you would actually do it on paper.

To Un-Mix the Columns you do the same thing, but with the inverse matrix { 14, 11, 13, 9; ... }

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

Hello All ...

Iam Getting An Error With try to excecute the stored procedure .

I have Have Sql database , the stored procedure like so :

```
USE [MPRS]
GO
/****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE ...
```

Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"

Here is the sample output that I ...