Removed some unused code
This commit is contained in:
parent
a3ccefa441
commit
3931da4947
5
week4.py
5
week4.py
|
@ -3,8 +3,6 @@
|
||||||
# A truth value, thus either true or false, s.t. each cipher is an entry in the bloodtype comptability matrix.
|
# A truth value, thus either true or false, s.t. each cipher is an entry in the bloodtype comptability matrix.
|
||||||
|
|
||||||
from secrets import SystemRandom
|
from secrets import SystemRandom
|
||||||
import time
|
|
||||||
from math import pow
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from crypto.week1 import BloodType, convert_from_string_to_enum, blood_cell_compatibility_lookup
|
from crypto.week1 import BloodType, convert_from_string_to_enum, blood_cell_compatibility_lookup
|
||||||
|
|
||||||
|
@ -59,9 +57,6 @@ class ElGamal:
|
||||||
return m
|
return m
|
||||||
|
|
||||||
def ogen(self):
|
def ogen(self):
|
||||||
# Here, q = 2p+1, thus we actually need to use the p here, instead of
|
|
||||||
# self.order, but as we do not know p yet, .e we
|
|
||||||
# TODO: Use p instead of self.order, s.t. self.order = 2p+1
|
|
||||||
s = SystemRandom().randint(1, self.order)
|
s = SystemRandom().randint(1, self.order)
|
||||||
h = s**2 % self.order
|
h = s**2 % self.order
|
||||||
return self.gen_, h
|
return self.gen_, h
|
||||||
|
|
Loading…
Reference in New Issue
Block a user