MINE IS BAD
This commit is contained in:
1 parent
b07c85e8cb
commit
711c6474cc
1 file changed
+6
-1
@@ -1,9 +1,14 @@
|
||||
"""
|
||||
stuff sent over could be forged by a middleman,
|
||||
this and DSA ensures that with msg, pubkey, and something else, you can verify msg was signed by OG.
|
||||
"""
|
||||
|
||||
import math
|
||||
|
||||
|
||||
class Elgamal:
|
||||
def __init__(self, p: int, alpha: int, d: int) -> None:
|
||||
"contract: p is prime, and"
|
||||
"contract: p is prime, and..."
|
||||
if not 0 <= alpha < p or math.gcd(alpha, p) != 1:
|
||||
# set Z*_n is all i [0, n) st gcd(i, n) = 1, if n is prime thats jus the whole thing
|
||||
raise ValueError()
|
||||
Reference in new issue
Block a user