mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Commands: Fix ambiguous printing of private x25519 key (#4343)
This commit is contained in:
parent
0a8470cb14
commit
c2f6c89987
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ func Curve25519Genkey(StdEncoding bool, input_base64 string) {
|
||||||
// Modify random bytes using algorithm described at:
|
// Modify random bytes using algorithm described at:
|
||||||
// https://cr.yp.to/ecdh.html.
|
// https://cr.yp.to/ecdh.html.
|
||||||
privateKey[0] &= 248
|
privateKey[0] &= 248
|
||||||
privateKey[31] &= 127 | 64
|
privateKey[31] &= 127
|
||||||
|
privateKey[31] |= 64
|
||||||
|
|
||||||
if publicKey, err = curve25519.X25519(privateKey, curve25519.Basepoint); err != nil {
|
if publicKey, err = curve25519.X25519(privateKey, curve25519.Basepoint); err != nil {
|
||||||
output = err.Error()
|
output = err.Error()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue