TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

OpenSSH Keys: A Walkthrough

159 pointsby LaFolleover 8 years ago

7 comments

aftbitover 8 years ago
&quot;If you’ve seen the low level parts of RSA keys, you’ll immediately recognise this. Otherwise, convert it to an unsigned integer and you get 65537 – a common RSA modulus. RSA public keys require two pieces: the modulus and the public exponent. Let’s take a guess that the next piece is going to be the public exponent.&quot;<p>That&#x27;s backwards - 65537 is a common public exponent. The modulus is the 2048-bit long thing.<p>Also, the writer says &quot;2048-byte&quot; RSA key when it&#x27;s really 2048-bits.
mkupover 8 years ago
<i>When most people think of SSH keys, they probably think of RSA if they’re aware of the underlying cryptography. Until recently, they would be right: RSA has been a mainstay of public key cryptography for some time now, and although it’s on the way out for new protocols and systems, it will be around for quite some time.</i><p>Why is RSA on the way out? This is news for me. Are there any (potential) weaknesses that have been discovered recently in the RSA? I know that elliptic curve cryptography has shorter (and hence somewhat more convenient) keys, but that fact alone hardly makes RSA obsolete. Are there anything else?
评论 #13456501 未加载
评论 #13456554 未加载
评论 #13456385 未加载
评论 #13456411 未加载
评论 #13456281 未加载
hamiltontover 8 years ago
Very clear and informative!<p>I got lost at this part, if anyone could clarify that would be great:<p><i>3. The key uses the PKCS#5 padding scheme: the last byte contains the number of padding bytes; e.g. if there are 5 bytes of padding, it contains 0x05. The last five bytes of the plaintext should then be 0x05 (something you should validate if you are decrypting the key yourself). If you decrypt the key above, you’ll see the last eight bytes are, in fact, 0x08.</i><p>The key is the MD5 of the combination of IV+pass, so how could the last byte of the key be controllable? The last two bytes shown are <i>532b</i>, which is not 0x08? I must be missing some step that happens between getting the MD5 and this padding scheme.
评论 #13456154 未加载
评论 #13456169 未加载
daurnimatorover 8 years ago
&gt; One of the ideas I’ve also been tossing around is using Github’s public key API to provide a way to sign PGP keys using Github SSH keys. I have much of the groundwork laid out, but I need to actually code everything up.<p>If you didn&#x27;t know: you can use a gpg key <i>as</i> an ssh key. You configure gpg-agent to act as an ssh-agent. This is quite popular for those that use yubikeys.
mrmondoover 8 years ago
Howdy, just a FYI here - your site doesn&#x27;t display properly on mobile devices, it&#x27;s all squashed into a tiny column in the middle of the page and the text wrapping is warped in places, additional if you&#x27;re using Safari the &#x27;reader view&#x27; is not available to clean the page and make it more readable.
评论 #13459335 未加载
mschuster91over 8 years ago
Hmm, what I&#x27;ve always wondered: why can&#x27;t I have the SSH public key of the server signed&#x2F;certified the same way as a SSL public key?<p>That could e.g. allow me to specify &quot;mark all SSH keys certified by company-internal CA as trusted&quot; or putting the expected certificate into DNS...
评论 #13457454 未加载
评论 #13457063 未加载
评论 #13457976 未加载
contras1970over 8 years ago
<i>We can tell from the length field that we need to read 0x00000101 (or 257) bytes; 257 </i> 8 = 2056 bytes, which is in the range for a 2048-byte RSA key (with some of the bits going unused).<i>