@@ -9,12 +9,10 @@ import (
99)
1010
1111var cmdVLESSEnc = & base.Command {
12- UsageLine : `{{.Exec}} vlessenc [-pq] ` ,
13- Short : `Generate encryption/ decryption pair for VLESS encryption (VLESS)` ,
12+ UsageLine : `{{.Exec}} vlessenc` ,
13+ Short : `Generate decryption/encryption json pair (VLESS Encryption )` ,
1414 Long : `
15- Generate encryption/decryption pair with suggested default value for VLESS encryption (VLESS).
16-
17- Generate with MLKEM: {{.Exec}} vlessenc"
15+ Generate decryption/encryption json pair (VLESS Encryption).
1816` ,
1917}
2018
@@ -23,20 +21,19 @@ func init() {
2321}
2422
2523func executeVLESSEnc (cmd * base.Command , args []string ) {
26- fmt .Printf ("Choose one authentication to use, do not mix them. Key exchange is Post-Quantum safe anyway.\n \n " )
2724 privateKey , password , _ , _ := genCurve25519 (nil )
2825 serverKey := base64 .RawURLEncoding .EncodeToString (privateKey )
2926 clientKey := base64 .RawURLEncoding .EncodeToString (password )
3027 decryption := generateDotConfig ("mlkem768x25519plus" , "native" , "600s" , serverKey )
3128 encryption := generateDotConfig ("mlkem768x25519plus" , "native" , "0rtt" , clientKey )
32- fmt .Printf ("------ decryption (Authentication: X25519, not Post-Quantum) ------\n %v\n ------ encryption (Authentication: X25519, not Post-Quantum) ------\n %v\n " , decryption , encryption )
33- fmt .Println ("" )
3429 seed , client , _ := genMLKEM768 (nil )
3530 serverKeyPQ := base64 .RawURLEncoding .EncodeToString (seed [:])
3631 clientKeyPQ := base64 .RawURLEncoding .EncodeToString (client )
3732 decryptionPQ := generateDotConfig ("mlkem768x25519plus" , "native" , "600s" , serverKeyPQ )
3833 encryptionPQ := generateDotConfig ("mlkem768x25519plus" , "native" , "0rtt" , clientKeyPQ )
39- fmt .Printf ("------ decryption (Authentication: ML-KEM-768, Post-Quantum) ------\n %v\n ------ encryption (Authentication: ML-KEM-768, Post-Quantum) ------\n %v\n " , decryptionPQ , encryptionPQ )
34+ fmt .Printf ("Choose one Authentication to use, do not mix them. Ephemeral key exchange is Post-Quantum safe anyway.\n \n " )
35+ fmt .Printf ("Authentication: X25519, not Post-Quantum\n \" decryption\" : \" %v\" \n \" encryption\" : \" %v\" \n \n " , decryption , encryption )
36+ fmt .Printf ("Authentication: ML-KEM-768, Post-Quantum\n \" decryption\" : \" %v\" \n \" encryption\" : \" %v\" \n " , decryptionPQ , encryptionPQ )
4037}
4138
4239func generateDotConfig (fields ... string ) string {
0 commit comments