Skip to content

Commit c2f6c89

Browse files
authored
Commands: Fix ambiguous printing of private x25519 key (#4343)
1 parent 0a8470c commit c2f6c89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/commands/all/curve25519.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ func Curve25519Genkey(StdEncoding bool, input_base64 string) {
4242
// Modify random bytes using algorithm described at:
4343
// https://cr.yp.to/ecdh.html.
4444
privateKey[0] &= 248
45-
privateKey[31] &= 127 | 64
45+
privateKey[31] &= 127
46+
privateKey[31] |= 64
4647

4748
if publicKey, err = curve25519.X25519(privateKey, curve25519.Basepoint); err != nil {
4849
output = err.Error()

0 commit comments

Comments
 (0)