Beruflich Dokumente
Kultur Dokumente
By:-
Er. Amit Mahajan
Introduction
• Cryptography is a method of storing and transmitting
data in a form that only those it is intended for can read
and process. It is a science of protecting information by
encoding it into an unreadable format. Cryptography is
an effective way of protecting sensitive information as it
is stored on media or transmitted through network
communication paths. Although the ultimate goal of
cryptography, and the mechanisms that make it up, is
to hide information from unauthorized individuals, most
algorithms can be broken and the information can be
revealed if the attacker has enough time, desire, and
resources. So a more realistic goal of cryptography is to
make obtaining the information too work-intensive to be
worth it to the attacker
Cntd.
Encryption is the conversion of data into a form,
called cipher text, that cannot be easily
understood by unauthorized people. Decryption is
the process of converting encrypted data back into
its original form , called plaintext so it can be
understood.
In order to easily recover the contents of an
encrypted data, the correct decryption key is
required. The key is an algorithm that undoes the
work of the encryption algorithm (cipher).
Why Cryptogrpahy
Security is a major concern on the Network,
especially when you're using it to send
sensitive information between parties.
• Credit-card information
• Social Security numbers
• Private correspondence
• Personal details
• Sensitive company information
• Bank-account information
CIPHER
• A cipher (or cipher) is an algorithm for
performing encryption and decryption — a series
of well-defined steps that can be followed as a
procedure. An alternative term is encipherment.
In non-technical usage, a “cipher” is the same
thing as a “code”; however, the concepts are
distinct in cryptography. When using a cipher the
original information is known as plaintext , and
the encrypted form as cipher text. The cipher
text message contains all the information of the
plaintext message, but is not in a format readable
by a human or computer without the proper
mechanism to decrypt it.
BLOCK CIPHERS
• In cryptography, a block cipher is a symmetric key cipher
which operates on fixed-length groups of bits, termed blocks,
with an unvarying transformation. When encrypting, a block
cipher might take (for example) a 128-bit block of plaintext as
input, and output a corresponding 128-bit block of ciphertext.
The exact transformation is controlled using a second input —
the secret key. Decryption is similar: the decryption algorithm
takes, in this example, a 128-bit block of ciphertext together
with the secret key, and yields the original 128-bit block of
plaintext.
• DES is a block cipher with a 64 bit block size. AES is a block
cipher with a 128 bit block size. RSA and Diffie-Hellman are
block ciphers with variable block sizes
STREAM CIPHERS
• Stream ciphers encrypt plaintext one byte or one bit at a
time.Stream ciphers represent a different approach to
symmetric encryption from block ciphers. Block ciphers
operate on large blocks of digits with a fixed, unvarying
transformation.. Stream ciphers typically execute at a
higher speed than block ciphers and have lower hardware
complexity. However, stream ciphers can be susceptible to
serious security problems if used incorrectly: see stream
cipher attacks — in particular, the same starting state
must never be used twice.
• Example Stream Ciphers A5, the algorithm used to encrypt
GSM communications, is a stream cipher. The RC4 cipher
and the one time pad are also stream ciphers
STREAM CIPHER
CATEGORIES
SYMMETRIC KEY
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Outer 00 0010 1100 0100 0001 0111 1010 1011 0110 1000 0101 0011 1111 1101 0000 1110 1001
bits
01 1110 1011 0010 1100 0100 0111 1101 0001 0101 0000 1111 1010 0011 1001 1000 0110
10 0100 0010 0001 1011 1010 1101 0111 1000 1111 1001 1100 0101 0110 0011 0000 1110
11 1011 1000 1100 0111 0001 1110 0010 1101 0110 1111 0000 1001 1010 0100 0101 0011
Weaknesses
• Key distribution. It requires a secure
mechanism to deliver keys properly
• Scalability .Each pair of users needs a unique
pair of keys, so the number of keys grow
exponentially.
• Limited security. It can provide confidentiality,
but not authenticity.
ASYMMETRIC KEY
• Asymmetric-key encryption, public-key encryption uses two
different keys at once -- a combination of a private key and a
public key. The private key is known only to your computer, while
the public key is given by your computer to any computer that
wants to communicate securely with it. To decode an encrypted
message, a computer must use the public key, provided by the
originating computer, and its own private key. Although a
message sent from one computer to another won't be secure
since the public key used for encryption is published and available
to anyone, anyone who picks it up can't read it without the private
key. The key pair is based on prime numbers (numbers that only
have divisors of itself and one, such as 2, 3, 5, 7, 11 and so on) of
long length. This makes the system extremely secure, because
there is essentially an infinite number of prime numbers available,
meaning there are nearly infinite possibilities for keys. One very
popular public-key encryption program is Pretty Good Privacy
(PGP), which allows you to encrypt almost anything.
ASYMMETRIC KEY
RSA Encryption
• 4. Now B knows enough to encode a message to A. Suppose, for this example, that
the message is the number M = 35.
• 7. Now A wants to decode 545. To do so, he needs to find a number d such that
ed = 1(mod (p -1)(q - 1)), or in this case, such that 7d = 1(mod 880). A solution is d =
503, since 7 * 503 = 3521 = 4(880) + 1 = 1(mod 880).
Contd..
• 8. To find the decoding, A must calculate Cd(mod N) = 545503(mod
943). This looks like it will be a horrible calculation, and at
first it seems like it is, but notice that 503 =
256+128+64+32+16+4+2+1 (this is just the binary expansion of
503). So this means that
545503 = 545256+128+64+32+16+4+2+1 = 545256545128 …… 5451
• But since we only care about the result (mod 943), we can
calculate all the partial
results in that modulus, and by repeated squaring of 545, we can
get all the exponents that are powers of 2. For example, 5452(mod
943) = 545 545 =297025(mod 943) = 923. Then square again:
5454(mod 943) = (5452)2(mod 943) = 923 923 = 851929(mod 943)
= 400, and so on. We obtain the following table:
5451(mod 943) = 545
5452(mod 943) = 923
5454(mod 943) = 400
5458(mod 943) = 633
54516(mod 943) = 857
54532(mod 943) = 795
54564(mod 943) = 215
545128(mod 943) = 18
545256(mod 943) = 324
• http://www.geometer.org/mathcircles/RSA.pdf
• http://www.cccure.org/Documents/Cryptography/c
isspallinone.pdf
• Data Communication and networking by Behrouz
A. Forouzan thid Edition
• http://www.tataelxsi.com/whitepapers/pub_key2.p
df?pdf_id=public_key_TEL.pdf
THANK YOU