The simulator.Simple1
function allows to simulate a cryptographic device implementing a bloc cipher. Its goal is to facilitate and to accelerate the collect of data and to compare attacks with the same dataset.
With a key and messages, it returns a trace which is the power consumption, in volts, during an encryption by the cryptographic device.The algorithm, implemented in the simulator.Simple1
function, is detailed below.
First, it applies the xor
function between a $message_i$ and the $key$. The result is inserted in a S-Box which is a nonlinear function that takes 6 components and returns 4 components.
Then it calculates the hamming distance between the result and the previous result of the S-Box or the value null when encrypting the first message.
The result of the hamming distance is a point in the trace.