simulator.Simple1: simulator.Simple1

Description Usage Arguments Details Value Author(s) References Examples

Description

The simulator.Simple1 function simulates an unprotected cryptographic device implementing a bloc cipher.

Usage

1
simulator.Simple1(message, key, noise=0)

Arguments

message

A matrix where each row is a binary plaintext of 6 components. Each component has the value 1 or 0.

key

A vector representing the binary secret key of 6 components. Each component has 1 or 0.

noise

A positive integer to represent noise on traces returned by this function. Higher is its value, more there are noise on data.

Details

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.

Value

The simulator.Simple1 function returns a trace which represents the power consumption, in volts, during an encryption by a cryptographic device.

Author(s)

Liran Lerman llerman@ulb.ac.be & Gianluca Bontempi gbonte@ulb.ac.be@ulb.ac.be & Olivier Markowitch olivier.markowitch@ulb.ac.be

References

E. Peeters & F-X Standaert & N Donckers & J-J Quisquater, (2005), "Improved Higher-Order Side-Channel Attacks with FPGA Experiments", CHES, pp. 309-323.

Examples

1
2
3
4
5
6
n=100
clee = c(round(runif(6)))
inp=matrix(round(runif(6*n)),ncol=6)

#creating a trace without noise through the simulator
traces=simulator.Simple1(inp,clee)

sideChannelAttack documentation built on May 2, 2019, 3:40 p.m.