- Joined
- Nov 26, 2012
- Messages
- 2,567
- Trophies
- 2
- Location
- United States
- Website
- sites.google.com
- XP
- 3,889
- Country
I hope this information helps some people who have trouble figuring out the AES key scrambler.
k = normal key
x = keyX
y = keyY
C = constant
let's algebra !!!!
let's start with
Solve for k
Solve for x
Solve for y
Solve for C
easy, right? You just need three variables to get one of them!
k = normal key
x = keyX
y = keyY
C = constant
let's algebra !!!!
let's start with
Code:
k = (((x <<< 2) ^ y) + C) <<< 87
Solve for k
Code:
k = (((x <<< 2) ^ y) + C) <<< 87
Solve for x
Code:
k = (((x <<< 2) ^ y) + C) <<< 87
>>> 87 >>> 87
(k >>> 87) = ((x <<< 2) ^ y) + C
- C - C
((k >>> 87) - C) = (x <<< 2) ^ y
^ y ^ y
(((k >>> 87) - C) ^ y) = x <<< 2
>>> 2 >>> 2
x = (((k >>> 87) - C) ^ y) >>> 2
Solve for y
Code:
k = (((x <<< 2) ^ y) + C) <<< 87
>>> 87 >>> 87
(k >>> 87) = ((x <<< 2) ^ y) + C
- C - C
((k >>> 87) - C) = (x <<< 2) ^ y
^ (x <<< 2) ^ (x <<< 2)
y = ((k >>> 87) - C) ^ (x <<< 2)
Solve for C
Code:
k = (((x <<< 2) ^ y) + C) <<< 87
>>> 87 >>> 87
(k >>> 87) = ((x <<< 2) ^ y) + C
- ((x <<< 2) ^ y) - ((x <<< 2) ^ y)
C = (k >>> 87) - ((x <<< 2) ^ y)
easy, right? You just need three variables to get one of them!