[tor-commits] [pluggable-transports/obfs4] 06/08: Do not clamp the private key before Elligator inverse map.

gitolite role git at cupani.torproject.org
Thu Sep 8 14:27:16 UTC 2022


This is an automated email from the git hooks/post-receive script.

meskio pushed a commit to branch master
in repository pluggable-transports/obfs4.

commit 5fcbb0e14064d41e4fa43013e1f0ede4028f25c5
Author: David Fifield <david at bamsoftware.com>
AuthorDate: Fri Sep 2 11:58:48 2022 -0400

    Do not clamp the private key before Elligator inverse map.
    
    The Elligator inverse map uses the least significant bits of the private
    key, which clamping sets to 0, to choose a random low-order point to add
    to the public key, to ensure uniformity of representatives.
    
    The other ways that the private key is used, namely in calls to
    curve25519.ScalarMult and curve25519.ScalarBaseMult, do their own
    clamping when necessary and are documented to accept a uniformly random
    scalar.
---
 common/ntor/ntor.go | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/common/ntor/ntor.go b/common/ntor/ntor.go
index af24b68..17a9ff7 100644
--- a/common/ntor/ntor.go
+++ b/common/ntor/ntor.go
@@ -273,9 +273,6 @@ func NewKeypair(elligator bool) (*Keypair, error) {
 			return nil, err
 		}
 		digest := sha512.Sum512(priv)
-		digest[0] &= 248
-		digest[31] &= 127
-		digest[31] |= 64
 		copy(priv, digest[:])
 
 		if elligator {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list