Skip to content

Commit 0d077ba

Browse files
authored
Merge pull request #5 from yoyoismee/master
remove unused code
2 parents bc443f7 + f1a4346 commit 0d077ba

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

falcon.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ def hash_to_point(self, message, salt):
280280
# Output pseudorandom bytes and map them to coefficients.
281281
hashed = [0 for i in range(n)]
282282
i = 0
283-
j = 0
284283
while i < n:
285284
# Takes 2 bytes, transform them in a 16 bits integer
286285
twobytes = shake.read(2)
@@ -289,7 +288,6 @@ def hash_to_point(self, message, salt):
289288
if elt < k * q:
290289
hashed[i] = elt % q
291290
i += 1
292-
j += 1
293291
return hashed
294292

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

346344
# We repeat the signing procedure until we find a signature that is
347345
# short enough (both the Euclidean norm and the bytelength)
348-
while(1):
346+
while (1):
349347
if (randombytes == urandom):
350348
s = self.sample_preimage(hashed)
351349
else:

0 commit comments

Comments
 (0)