Skip to main content

FrodoKEM implementation and presentation application

Project description

Re-implementation of quantum-secure algorithm FrodoKEM in Python 3.x

About

This is Python implementation of FrodoKEM (Key Exchange Mechanism), as a result of my bachelor, based on Microsoft's implementation in C, but using OOP (and NumPy for matrix operations). FrodoKEM is a key exchange protocol, which security is based on Learning With Errors problem - simply put it is a problem of solving a system of linear equations with probabilistic soluton, and is based on mathematical objects with regular structure called lattices. Additionally, I created a demonstration application as well in a form of "terminal-based chat" (using ncurses implementation in Python) as well as simple benchmark tool allowing the programmer to test efficiency of this implementation. FrodoKEM was implemented as a separate module, which is imported and used in Application module. In a short, Python implementation is several hundreds times slower than C, however it provides some educational value and hopefully better understanding of how this algorithm work. I did my best to at least save Microsoft's comments on what is going on in particular places of the code, as well as put mine in places which I was sure I did understand. Finally, my implementation is much shorter and gives a simple to use, abstract interface for the programmer to use it. It is also most likely as secure as Microsoft's implementation is.

Installation

The source code is currently hosted on GitHub. The latest released version is also available for download via pip:

  # python3 -m pip install frodokem-with-chat

or simply

  # pip3 install frodokem-with-chat

Example

  from FrodoKEM.frodo640.api_frodo640 import FrodoAPI640
  FrodoAPI = FrodoAPI640()
  p, r = FrodoAPI.crypto_kem_keypair_frodo640() # Generate keypair (priv, public)
  c, ss = FrodoAPI.crypto_kem_enc_frodo640()    # Generate ciphertext, shared secret => Party B
  ss1   = FrodoAPI.crypto_kem_dec_frodo640()    # Generate shared secret based on ciphertext => Party A

Documentation

For further details on the usage of these modules, please refer to: Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frodokem_with_chat-1.0.4.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frodokem_with_chat-1.0.4-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file frodokem_with_chat-1.0.4.tar.gz.

File metadata

  • Download URL: frodokem_with_chat-1.0.4.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for frodokem_with_chat-1.0.4.tar.gz
Algorithm Hash digest
SHA256 1a7dfd6cc64152498acf7ba0ca5909325e9665f7991dc01852a4eefcc272a46c
MD5 c851b646364a591f651b4f7eba63e341
BLAKE2b-256 2d01dcc00502ee0ad98a12dd57d44cf30de859cc2a62d18e6f70524fc22f60ec

See more details on using hashes here.

File details

Details for the file frodokem_with_chat-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: frodokem_with_chat-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for frodokem_with_chat-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea1bd400ccd4e92113b7f1a665b72ab4be9bb5bfa3d920e225d68471d33e7a57
MD5 705181deb039a4b4f77dac6770e73db9
BLAKE2b-256 bfc6d598842f05d9631825425b5fdd2b30b1b6bdc511ec2f223eed3798ac8c3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page