Cryptography

kitlunchroomAI and Robotics

Nov 21, 2013 (3 years and 11 months ago)

96 views

Cryptography

Jill Tolentino

Introduction


Cryptography in Greek means “secret writing.”



Today, it refers to the science and art of transforming
messages to make them secure and immune to attacks.



Cryptography is used to achieve:


confidentiality .............. only authorized persons can access information



integrity ...................... information that was sent is what was received



authentication ............. guarantee of originator and of electronic
transmission



non
-
repudiation ........... originator of information cannot deny content or
transmission



Cryptography components


Original message is called
plaintext.


An
encryption algorithm

transforms the plaintext to
ciphertext
.


A
decryption algorithm

tranforms the ciphertext back to
plaintext.


Sender uses an encryption
algorithm and the receiver uses
a decryption algorithm.


Encryption and Decryption


An encryption/decryption
algorithm is referred to as
ciphers
.


Through the use of public
ciphers with secret keys, one
cipher can serve millions of
communicating pairs.


A
key

is a number (value) that
the cipher, as an algorithm,
operates on.


The encryption and decryption
algorithms are public; the keys
are secret.

Cryptography


Cryptography algorithms are divided into
two groups:


Symmetric
-
key (secret
-
key) cryptography
algorithms



Public
-
key(asymmetric) cryptography algorithms


Symmetric
-
key Cryptography


The same key is shared and used by
the sender and receiver to encrypt
and decrypt the message.



The decryption algorithm is the
inverse of the encryption algorithm.



Example: If encryption algorithm
uses a combination of addition and
multiplication, the decryption
algorithm uses a combination of
division and subtraction.



Symmetric
-
key Cryptography

Advantages:


Efficient
-

takes less time to encrypt a
message using a symmetric
-
key algorithm
than a public
-
key algorithm.


Key is smaller


Can encrypt and decrypt long messages

Symmetric
-
key Cryptography

Disadvantages:


Each pair of users must have a unique
symmetric key.
This means if N people in the world want to
use this method, there needs to be N(N
-
1)/2 symmetric keys. For
example, for 1 million people to communicate, 500 billion symmetric
keys are needed.


Distribution of the keys between two parties
can be difficult.


Symmetric
-
key Cryptography


Traditional ciphers use a character or symbol as the unit of
encryption/decryption.


Block ciphers use a block of bits as the unit of
encryption/decryption.


Traditional ciphers involve either substitution or
transposition.


Substitution Cipher



bit
-
level encryption method in which n bits
substitute for another n bits as defined by P
-
boxes, encoders, and
decoders.


Transposition Cipher


A character
-
level encryption method in
which the position of the character changes.


Examples:

Public
-
key Cryptography


There are two keys:
a private key and a
public key.


The sender uses the
public key to
encrypt the
message and the
receiver uses the
private key to
decrypt the
message.

Public
-
key Cryptography

Advantages:


More efficient for short messages.


Removes the restriction of a shared symmetric key
between two entities.


Each entity is independent, and the pair of keys
created can be used to communicate with any
other entity.


Number of keys needed is reduced: For 1 million
users to communicate, only 2 million keys are
needed, not 500 billion, as in symmetric
-
key
cryptography.

Public
-
key Cryptography

Disadvantages
:


Complexity of the algorithm…the algorithm needs
large numbers to be effective.



Association between entity and its public key,
must be verified. (Can be overcome using a
certification authority)

Public
-
key Cryptography


The most common public
-
key algorithm is
called the RSA method after its inventors
(Rivest, Shamir, and Adleman).


The sender uses the following algorithm to
encrypt the message: C=P
e
mod N


The receiver uses the following algorithm to
decrypt the message: P=C
d
mod N

Example: