lower cols

This commit is contained in:
xenia 2021-04-26 00:17:07 -04:00
parent bc068c75a4
commit 5dcc99111a
1 changed files with 1 additions and 2 deletions

View File

@ -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):