{"id":23,"date":"2010-07-25T11:23:31","date_gmt":"2010-07-25T18:23:31","guid":{"rendered":"http:\/\/blog.jbrowne.com\/?p=23"},"modified":"2010-07-25T12:01:47","modified_gmt":"2010-07-25T19:01:47","slug":"how-amazon-calculates-private-key-fingerprints","status":"publish","type":"post","link":"http:\/\/blog.jbrowne.com\/?p=23","title":{"rendered":"How Amazon calculates private key fingerprints"},"content":{"rendered":"<p>Short answer: I still don&#8217;t know as I haven&#8217;t looked at the code (or if it is even available.)<\/p>\n<pre>Even shorter answer: ec2-fingerprint-key<\/pre>\n<p>Why such an obvious post?\u00a0 Well, I spent far too much time trying to figure out how to match up the information returned by ec2-describe-keypairs with the files I had on disk.\u00a0 This would have been a two minute operation had Amazon saw fit to mention ec2-fingerprint-key in the &#8220;related operations&#8221; section of the documentation for ec2-describe-keypairs (or ec2-add-keypair, or ec2-delete-keypair.)\u00a0 I&#8217;ve submitted feedback to Amazon&#8217;s documentation people about this omission.\u00a0 I imagine most people, like myself, do not read the Amazon documentation cover to cover.<\/p>\n<p>Perhaps this was me being too smart for my own good.\u00a0 Instead of browsing the API calls, I set about trying to figure out how private key fingerprints were calculated based on my knowledge of how they are calculated for public keys.\u00a0 I&#8217;m quite familiar with public key fingerprints from the use of SSH, primarily when using ssh-agent.\u00a0 I assumed that private key fingerprinting, while perhaps a bit more obscure, was commonplace.\u00a0 It turns out only Amazon does this and probably made up their own method.\u00a0 I did find one reference to how (sha1 of the DER of the private key), but my quick attempt at<\/p>\n<pre>openssl rsa -in test.key -outform DER -pubout | openssl sha1 -c<\/pre>\n<p>didn&#8217;t match.\u00a0 Since I have the whole public-key fingerprinting stuff swapped into my head, I think I&#8217;ll write a quick post about it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: I still don&#8217;t know as I haven&#8217;t looked at the code (or if it is even available.) Even shorter answer: ec2-fingerprint-key Why such an obvious post?\u00a0 Well, I spent far too much time trying to figure out how to match up the information returned by ec2-describe-keypairs with the files I had on disk.\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/23"}],"collection":[{"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":3,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":29,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions\/29"}],"wp:attachment":[{"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}