Skip to content

Commands: x25519 outputs "Password" -> "Password (PublicKey)"#5759

Merged
RPRX merged 3 commits intoXTLS:mainfrom
matthew-abg:ux/clarify-x25519-output
Mar 19, 2026
Merged

Commands: x25519 outputs "Password" -> "Password (PublicKey)"#5759
RPRX merged 3 commits intoXTLS:mainfrom
matthew-abg:ux/clarify-x25519-output

Conversation

@matthew-abg
Copy link
Copy Markdown
Contributor

The Problem
As a developer, when you see a PrivateKey, the mental model immediately looks for a corresponding PublicKey. In the current x25519 command output, the PublicKey is labeled as Password. While this was intentionally done to discourage users from sharing it publicly (as seen in this #5084 ), it creates significant friction and confusion for new users.

I personally experienced this confusion, spending considerable time cross-referencing documentation and discussions to realize that Password is indeed the pbk parameter required for Reality/VLESS configurations.

The Solution
This PR updates the output labels to provide immediate clarity without compromising the original security intent. By explicitly labeling it as Password (Public key/pbk), we:

1- Reduce Cognitive Load: Users no longer need to guess which field maps to the pbk in their client config.
2- Maintain Security Awareness: A supplementary note is added to explain why this key should be treated with care, addressing the maintainers' original concern about public exposure.

Changes
Updated fmt.Printf labels in main/commands/all/curve25519.go.
Added a one-liner instructional note to explain the usage and security of the key.

Updated output message to clarify password usage as public key.
@Fangliding
Copy link
Copy Markdown
Member

Fangliding commented Mar 4, 2026

我想过这么做 但是怎么写都拿不准 一个办法是拆成两个命令 一个给vless输出passwd一个给wireguard生成公私钥对 还有一个办法是这个命令独立生成两对密钥对 一个写passwd一个写public key 但是始终无法在反映本质/提醒用户安全 间取得一个合理的输出(前面的方法在知情者眼中比较蠢)
也许一开始就不该改名 为一些找事者的行为买单 它对部分人造成的麻烦已经大于它的正向收益了(

@RPRX
Copy link
Copy Markdown
Member

RPRX commented Mar 18, 2026

就加个 (PublicKey) 应该就行了

@RPRX
Copy link
Copy Markdown
Member

RPRX commented Mar 19, 2026

改成了只加个 (PublicKey) 方便对应,无需额外说明,选 password 这名字就已经明确提醒了用户它不该被随意分享

@RPRX RPRX changed the title ux: clarify x25519 output by bridging 'Password' and 'Public Key (pbk)' labels Commands: x25519 Password -> Password (PublicKey) Mar 19, 2026
@RPRX RPRX changed the title Commands: x25519 Password -> Password (PublicKey) Commands: x25519 outputs Password -> Password (PublicKey) Mar 19, 2026
@RPRX RPRX merged commit 5dae900 into XTLS:main Mar 19, 2026
@RPRX
Copy link
Copy Markdown
Member

RPRX commented Mar 19, 2026

#5160 (comment) 这里说的叫 ClientKey 其实也行,不过还是和 ML-KEM-768 区分一下吧,比如 ML-DSA-65 客户端叫 Verify

@RPRX
Copy link
Copy Markdown
Member

RPRX commented Mar 19, 2026

不过 ClientKey 这名字还是没 Password 更简单粗暴,自从改名后再也没人找这个茬了,效果还是挺好的

RPRX added a commit that referenced this pull request Mar 19, 2026
#5084 (comment)
#5123 (comment)
...

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
@RPRX RPRX changed the title Commands: x25519 outputs Password -> Password (PublicKey) Commands: x25519 outputs "Password" -> "Password (PublicKey)" Mar 19, 2026
RPRX added a commit that referenced this pull request Mar 19, 2026
#5084 (comment)
#5123 (comment)
...

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants