| |
 |
|
|
Science Forum Index » Cryptography Forum » My First Encryption Program...
Page 1 of 1
|
| Author |
Message |
| ... |
Posted: Wed May 14, 2008 11:43 pm |
|
|
|
Guest
|
I am new to the world of encryption. I recently completed a module at
university about encryption and thought I would try and write on own
simple encryption program. I have managed to use AES, Triple-DES and
some twists on old ciphers. I have tried to implement a simple version
of the GCHQ Diffie-Hellman key exchange. The program itself a TCP/IP
client and server socket that allows chat and file transfer using the
mentioned encryptions.
The source code for the application can be found at the following
link.
http://users.aber.ac.uk/jap6/filedetails.php?id=encryption&type=zip
I understand that I should make sure that the Diffie-Hellman key
exchange numbers should be thousands of digits long and I am currently
making the changes for this to happen (Using a BigInteger like class).
My prime number Class uses the Sieve of Atkin function for letting me
know if a number is prime, this method seems to be very good at
telling me if a number is not prime.
Please can I have some feed back on how to improve the program and or
code that I have written.
Regards j1mb0jay |
|
|
| Back to top |
|
| j1mb0jay... |
Posted: Thu May 15, 2008 12:54 am |
|
|
|
Guest
|
On May 15, 11:27 am, "Joseph Ashwood" <ashw... at (no spam) msn.com> wrote:
Quote: j1mb0... at (no spam) hotmail.co.uk> wrote in message
news:309f09f8-a4d7-4115-921b-a2577c62c76e at (no spam) 27g2000hsf.googlegroups.com...
I understand that I should make sure that the Diffie-Hellman key
exchange numbers should be thousands of digits long and I am currently
making the changes for this to happen (Using a BigInteger like class).
My prime number Class uses the Sieve of Atkin function for letting me
know if a number is prime, this method seems to be very good at
telling me if a number is not prime.
My first comment is that for primes of large values, none of the
deterministic primality tests are useful. There are about X/log(X) primes
less than X, just storing this many primes for X on the order of 2^1024
would be infeasible at best. There will be in excess of 2^1000 of them, even
if each could be stored in a single bit this would be something on the order
of
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(10^290) hard disks. Even having your computer count that high is
infeasible.
Instead, probabilistic methods are used, in particular Mill-Rabin is a very
common choice with sufficient iterations, and different values of
"sufficient" are debated. My preference is severe overkill of 1 test for
every bit, significant overkill to be sure, but it simply doesn't take that
long. I'm sure if this thread continues someone else will chime in on
alternatives.
I always get confused when i see "probabilistic methods" I thought
that Diffie-Hellman and RSA methods
would be insecure, or not even work at all if the number was not
actually a prime. Or am i incorrect with this
statement.
Quote:
Please can I have some feed back on how to improve the program and or
code that I have written.
Maybe later I'll look at your protocol to see if it is secure.
Joe
Looking forward to the replys  |
|
|
| Back to top |
|
| Kristian Gjøsteen... |
Posted: Thu May 15, 2008 2:06 am |
|
|
|
Guest
|
j1mb0jay <j1mb0jay at (no spam) hotmail.co.uk> wrote:
Quote: I always get confused when i see "probabilistic methods" I thought
that Diffie-Hellman and RSA methods
would be insecure, or not even work at all if the number was not
actually a prime.
Probably insecure. But if the failure probability can be controlled it
may not matter. I wouldn't worry if the probability of failure is about
the same as the probability that an attacker guesses your secret keys.
--
Kristian Gjøsteen |
|
|
| Back to top |
|
| Joseph Ashwood... |
Posted: Thu May 15, 2008 5:27 am |
|
|
|
Guest
|
<j1mb0jay at (no spam) hotmail.co.uk> wrote in message
news:309f09f8-a4d7-4115-921b-a2577c62c76e at (no spam) 27g2000hsf.googlegroups.com...
Quote: I understand that I should make sure that the Diffie-Hellman key
exchange numbers should be thousands of digits long and I am currently
making the changes for this to happen (Using a BigInteger like class).
My prime number Class uses the Sieve of Atkin function for letting me
know if a number is prime, this method seems to be very good at
telling me if a number is not prime.
My first comment is that for primes of large values, none of the
deterministic primality tests are useful. There are about X/log(X) primes
less than X, just storing this many primes for X on the order of 2^1024
would be infeasible at best. There will be in excess of 2^1000 of them, even
if each could be stored in a single bit this would be something on the order
of
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(10^290) hard disks. Even having your computer count that high is
infeasible.
Instead, probabilistic methods are used, in particular Mill-Rabin is a very
common choice with sufficient iterations, and different values of
"sufficient" are debated. My preference is severe overkill of 1 test for
every bit, significant overkill to be sure, but it simply doesn't take that
long. I'm sure if this thread continues someone else will chime in on
alternatives.
Quote: Please can I have some feed back on how to improve the program and or
code that I have written.
Maybe later I'll look at your protocol to see if it is secure.
Joe |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Fri Aug 29, 2008 1:39 pm
|
|