Assignment 1:
1. Visualize the power consumption of a full encryption. Take a screenshot of the waveform.
2. There is a pattern in the waveform. Can you
... [Show More] explain it?
3. Explain briefly the relation between the leakage and the voltage measured by the oscilloscope.
Assignment 2:
1. Write a function encryptPlaintext() that sends the plaintext to the target board and retrieves the corresponding ciphertext.
2. Write a function generateRandomPlaintext() to generate a random 128-bit plaintext. Tip: use the random package
3. Write a function measureCurrent() that measures the current of the activation of the first SBOX of an encryption of a given plaintext. Tip: use digital pin 5 as trigger
4. Write a function plotCurrentWaveform() to plot the measured current waveform.
Assignment 3:
1. Write a function measure() that generates an array of nPlaintext plaintexts T and a matrix M of current waveforms by repetitively:
a. Generate a random plaintext.
b. Save this plaintext in an array T
c. Encrypt this plaintext by the target board and measure the current during the encryption with nAverage = 8.
d. Save the measured current in a row of the matrix M.
M has nPlaintext rows and nSample columns. T has nPlaintext elements.
2. Write a function save() to save T and M to the disk.
3. Write a function load() to read T and M from disk.
4. Write a function predictCurrent() that models the current of the first stage of SBOX.
5. Write a function generatePredictedCurrents() to generate the matrix P of predicted currents containing the predicted current for the plaintexts from T for all possible values of the key byte.
6. Write a function computePearsonCoefficient() to compute the Pearson Correlation Coefficient (PCC) between two arrays.
7. Write a function computeC to compute the matrix C. C has 256 rows and nSample columns defined by Csample,key = P CC(P :,key , M :,sample )
8. Plot the rows of C.
9. Find the secret key byte. Tip: you may use numpy.argmax and numpy.unravel_index
10. Why is the absolute value of the PCC lower than 1.0?
Assignment 4:
1. Find a 16 bytes of the secret key. For this, you’ll need to measure at least 500 encryptions (i.e. set nMeasure ≥ 500) with averaging of 8 (i.e. set nAverage = 8)
2. How can you check if the key you have found is correct? [Show Less]