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![];