[gameprogrammer] Re: Fast, easy to use RSA generator
- From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Tue, 20 Jul 2004 20:31:38 -0700
Thanks for the info Alan. I am going to get a book. What I am referring
to, and need a fast implementation of, is this:
a.. Find P and Q, two large (e.g., 1024-bit) prime numbers.
a.. Choose E such that E is greater than 1, E is less than PQ, and E and
(P-1)(Q-1) are relatively prime, which means they have no prime factors in
common. E does not have to be prime, but it must be odd. (P-1)(Q-1) can't be
prime because it's an even number.
a.. Compute D such that (DE - 1) is evenly divisible by (P-1)(Q-1).
Mathematicians write this as DE = 1 (mod (P-1)(Q-1)), and they call D the
multiplicative inverse of E. This is easy to do -- simply find an integer X
which causes D = (X(P-1)(Q-1) + 1)/E to be an integer, then use that value
of D.
a.. The encryption function is C = (T^E) mod PQ, where C is the ciphertext
(a positive integer), T is the plaintext (a positive integer), and ^
indicates exponentiation. The message being encrypted, T, must be less than
the modulus, PQ.
a.. The decryption function is T = (C^D) mod PQ, where C is the ciphertext
(a positive integer), T is the plaintext (a positive integer), and ^
indicates exponentiation.
I need a fast implementation of that.
----- Original Message -----
From: "Alan Wolfe" <atrix2@xxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Tuesday, July 20, 2004 8:32 PM
Subject: [gameprogrammer] Re: Fast, easy to use RSA generator
> Hey Kevin,
>
> Seriously, you should get applied cryptography and read it, a really great
> book that will teach you alot about cryptography.
>
> From the author's analasis, he shows that algorithms that rely on wierd
> mathematical properties always seem to get cracked or always have a weak
> chink in their armor that lets people crack em faster than brute forcing
> them.
>
> The reliable algorithms are all "simple", IE they rely on things like xor,
> addition, subtraction and bit rotation, not big complex equations that
> mathemeticians like to poke at for fun.
>
> RSA Data Security, Inc. has made LOTS of encryption algorithms and are
> pretty venerable in the encryption world it seems. I'm assuming this is
the
> company you are talking about when you say RSA but maybe you mean
something
> else.
>
> RSA's best publicly known algorithm as of when this book was made (late
90s)
> is RC5.
>
> They actualy have a bounty out to where whoever breaks a message they
> encrypted in RC5 will get something like 1 million dollars.
>
> If youve ever seen those programs that run in the background to analyze
SETI
> data, they have a similar thing set up for breaking this RC5 message,
where
> you join a "group" and if your group cracks the message you split the
money.
>
> So far, the prize remains unclaimed (:
>
> RC5 is not useable w/o a license though, and a very hefty fee. (this is
all
> to the best of my knowledge of course, this information could be outdated,
> or changed by now)
>
> RC4 however is the next best thing.
>
> according to the book...
>
> "RSADSI claims that the algorithm is immune to differential and linear
> cryptanalysis, doesnt seem to have any small cycles, and is highly
> non-linear. (There are no public cryptanaltic results. RC4 can be in
about
> 2 & 1700 (256!*256^2) possible states: an enormous number.) .... The
> algorithm is simple enough that most programmers can quickly code it from
> memory."
>
> RC4 is public domain. The name is trademarked so if you code it you have
> to call it somethign else, but the process itself is no longer protected
as
> a trade secret so it's all yours to use.
>
> Best of all, RC4 uses nothing but addition,subtraction and xor so it is
> probably genuinely very secure. I found some code on the net, i havent
> tested it but it looks good, hope it suits your needs (:
>
> http://www.cr0.net:8040/code/crypto/rc4/
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] 3D objects...
- From: Jason Clark
- References:
- [gameprogrammer] Re: Linux equivalent of CreateDirectory
- From: Jason Clark
- [gameprogrammer] Frequency table for standard english for huffman encoding tree
- From: Kevin Jenkins
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Alan Wolfe
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Kevin Jenkins
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Alan Wolfe
- [gameprogrammer] Fast, easy to use RSA generator
- From: Kevin Jenkins
- [gameprogrammer] Re: Fast, easy to use RSA generator
- From: Alan Wolfe
Other related posts:
- » [gameprogrammer] Fast, easy to use RSA generator
- » [gameprogrammer] Re: Fast, easy to use RSA generator
- » [gameprogrammer] Re: Fast, easy to use RSA generator
- [gameprogrammer] 3D objects...
- From: Jason Clark
- [gameprogrammer] Re: Linux equivalent of CreateDirectory
- From: Jason Clark
- [gameprogrammer] Frequency table for standard english for huffman encoding tree
- From: Kevin Jenkins
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Alan Wolfe
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Kevin Jenkins
- [gameprogrammer] Re: Frequency table for standard english for huffman encoding tree
- From: Alan Wolfe
- [gameprogrammer] Fast, easy to use RSA generator
- From: Kevin Jenkins
- [gameprogrammer] Re: Fast, easy to use RSA generator
- From: Alan Wolfe