Results 1 to 6 of 6

Thread: Implementing passwords **resolved

Threaded View

  1. #6
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    mxnmx's example is a basic XOR algorithm, and the public and private key is placed in error there.... that's defenitly not how your supposed to use a public and private key...

    Here's how the encryption/decryption SHOULD be with public and private keys:
    First of all you use one at the time...
    To encrypt, you use the public key, and you are NOT able to decrypt with the public key, ONLY encrypt
    To decrypt, you use the private key, and the private key is used for decryption ONLY !

    If you wander why ?
    Let's say you have a group of friends, and you want to exchange data in a safe way (encryption), you give the public key to your friends, they encrypt the data, send it to a server (for example), and since only you have the private key, only you can decrypt the data. And if you want to send data back, you need their public key(s), and so on...

    In the example given there, they are both used when encrypting AND decryption of the string witch is wrong...

    In the example, a correct variable name would be, password1 and password2, because that's what it does... it's using 2 passwords to encrypt and decrypt

    To prove my point go to this link, and scroll to "Public-Key Encryption"
    http://developer.netscape.com/docs/m...n/contents.htm
    Last edited by CVMichael; Dec 17th, 2002 at 04:06 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width