Click to See Complete Forum and Search --> : RSA algorithm
dyrwoolf
06-01-2003, 12:09 PM
Hi,
dont know if this is the right place to ask, but i do it anyway.
I want to, in some way, generate a public key to encrypt some
information in a database and then have a secret key that the
person who is going to read the encrypted information use to
encrypt the information.
The RSA algorithm is, if I have understand this right, the way to
do it. Is there any one who know how to do this in php?
bad76
06-01-2003, 02:15 PM
Yes.
but why don't look at md5 function? May be the same...
http://it3.php.net/manual/it/function.md5.php
dyrwoolf
06-01-2003, 08:14 PM
But dosn't md5 just make a hash? Does it generate to keys, one
public and one secret?
jstarkey
06-02-2003, 03:38 AM
RSA has a pretty bad rep now. Might wanna look into Triple-DES or Blowfish.
http://us2.php.net/mcrypt has a list of the supported algorithms for PHP.
laserlight
06-02-2003, 04:36 AM
both triple DES and blowfish wont cut it, since they are symmetric algorithms and he/she wants to implement an asymmetric algorithm.
looking at the mcrypt list, it seems that mcrypt only has symmetric algos though.
Still, it is probably best to use the mcrypt library if you want to encryption using PHP.
jstarkey
06-02-2003, 05:15 AM
Originally posted by laserlight
both triple DES and blowfish wont cut it, since they are symmetric algorithms and he/she wants to implement an asymmetric algorithm.
Good catch, I missed that, but it's still weird IMO. Blowfish, Rijndael, or Triple DES - each symetric and work with SSH -- I just send my pub key to the admin and I'm in. Sounds asymetric to me.
laserlight
06-02-2003, 07:29 AM
SSH uses both types of algorithms.
This memo might explain a bit more:
http://www.ietf.org/html.charters/secsh-charter.html
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.