This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lascar import * | |
from lascar.tools.aes import sbox | |
filename = "/home/johndoe/ASCAD_data/ASCAD_databases/ATMega8515_raw_traces.h5" | |
# poi = Points Of Interest. | |
# We use the SNRs computed before to extract time samples where both mask and masked sensitive variable are used. | |
snrs = DictOutputMethod.load('SNR.pickle') # we load the snr results computed at 02-snr.py | |
poi = [] | |
poi = [snrs['SNR4: masked sbox output in linear parts'][5000].argmax()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lascar import * | |
container = NpyContainer('test_leakages','test_values') # load data | |
class Synchronization: | |
def __init__(self, lref): | |
self.ref_peak_offset = ref.argmax() | |
def __call__(self, leakage): | |
#We need to find the peak in each leakage,and roll it to match the ref_peak | |
peak_offset = leakage.argmax() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lascar import * | |
container = NpyContainer('test_leakages','test_values') # load data |