Skip to content

Commit

Permalink
Merge pull request #5 from yoyoismee/master
Browse files Browse the repository at this point in the history
remove unused code
  • Loading branch information
tprest authored Sep 28, 2024
2 parents bc443f7 + f1a4346 commit 0d077ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions falcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ def hash_to_point(self, message, salt):
# Output pseudorandom bytes and map them to coefficients.
hashed = [0 for i in range(n)]
i = 0
j = 0
while i < n:
# Takes 2 bytes, transform them in a 16 bits integer
twobytes = shake.read(2)
Expand All @@ -289,7 +288,6 @@ def hash_to_point(self, message, salt):
if elt < k * q:
hashed[i] = elt % q
i += 1
j += 1
return hashed

def sample_preimage(self, point, seed=None):
Expand Down Expand Up @@ -345,7 +343,7 @@ def sign(self, message, randombytes=urandom):

# We repeat the signing procedure until we find a signature that is
# short enough (both the Euclidean norm and the bytelength)
while(1):
while (1):
if (randombytes == urandom):
s = self.sample_preimage(hashed)
else:
Expand Down

0 comments on commit 0d077ba

Please sign in to comment.