{"action":"created","issue":{"url":"https://api.github.com/repos/connectbot/connectbot/issues/76","labels_url":"https://api.github.com/repos/connectbot/connectbot/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/connectbot/connectbot/issues/76/comments","events_url":"https://api.github.com/repos/connectbot/connectbot/issues/76/events","html_url":"https://github.com/connectbot/connectbot/issues/76","id":71325627,"number":76,"title":"ECDSA 521 bit keys auth always fails","user":{"login":"msoulatre-tt","id":11786684,"avatar_url":"https://avatars.githubusercontent.com/u/11786684?v=3","gravatar_id":"","url":"https://api.github.com/users/msoulatre-tt","html_url":"https://github.com/msoulatre-tt","followers_url":"https://api.github.com/users/msoulatre-tt/followers","following_url":"https://api.github.com/users/msoulatre-tt/following{/other_user}","gists_url":"https://api.github.com/users/msoulatre-tt/gists{/gist_id}","starred_url":"https://api.github.com/users/msoulatre-tt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msoulatre-tt/subscriptions","organizations_url":"https://api.github.com/users/msoulatre-tt/orgs","repos_url":"https://api.github.com/users/msoulatre-tt/repos","events_url":"https://api.github.com/users/msoulatre-tt/events{/privacy}","received_events_url":"https://api.github.com/users/msoulatre-tt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/connectbot/connectbot/labels/Bug","name":"Bug","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"kruton","id":50407,"avatar_url":"https://avatars.githubusercontent.com/u/50407?v=3","gravatar_id":"","url":"https://api.github.com/users/kruton","html_url":"https://github.com/kruton","followers_url":"https://api.github.com/users/kruton/followers","following_url":"https://api.github.com/users/kruton/following{/other_user}","gists_url":"https://api.github.com/users/kruton/gists{/gist_id}","starred_url":"https://api.github.com/users/kruton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kruton/subscriptions","organizations_url":"https://api.github.com/users/kruton/orgs","repos_url":"https://api.github.com/users/kruton/repos","events_url":"https://api.github.com/users/kruton/events{/privacy}","received_events_url":"https://api.github.com/users/kruton/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/connectbot/connectbot/milestones/6","html_url":"https://github.com/connectbot/connectbot/milestones/v1.8.5","labels_url":"https://api.github.com/repos/connectbot/connectbot/milestones/6/labels","id":1074548,"number":6,"title":"v1.8.5","description":null,"creator":{"login":"kruton","id":50407,"avatar_url":"https://avatars.githubusercontent.com/u/50407?v=3","gravatar_id":"","url":"https://api.github.com/users/kruton","html_url":"https://github.com/kruton","followers_url":"https://api.github.com/users/kruton/followers","following_url":"https://api.github.com/users/kruton/following{/other_user}","gists_url":"https://api.github.com/users/kruton/gists{/gist_id}","starred_url":"https://api.github.com/users/kruton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kruton/subscriptions","organizations_url":"https://api.github.com/users/kruton/orgs","repos_url":"https://api.github.com/users/kruton/repos","events_url":"https://api.github.com/users/kruton/events{/privacy}","received_events_url":"https://api.github.com/users/kruton/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-04-20T05:29:56Z","updated_at":"2015-04-27T15:55:07Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-04-27T15:47:05Z","updated_at":"2015-06-02T16:05:00Z","closed_at":null,"body":"Trying to authenticate the client with a 521 bit sized ECDSA key signature always fails on the client side (it fails to format the signature to the ssh format, and doesn't send anything).\r\n\r\nHere is a logcat of what happens when I try it :\r\n```\r\nW/System.err( 6589): java.io.IOException: Invalid signature format\r\nW/System.err( 6589): \tat com.trilead.ssh2.signature.ECDSASHA2Verify.encodeSSHECDSASignature(ECDSASHA2Verify.java:278)\r\nW/System.err( 6589): \tat com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:272)\r\nW/System.err( 6589): \tat com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:500)\r\nW/System.err( 6589): \tat org.connectbot.transport.SSH.tryPublicKey(SSH.java:358)\r\nW/System.err( 6589): \tat org.connectbot.transport.SSH.authenticate(SSH.java:240)\r\nW/System.err( 6589): \tat org.connectbot.transport.SSH.connect(SSH.java:466)\r\nW/System.err( 6589): \tat org.connectbot.service.TerminalBridge$3.run(TerminalBridge.java:278)\r\nW/System.err( 6589): \tat java.lang.Thread.run(Thread.java:838)\r\nE/ConnectBot.SSH( 6589): Problem during handleAuthentication()\r\nE/ConnectBot.SSH( 6589): java.io.IOException: Publickey authentication failed.\r\nE/ConnectBot.SSH( 6589): \tat com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:309)\r\nE/ConnectBot.SSH( 6589): \tat com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:500)\r\nE/ConnectBot.SSH( 6589): \tat org.connectbot.transport.SSH.tryPublicKey(SSH.java:358)\r\nE/ConnectBot.SSH( 6589): \tat org.connectbot.transport.SSH.authenticate(SSH.java:240)\r\nE/ConnectBot.SSH( 6589): \tat org.connectbot.transport.SSH.connect(SSH.java:466)\r\nE/ConnectBot.SSH( 6589): \tat org.connectbot.service.TerminalBridge$3.run(TerminalBridge.java:278)\r\nE/ConnectBot.SSH( 6589): \tat java.lang.Thread.run(Thread.java:838)\r\nE/ConnectBot.SSH( 6589): Caused by: java.io.IOException: Invalid signature format\r\nE/ConnectBot.SSH( 6589): \tat com.trilead.ssh2.signature.ECDSASHA2Verify.encodeSSHECDSASignature(ECDSASHA2Verify.java:278)\r\nE/ConnectBot.SSH( 6589): \tat com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:272)\r\nE/ConnectBot.SSH( 6589): \t... 6 more\r\n```"},"comment":{"url":"https://api.github.com/repos/connectbot/connectbot/issues/comments/108001645","html_url":"https://github.com/connectbot/connectbot/issues/76#issuecomment-108001645","issue_url":"https://api.github.com/repos/connectbot/connectbot/issues/76","id":108001645,"user":{"login":"kruton","id":50407,"avatar_url":"https://avatars.githubusercontent.com/u/50407?v=3","gravatar_id":"","url":"https://api.github.com/users/kruton","html_url":"https://github.com/kruton","followers_url":"https://api.github.com/users/kruton/followers","following_url":"https://api.github.com/users/kruton/following{/other_user}","gists_url":"https://api.github.com/users/kruton/gists{/gist_id}","starred_url":"https://api.github.com/users/kruton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kruton/subscriptions","organizations_url":"https://api.github.com/users/kruton/orgs","repos_url":"https://api.github.com/users/kruton/repos","events_url":"https://api.github.com/users/kruton/events{/privacy}","received_events_url":"https://api.github.com/users/kruton/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T16:05:00Z","updated_at":"2015-06-02T16:05:00Z","body":"Ah, yes, that's the extended DER encoding of length in ASN.1. Since the high bit is set (0x80), the lower 7 bits are used to say how many bytes of length encoding are coming up next which is one in this case (0x01). So it should have a check for `sig[1] & 0x80 != 0` as well."}}