Find the answer to your Linux question:
Results 1 to 3 of 3
Hi guys, I'm implementing a secure remote connection for a client, and I'm using RSA to do it. I know how to code the RSA algorithm, but I'm wondering how ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942

    SSH and RSA


    Hi guys,

    I'm implementing a secure remote connection for a client, and I'm using RSA to do it. I know how to code the RSA algorithm, but I'm wondering how it works two-way. I understand how the client can send an encrypted message to the server with the public key, but how does the server send an encrypted reply? How would the client decode it unless they both had private keys? I have SSH in the title of this thread because I'm curious how it's done with SSH.

    Thanks!
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  2. #2
    Linux User DThor's Avatar
    Join Date
    Jan 2006
    Location
    Ca..na...daaa....
    Posts
    319
    Someone with a little more practical experience with the matter will likely go into more, and possibly more correct, detail , but my understanding of the ssh process is that the client and server *both* exchange public keys as part of the login process. So when you login you pass your public key, and it passes you it's, and of course each has their private key on their own system for verification. This allows two-way, encrypted communication.

    DT

  3. #3
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Ok, now that I've finished the initial coding of the RSA algorithm, I've run into two "problems":

    1) When I encrypt a number like 5244, I end up with a HUGE (like 300 digit HUGE) result! Is this normal? (I'm assuming so, because my keys are about 300 digits in size) Also, is a 300 digit a bit much?

    2) When I encrypt a negative number, and decrypt the result, I end up with something totally different. Is this normal RSA behavior, or did I do something wrong?

    Thanks for any input!
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •