Sucessful discrimination; updated README

This commit is contained in:
Dominik Moritz Roth 2021-09-21 16:00:43 +02:00
parent 42ed2dd676
commit 30cc846c6f
3 changed files with 2 additions and 3 deletions

View File

@ -5,3 +5,4 @@ I made it because I want to try to break it.
(Precisely: Show it does not provide semantic security, because it is not IND-CPA-secure)
This will work iff I succeed in building a PPT-discriminator for sha256 from randomness
As my first approach this discriminator will be based on an LSTM-network.
Update: This worked out way better than expected; given long enought sequences (128 Bytes are more than enough) we can discriminate successfully in 100% of cases.

View File

@ -60,8 +60,6 @@ def train(model, seq_len=16*64):
ltLoss = ltLoss*0.9 + 0.1*loss.item()
lltLoss = lltLoss*0.9 + 0.1*ltLoss
print({ 'epoch': epoch, 'loss': loss.item(), 'ltLoss': ltLoss, 'correct?': correct })
if ltLoss < 0.20 and lltLoss < 0.225:
print("[*] Hell Yeah! Poccing! Got sup")
if epoch % 8 == 0:
torch.save(model.state_dict(), 'model_savepoints/'+tid+'_'+str(epoch)+'.n')

BIN
wh_discriminator.n Normal file

Binary file not shown.