Encryption
| By
Marcos on Sunday, December 01, 2002 - 02:22
pm: |
Can someone briefly explain or direct me to somewhere where I
can find out about the basic idea behind encryption
methods and what the relation to prime numbers
is?
Thanks
Prime numbers play a major role in an encryption proccess
called RSA. In-order for me to continue, I must know what you
know about congruences, euler's phi function (and its relation to
congruences).
Yatir
| By
Marcos on Sunday, December 01, 2002 - 03:05
pm: |
I just know basic things about congruences and I hardly know anything about
the phi function. All I know is that
is the number of naturals
,
such that
and
.
Is that correct?
Yes, you are correct.
All you need to know is that
for
and
(mod
)
Fermat's little theorem is a special case of this relation (discovered by Euler),
since
for prime
.
The idea behind RSA (Invented by R. Rivest, A. Shamir and L.
Adleman) encryption is the following:
Let's say you want to encrypt a number
, which represents a mesage (If
then you break
into segments each of them
).
Each recipient has an encryption key
, with it we can encrypt
, BUT
NOT decrypt due to a property that we will discuss in a moment.
is equal to
a product of two big primes (
), and
is a random positive integer
satisfying
(preferably higher than both
and
).
We get our encrypted message,
, by raising
to the power of
modulo
.
(mod
)
The receiver then decyphers the transmitted information by first determining
the integer
, for which:
(mod
)
Since
this linear congruence has a unique solution modulo
. The Euclidean algorithm produces
as a solution
to the equation :
This equation can easily be solved once you know
[this can
be proved very easily, if you need help, ask]
And in order for someone to know
he must know
and
which
composite
, and since we chose
and
to be very large prime numbers
(let's say200 digits each) it is very unlikely that someone will find
them given only
with our current computer power.
Once the receiver found
he simply has to calculate
(mod
) to find
. Because
for some integer
,
(mod
)
whenever
(which is a necessary condition in order for us to use
Euler's theorem - regarding the phi function). It is highly unlikely that they
are not relatively prime. But if they turn out not to be relatively prime we
may use a similar argument that establishes
(mod
) and
(mod
which yields the congruence
(mod
).
Each person (Call him Steve) sends out a public key, namely
. Each
person (John) that desires to encrypt a message to Steve uses this public key
to encrypt a message and then sends it back to Steve. ONLY Steve can decrypt
the message because only he knows
and
.
I hope I explained it clearly enough
If not (which is very
likely) I'll be more than happy to explain.
Yatir
Taking a step back, there are two broad
types of encryption algorithms: symmetric algorithms and
public key algorithms .
With the former [example: DES], knowing the encryption key
enables one to deduce the decryption key and vice versa. Security
resides in keeping the encryption key safe.
With the latter [example: RSA, also try looking up PGP on the
web] the encryption (public) key is freely given to anyone
interested -knowing it is enough to encrypt a message but still
not enough to decrypt the message. So I announce my public key on
the web, you encrypt a message and send it to me. Only because I
know something else (the private key) can I decrypt the
message.
The use of primes arises from (some) public key algorithms. The
idea is that it is easy to generate very large prime numbers (or
at least very likely to be prime, so called 'industrial primes').
The product is, nevertheless, very difficult for someone to
factor. Prime proving is easier than factoring. So I create two
large primes and multiply them. I devise an algorithm for which
encryption rests on the use of the composite number, and
decryption is secure provided I cannot easily factor the number.
So I announce the product to the world and keep the prime factors
to myself. Anyone can now send me an encrypted message but only I
can read it because only I have the factors.
If you want to read more, you might try 'Applied Cryptography' by
Bruce Schneier.
Andre
The 'Handbook of Applied Crypography', is also a good
introduction, and is available freely online.
It might be worth pointing out that Cryptography makes use of
an extremely wide variety of mathematical disciplines like group
theory, number theory, and probability theory to name but a few.
For example, the current Advanced Encryption Standard, Rijndael,
(the successor to the DES) treats bytes as elements of a finite
field (viz. F28 ).
Bruce Schneier's company website, www.counterpane.com , has a lot
of links to papers and websites on cryptography.
Kumusta!
~~~
Since you're interested in ENCRYPTION , maybe you'd like this: a site which
features Data Encryption Techniques
...try this link...
http://www.mrp3.com/encrypt.html
Enjoy the site!