Skip to content

Implementation of "Learning to Protect Communications with Adversarial Neural Cryptography" in PyTorch

License

Notifications You must be signed in to change notification settings

seungwonpark/LearningToProtect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LearningToProtect

Implementation of Learning to Protect Communications with Adversarial Neural Cryptography in PyTorch

Caution: Details of implementation differ much from the original paper. I tried to use dense(fc) layers with relu activation, instead of dense+conv1d+sigmoid. See model/model.py.

Requirements

pip install -r requirements.txt (PyTorch, Numpy, TensorboardX)

Train

python trainer.py -c config/default.yaml -n [name of run]

  • You may copy cp config/default.yaml config/config.yaml and change parameters (e.g. size of plain/key/cipher, depth of NN, …) to experiment with your own setting.

Tensorboard

tensorboard --logdir logs/

Results

Result with config/default.yaml, trained on GTX 1080 for 1 hour.

  • Accuracy: (Green: Bob, Gray: Eve, Orange: Random guess)
  • Loss: (Green: B, Gray: E, Magenta: AB)

License

Apache License v2.0

About

Implementation of "Learning to Protect Communications with Adversarial Neural Cryptography" in PyTorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages