Lindsey Yoast Networking Final Paper Due December 19, 2013

advertisement
Lindsey Yoast
Networking
Final Paper
Due December 19, 2013
Encryption
In today’s society the average person has at least 3-4 things that need to be kept a secret.
Such as social security numbers, bank accounts, and credit card information. A long time ago,
identity theft and the stealing of important information (hacking) weren’t a huge problem. But with
the processing power that a computer has today, can decrypt information in a matter of seconds,
unless the material is encrypted properly.
Encryption is the process of taking information and translating it into a language that only a
person (or computer) with the correct key can decode it. Encryption is shown as early as 750 A.D.
when two Roman Generals were encrypting messages and sending them to one another. If a
message we to be intercepted, the Greeks had to way of reading these scrambled letters. This was
known as a cipher.
Ciphers are known today as algorithms, because a human based code is way to easy for a
computer to crack. There are two main categories of encryption: Symmetric-Key, and Public-Key.
Symmetric-Key are a class of algorithms for cryptography that use the same cryptographic
keys for both encryption of plaintext and decryption of cipher text. This is shown in the previous
example of the two Roman generals. Each general had to have the key to the encrypted code or
they could not interpret the code. In our case, each computer has the key that it uses to encrypt a
packet before it is sent over the network. The computer that receives the encrypted packet uses the
same key to decrypt the packet.
The first major symmetric algorithm developed for computers in the U.S. was the Data
Encryption Standard (DES) in the 1970’s. The DES uses a 56-Bit key which has 70 quadrillion
Figure 1.2
different combinations. But with the speed of computer processors the DES becomes quite easy to
encrypt. Now, DES has been replaced by the Advanced Encryption Standard (AES), which uses
128-, 192-, or 256- bit keys. A 128- bit key can have three hundred decillions
(300,000,000,000,000,000,000,000,000,000,000,000 possible combinations). There are two types
of symmetric key algorithms that are used today: Steam Ciphers, and Block Ciphers.
Stream ciphers encrypt the bytes of the message one at a time, while the block ciphers take
a number of bits and encrypt them as a single unit, padding the plaintext so that it is a multiple of
the block size. Blocks of 64 bits have been commonly used. Now we have the AES algorithm
approved by NIST in December 2001that uses 128-bit blocks. Figure 1.2 shows names of various
types of algorithm sin symmetric-key.
In 1976 public-key encryption was created because a weakness in the symmetric key was
found. For symmetric key to work, both parties must have the key. Public key works differently;
where there is a private key, which is known only by the computer, and the public key which the
computer gives when wanteing to
communicate with another computer. Since
there is now two-keys, the computer must
have both keys before decoding the ciphertext. Though these two keys are completely
different they are mathematically linked. The
public key is used to encrypt plaintext or
verify a digital signature. Where a private key is used to decrypt ciphertext or to create a digital
signature. Public-key algorithms are fundamental security ingredients in cryptosystems
applucations and protocals. They underly such internet standards as Transport Security Layer
(TLS, PGP, GPG.
But how does public key really work? Public-key uses a asymmetric key algorithms, where
the key that you use to encrypt the message is not the same as the one used to decrypt the message.
RSA ( named after its creators Ron Rivest, Adi Shamir, and Leonard Aldeman) is a cryptosystem
in public key that is known as the first practical system used in data transmission.
The math behind RSA is difficult but simple. Prime numbers and modulus is the main focus in this
algorithm. In math we learn how to factor prime numbers (prime numbers are numbers that can not
be divided by any number except itself and one, such as 2,3,5,7,11,13 etc), and that is just what is
code entails. The main idea behing RSA encryption is that prime numbers are infinately lonPicture
2 people: person A and person B.
1. Suppose A wants to make a public key, and B wants to send person A a message. Person A
need to create a public key composed of 2 prime numbers. A chooses p=23 and q=41,
where pq=943 ( in a real situation, p and q should be prime numbers that are thousand of
digits long), pq is the “public key” that is told to Person B. We will set pq = N.
2. Person A also chooses another number e in which must be relatively prime to(p-1)(q-1). In
this this can (22)(40)=880 so we will choose the number e=7. This is also a part of the
public key, so B is also told of the value of e.
3. Now B knows enough to encode the message to A. For this example we will say that our
message (M) is M=35. B calculates the value of C, C=Me(mod N)=357(mod 943).
4. 357=64339296875 and 64339296875(mod 943) = 545. The number 545 is the number that
B sends to A as the encrypted message.
5. Now A wants to decode 545. To do this we need to find d such that ed=1(mod(p-1)(q-1)),
or in our specific case such that 7e=1(mod 880).
6. To decode A must calculate Cd(mod N) = 543503(mod 943). This is a horrible calculation,
so we will so the binary expansion of 503 =256+128+64+32+16+4+2+1. So this shows that
545303=545 256+128+64+32+16+4+2+1= 545256+545128+…+5451.
7. since we only care about the result (mod 943), we can
calculate all the parts of the product (mod 943). By repeated
squaring of 545, we can get all the exponents that are powers
of 2. For example, 5452 (mod 943) = 545 * 545
5451 (mod 943) = 545
5452 (mod 943) = 923
5454 (mod 943) = 400
5458 (mod 943) = 633
=297025(mod 943) = 923. Then square again: 5454(mod 943)
54516 (mod 943) = 857
= (5452)2(mod 943) = 923 * 923 =851929(mod 943) = 400,
54532 (mod 943) = 795
and so on. We obtain the following table:
54564 (mod 943) = 215
8. The result we want is:
545128 (mod 943) = 18
545503(mod 943) = 324 *18 * 215 * 795 * 857 * 400 * 923 *
545(mod 943) = 35.
This is difficult for a human, but for a computer it’s a simple
calculation. A can decode the message from B and obtain N=35.
545256 (mod 943) =324
An example of a program that uses Public –Key is Pretty Good Privacy (PGP). PGP
is a popular program used to encrypt and decrypt e-mail over the Internet. It can also be
used to send an encrypted digital signature that lets the receiver verify the sender's identity
and know that the message was not changed in route.
Encryption today is important for all security reasons: passwords, social security,
and back accounts. Keeping our information safe is relied upon these algorithms and other
computers. But it is also other computer that can hack our information. It is important to
keep studying the use of encryption in today do make sure that it keeps improving and we
are kept safe.
Download