Skip to content

Instantly share code, notes, and snippets.

@binnaa29
binnaa29 / ecc.py
Last active September 9, 2021 04:40 — forked from bellbind/ecc.py
[python]basics of elliptic curve cryptography
# Basics of Elliptic Curve Cryptography implementation on Python
import collections
def inv(n, q):
#역원 구하는 메서드
"""div on PN modulo a/b mod q as a * inv(b, q) mod q
>>> assert n * inv(n, q) % q == 1
"""