Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Personal crypting algorithm

by Asmo (Monk)
on Nov 05, 2001 at 01:56 UTC ( #123228=note: print w/ replies, xml ) Need Help??


in reply to Re: Personal crypting algorithm
in thread Personal crypting algorithm

Ok, thanks for your advice.

I've seen a 3-line version of the RSA encryption algorithm (a little bit obfusctaed). Do you think i should use it ?

Thx

Asmo


Comment on Re: Re: Personal crypting algorithm
Re: Re: Re: Personal crypting algorithm
by no_slogan (Deacon) on Nov 06, 2001 at 01:53 UTC
    Don't use an obfuscated version of RSA, whatever you do. There are all kinds of issues like blocking, padding, and key management that are likely to get swept under the rug if someone's trying to cram RSA into three lines. If you need public key encryption, you can grab Crypt::RSA -- it's pretty nice, once you manage to get Math::Pari to install... There are plenty of other good crypto modules out there, too.

    I agree with wog's comments. UUencode is a bad idea; it adds extra redundancy to the message (for instance, setting the first character to a value determined by the length of the message), which helps a cryptanalyst. Another problem is that only the first 2*length($key)-1 bytes of the message are protected by the key in any way. If someone tries to put a larger message into it, part of the message will be obscured but easily recoverable.

    Also, your tr/// replacement string contains the letter c twice, so you won't always be able to decrypt the message properly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://123228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2014-07-14 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (262 votes), past polls