Added load_ssh_public_key to load OpenSSH public keys (RSA support only)

As far as I can tell, there isn't currently a way to import OpenSSH (RFC 4253) formatted RSA public keys into an RSAPublicKey in cryptography. This commit adds that functionality.

Other Python cryptography libraries (notably PyCrypto) provide this sort of functionality and at least one library that I'd like to see ported to cryptography relies on that functionality.

This is my first-time contributing to cryptography. Your feedback would be very much appreciated! Thanks!
Backport as much of `int.from_bytes` as is necssary to implement this; if
we don't need the signed argument, we can skip it for now.

On Sun Dec 14 2014 at 6:28:24 AM Paul Kehrer <notifications@github.com>
wrote:

> In tests/hazmat/primitives/test_serialization.py
> <https://github.com/pyca/cryptography/pull/1517#discussion-diff-21796675>:
>
> > +    def test_load_ssh_public_key(self, backend):
> > +        str_key = textwrap.dedent("""\
> > +            ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDu/XRP1kyK6Cgt36gts9XAk
> > +            FiiuJLW6RU0j3KKVZSs1I7Z3UmU9/9aVh/rZV43WQG8jaR6kkcP4stOR0DEtll
> > +            PDA7ZRBnrfiHpSQYQ874AZaAoIjgkv7DBfsE6gcDQLub0PFjWyrYQUJhtOLQEK
> > +            vY/G0vt2iRL3juawWmCFdTK3W3XvwAdgGk71i6lHt+deOPNEPN2H58E4odrZ2f
> > +            sxn/adpDqfb2sM0kPwQs0aWvrrKGvUaustkivQE4XWiSFnB0oJB/lKK/CKVKuy
> > +            ///ImSCGHQRvhwariN2tvZ6CBNSLh3iQgeB0AkyJlng7MXB2qYq/Ci2FUOryCX
> > +            2MzHvnbv testkey@localhost
>
> """).encode()
> > +
> > +        key = load_ssh_public_key(str_key, backend)
> > +
> > +        assert key is not None
> > +        assert isinstance(key, interfaces.RSAPublicKey)
> > +
> > +        if isinstance(key, interfaces.RSAPublicKeyWithNumbers):
>
> load_rsa_public_numbers does not guarantee an RSAPublicKeyWithNumbers
> return. We still only promise RSAPublicKey. At the moment our only
> backend does do that, but if we have a backend that doesn't support
> serialization (or hasn't implemented it yet) this test would be problematic.
>
> That said, I'm okay with it being like this for now and we can deal with
> it when another backend lands with RSABackend support.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1517/files#r21796675>.
>