microsoft / PQCrypto-SIDH

SIDH Library is a fast and portable software library that implements state-of-the-art supersingular isogeny cryptographic schemes. The chosen parameters aim to provide security against attackers running a large-scale quantum computer, and security against classical algorithms.
MIT License
316 stars 101 forks source link

Demo code in Python? #17

Closed DonaldTsang closed 5 years ago

DonaldTsang commented 5 years ago

I have found that NTRUEncrypt has a pure python (no numpy) implementation (https://github.com/logannc/pyNTRUEncrypt), and ECC has it too (https://github.com/johndoe31415/joeecc) but there is none for SIDH, is it possible to write one to make understanding SIDH easier?

kriskwiatkowski commented 5 years ago

https://gitlab.cs.hs-rm.de/pqcrypto/SIDH.git

DonaldTsang commented 5 years ago

@henrydcase care to mirror it to github and reference it? Then we can close the issue

patricklonga commented 5 years ago

That python implementation does not exactly follow the SIDH library (e.g. uses Edwards instead of Montgomery curve arithmetic). Also, some changes are coming soon. Having a compatible python implementation is left as future work.

christianpaquin commented 5 years ago

Alternatively, you might want to check out this python wrapper for the Open Quantum Safe library that contains an implementation of SIDH/SIKE. It doesn't give you a pure python implementation, but wraps the more efficient C implementation to be used in a python environment.

DonaldTsang commented 5 years ago

@patricklonga hope that future Python implementation can come sooner.

@christianpaquin the main idea is that a pure Python version can be used for educational purposes. A wrapper can only used for compatibility and not demonstrations.

Hans-MartinHannibalLauridsen commented 5 years ago

You could always check out Lucca de feos project, it is not pure python but works great for educational purposes.

Its not SIDH, but it is the same fundamental core.

kriskwiatkowski commented 5 years ago

Indeed. It depends a bit what "educational purposes" mean, but my approach would be to first look at implementation done on top of sage. Then details related to field operations and finally details related to performance optimization.

DonaldTsang commented 5 years ago

@henrydcase Sage is good for professional education/academics but not as accessible as Python, since Python tends to be a youth-proof language.