lower cols
This commit is contained in:
parent
bc068c75a4
commit
5dcc99111a
|
@ -124,7 +124,6 @@ def attack_secondorder(db, traces, ntraces):
|
|||
for i in tqdm.trange(ntraces):
|
||||
(pt, ct, key, mask, desync) = db["metadata"][i]
|
||||
pt_v = pt[2]
|
||||
mask_v = mask[15]
|
||||
model[:, i] = AES_SBOX[model[:, i] ^ pt_v]
|
||||
model = numpy_popcount.popcount(model).astype("double").transpose()
|
||||
|
||||
|
@ -139,7 +138,7 @@ def attack_secondorder(db, traces, ntraces):
|
|||
|
||||
logger.info("doing corr")
|
||||
correlator = Correlator(model)
|
||||
ncolumns = 10
|
||||
ncolumns = 4
|
||||
step = traces_x.shape[1] // ncolumns
|
||||
all_coefs = []
|
||||
for i in tqdm.trange(ncolumns):
|
||||
|
|
Loading…
Reference in New Issue