git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ssh signing: Support ECDSA as literal SSH keys

From
Andy Lindeman via GitGitGadget <gitgitgadget@gmail.com>
Date
May 30, 2022, 17:45 UTC
Message-ID
<pull.1272.git.git.1653932705097.gitgitgadget@gmail.com>
From: Andy Lindeman <andy@lindeman.io>

Keys generated using `ssh-keygen -t ecdsa` or similar are being rejected as literal SSH keys because the prefix is `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384` or `ecdsa-sha2-nistp521`.

This was acknowledged as an issue [1] in the past, but hasn't yet been fixed.

[1]: https://github.com/git/git/pull/1041#issuecomment-971425601
Signed-off-by: Andy Lindeman <andy@lindeman.io>
---
    ssh signing: Support ECDSA as literal SSH keys
    
    Keys generated using ssh-keygen -t ecdsa or similar will currently be
    rejected as literal SSH keys because the prefix is ecdsa-sha2-nistp256,
    ecdsa-sha2-nistp384 or ecdsa-sha2-nistp521.
    
    This was acknowledged as an issue in the past, but hasn't yet been
    fixed.
    
    https://github.com/git/git/pull/1041#issuecomment-971425601
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1272%2Falindeman%2Fecdsa-sha2-keys-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1272/alindeman/ecdsa-sha2-keys-v1
Pull-Request: https://github.com/git/git/pull/1272
 gpg-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gpg-interface.c b/gpg-interface.c
index 280f1fa1a58..086bd03b51d 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -779,7 +779,7 @@ static int is_literal_ssh_key(const char *string, const char **key)
 {
 	if (skip_prefix(string, "key::", key))
 		return 1;
-	if (starts_with(string, "ssh-")) {
+	if (starts_with(string, "ssh-") || starts_with(string, "ecdsa-sha2-")) {
 		*key = string;
 		return 1;
 	}

base-commit: 8ddf593a250e07d388059f7e3f471078e1d2ed5c
-- 
gitgitgadget
Next: Fabian Stelzer
Message 1 of 9 in “ssh signing: Support ECDSA as literal SSH keys”
  1. ssh signing: Support ECDSA as literal SSH keysAndy Lindeman via GitGitGadget, May 30, 2022
  2. Fabian StelzerMay 31, 2022
  3. Andy LindemanMay 31, 2022
  4. Fabian StelzerMay 31, 2022
  5. Junio C HamanoJun 1, 2022
  6. Fabian StelzerJun 7, 2022
  7. Junio C HamanoJun 7, 2022
  8. gpg docs: explain better use of ssh.defaultKeyCommandFabian Stelzer, Jun 8, 2022
  9. Andy LindemanJun 13, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.