From c2f6c899871c1f37f11f72c9525aba5330bca7de Mon Sep 17 00:00:00 2001 From: auvred <61150013+auvred@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:45:34 +0300 Subject: [PATCH] Commands: Fix ambiguous printing of private x25519 key (#4343) --- main/commands/all/curve25519.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/commands/all/curve25519.go b/main/commands/all/curve25519.go index 25cc812e..bb706c6c 100644 --- a/main/commands/all/curve25519.go +++ b/main/commands/all/curve25519.go @@ -42,7 +42,8 @@ func Curve25519Genkey(StdEncoding bool, input_base64 string) { // Modify random bytes using algorithm described at: // https://cr.yp.to/ecdh.html. privateKey[0] &= 248 - privateKey[31] &= 127 | 64 + privateKey[31] &= 127 + privateKey[31] |= 64 if publicKey, err = curve25519.X25519(privateKey, curve25519.Basepoint); err != nil { output = err.Error()