[tor-commits] [obfs4/main] fixup! internal/x25519ell2: Initial import

cohosh at torproject.org cohosh at torproject.org
Mon Jan 24 15:21:17 UTC 2022


commit 0f7ce7e653ae3a1e615587ab0f160a820186a6f2
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Sat Jan 1 09:29:44 2022 +0000

    fixup! internal/x25519ell2: Initial import
    
    Fix a comment, no functional changes.
---
 internal/x25519ell2/x25519ell2.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/x25519ell2/x25519ell2.go b/internal/x25519ell2/x25519ell2.go
index 6247da6..c3676ed 100644
--- a/internal/x25519ell2/x25519ell2.go
+++ b/internal/x25519ell2/x25519ell2.go
@@ -76,7 +76,7 @@ func mustFeFromUint64(x uint64) *field.Element {
 func selectLowOrderPoint(out, x, k *field.Element, cofactor uint8) {
 	out.Zero()
 	out.Select(k, out, int((cofactor>>1)&1)) // bit 1
-	out.Select(x, out, int((cofactor>>0)&1)) // bit 1
+	out.Select(x, out, int((cofactor>>0)&1)) // bit 0
 	var tmp field.Element
 	tmp.Negate(out)
 	out.Select(&tmp, out, int((cofactor>>2)&1)) // bit 2





More information about the tor-commits mailing list