From 1d2a00a0c875b98797c6a49e144be65e4eaf8559 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Thu, 22 Aug 2024 22:59:04 +0800 Subject: [PATCH] feat: update comments --- src/cmd_sshpubkey.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cmd_sshpubkey.rs b/src/cmd_sshpubkey.rs index 29ced66..1dfe048 100644 --- a/src/cmd_sshpubkey.rs +++ b/src/cmd_sshpubkey.rs @@ -61,6 +61,15 @@ impl Command for CommandImpl { information!("ECDSA public key: {}", hex::encode(&ec_key_point)); println!(); + // ECDSA SSH public key format: + // string ecdsa-sha2-[identifier] + // byte[n] ecc_key_blob + // + // ecc_key_blob: + // string [identifier] + // string Q + // + // [identifier] will be nistp256 or nistp384 let mut ssh_pub_key = vec![]; ssh_pub_key.write_string(&format!("ecdsa-sha2-{}", ssh_algorithm).as_bytes()); let mut ecc_key_blob = vec![];