Upload
charchit99
View
17
Download
2
Tags:
Embed Size (px)
DESCRIPTION
The RSA
Citation preview
Cryptography &Rsa
INSTITUTE OF ENGINEERING & TECHNOLOGY, ALWAR
Submitted By-Charchit Taneja CSE ‘A’ Batch11EIACS026
Submitted to-Mr. Mohit Khandelwal
1
What is Cryptography?Cryptography derived its name from a Greek word called “Kryptos” which means “Hidden Secrets”.
Cryptography is the practice and study of hiding information. It is the Art or Science of converting a plain intelligible data into an unintelligible data and again retransforming that message into its original form.
It provides Confidentiality, Integrity, Accuracy.
2
What is Encryption / What is Encryption / DecryptionDecryption
Encryption – The process of converting plain text into an unintelligible format
(cipher text) is called Encryption.
Decryption – The process of converting cipher text into a plain text is called
Decryption.
3
Private-Key Cryptography
traditional private/secret/single key cryptography uses one key
shared by both sender and receiver if this key is disclosed communications are
compromised also is symmetric, parties are equal hence does not protect sender from receiver
forging a message & claiming is sent by sender
4
Public-Key Cryptography
probably most significant advance in the 3000 year history of cryptography
uses two keys – a public & a private key asymmetric since parties are not equal uses clever application of number theoretic
concepts to function complements rather than replaces private key
crypto
5
Public-Key Cryptography
public-key/two-key/asymmetric cryptography involves the use of two keys: a public-key, which may be known by anybody,
and can be used to encrypt messages, and verify signatures
a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures
is asymmetric because those who encrypt messages or verify signatures
cannot decrypt messages or create signatures
6
Public-Key Cryptography
7
Public-Key Applications
can classify uses into 3 categories: encryption/decryption (provide secrecy) digital signatures (provide authentication) key exchange (of session keys)
some algorithms are suitable for all uses, others are specific to one
8
RSA Key Setup
each user generates a public/private key pair by: selecting two large primes at random - p, q computing their system modulus N=p.q
note ø(N)=(p-1)(q-1) selecting at random the encryption key e
where 1<e<ø(N), gcd(e,ø(N))=1 solve following equation to find decryption key d
e.d=1 mod ø(N) and 0≤d≤N publish their public encryption key: KU={e,N} keep secret private decryption key: KR={d,p,q}
9
RSA Example
1. Select primes: p=17 & q=112. Compute n = pq =17×11=1873. Compute ø(n)=(p–1)(q-1)=16×10=1604. Select e : gcd(e,160)=1; choose e=75. Determine d: de=1 mod 160 and d < 160
Value is d=23 since 23×7=161= 10×160+16. Publish public key KU={7,187}7. Keep secret private key KR={23,17,11}
10
RSA Example cont
sample RSA encryption/decryption is: given message M = 88 (nb. 88<187) encryption:
C = 887 mod 187 = 11 decryption:
M = 1123 mod 187 = 88
11
RSA Key Generation
users of RSA must: determine two primes at random - p, q select either e or d and compute the other
primes p,q must not be easily derived from modulus N=p.q means must be sufficiently large typically guess and use probabilistic test
exponents e, d are inverses, so use Inverse algorithm to compute the other
12
RSA Security
three approaches to attacking RSA: brute force key search (infeasible given size of
numbers) mathematical attacks (based on difficulty of
computing ø(N), by factoring modulus N) timing attacks (on running of decryption)
13
Question and Answer Session
14
Q1. How Large a Modulus (Key) Should be Used in
RSA?
15
Ans.
The best size for an RSA modulus depends on one's security needs. The larger the modulus, the greater the security, but also the slower the RSA operations. One should choose a modulus length upon consideration, first, of one's security needs, such as the value of the protected data and how long it needs to be protected, and, second, of how powerful one's potential enemies are.
16
Q2 In relation to DES, chaining is used because: (Note: more than one answer is correct.)
1) In electronic code book mode of working one, or more, blocks of data may be tampered with in transmission and the receiver be unaware of the fact.2) Chaining, in addition to secrecy, provides integrity of data.3) A greater degree of secrecy is provided.4) Encryption is achieved more rapidly.
17
Correct Answers:
Chaining, in addition to secrecy, provides integrity of data
In electronic code book mode of working one, or more, blocks of data may be tampered with in transmission and the receiver be unaware of the fact
18
Q3 Select the answer/s that correctly apply to an RSA digital signature.
1) A digital signature provides a message digest.
2) A digital signature proves to a recipient that the sender is authentic.
3) A digital signature ensures that a message is correctly encrypted.
4) A digital signature facilitates non-repudiation.
19
Correct Answers:
A digital signature facilitates non-repudiation.
A digital signature proves to a recipient that the sender is authentic.
20
Q4 A certificate, in the RSA system, indicates to the receiving party that the sender's public key used to encrypt a message is in fact genuine.
1) True2) False
21
Correct Answer:
True
A certificate indicates that the public key used to encrypt a message is bona fide and issued by a Certification Authority. This prevents encryption using someone else's public key.
22
Q5 Two security threats that E-commerce must guard against are that an eavesdropper may _____ Internet communication to obtain _____ information which may then be used by a third party to make _____ purchases. Secondly, a bogus site may be used to obtain _____ without providing any goods or services.
1) interrupt; some; fraudulent; money
2) intercept; some; free; money
3) intercept; confidential; fraudulent; money
4) intercept; confidential; multiple; details
23
Correct Answer
Intercept; confidential; fraudulent; money
24
Q6 Asymmetric Encryption: Why can a message encrypted with the Public Key only be decrypted with the receiver's appropriate Private Key?
1. Not true, the message can also be decrypted with the Public Key.
2. A so called "one way function with back door" is applied for the encryption.
3. The Public Key contains a special function which is used to encrypt the message and which can only be reversed by the appropriate Private Key.
4. The encrypted message contains the function for decryption which identifies the Private Key.
25
Correct Answer
A so called "one way function with back door" is applied for the encryption
An one-way function is a function which a computer can calculate quickly, but whose reversal would last months or years. An one-way function with back door can be reversed with the help of a couple of additional information (the back door), but scarcely without this information. The information for the back door is contained in the private Key.
26
Q7 Which is the largest disadvantage of the symmetric Encryption?
1. More complex and therefore more time-consuming calculations.
2. Problem of the secure transmission of the Secret Key.
3. Less secure encryption function.
4. Isn't used any more.
27
Correct Answer
Problem of the secure transmission of the Secret Key.
There is only one key in the symmetrical encryption, this must be known by both sender and recipient and this key is sufficient to decrypt the secret message. Therefore it must be exchanged between sender and receiver in such a manner that an unauthorized person can in no case take possession of it.
28
Q8 _________ ciphers can be categorized into two broad categories: monoalphabetic and polyalphabetic.
A) Substitution
B) Transposition
C) either (a) or (b)
D) neither (a) nor (b
29
Correct Answer
B) Substitution
30
Q9 The _______ cipher is the simplest monoalphabetic cipher. It uses modular arithmetic with a modulus of 26.
A) transpositionB) additiveC) shiftD) none of the above
31
Correct Answer
Shift
The Ceaser Cipher is a type of shift cipher. Shift Ciphers work by using the modulo operator to encrypt and decrypt messages. The Shift Cipher has a key K, which is an integer from 0 to 25. We will only share this key with people that we want to see our message.
32
Q10 A(n) ______ is a keyless substitution cipher with N inputs and M outputs that uses a formula to define the relationship between the input stream and the output stream.
A) S-boxB) P-boxC) T-boxD) none of the above
33
Correct Answer
S-Box
S-box (substitution-box) is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the key and the cipher text — Shannon's property of confusion.
34
Q11 A modern cipher is usually a complex _____cipher made of a combination of different simple ciphers.
A) roundB) circleC) squareD) none of the above
35
Correct Answer
Round
36
Q12 The DES function has _______ components.
A) 2B) 3C) 4D) 5
37
Correct Answer
3
38
Q13 The _________ attack can endanger the security of the Diffie-Hellman method if two parties are not authenticated to each other.
A) man-in-the-middleB) cipher text attackC) plaintext attackD) none of the above
39
Correct Answer
Man-in-the-middle
40
Q14 How do you use RSA for both authentication and secrecy?
41
Correct Answer
RSA is based upon public key/private key concept. For authentication one can encrypt the hash (MD5/SHA) of the data with his private key. This is known as digital signature. And secrecy is achieved by encrypting the data with the public key of the target user. Generally we don't use RSA for encryption because of key size (1024 bits). Rather a symmetric session key (128/256 bit) is established between communicating parties and is used for encryption.
42
Q15 Can we do the project in ENCRYPTION AND DECRYPTION as a operating system project? If yes how can we use the concepts?
43
Correct Answer
Yes we can. All the information will be stored in encryptedform in memory. During fetching, it must be first decryptedby operating system and then can be read.
44
Q16 What is tamper-resistant hardware?
45
Correct Answer
Ensuring that various cryptographic keys are provided bytheir intended users, and only for their intended purposes,temper resistant hardware is introduced.
An example temper resistant device is your "SMART CARD".
You have to physically possess the device and also have topossess the PIN or the password to use it.
46
Q27 What is probabilistic encryption?
47
Correct Answer
Probabilistic encryption, developed by Goldwasser and Micali [GM84], is a design approach for encryption where a message is encrypted into one of many possible cipher texts (not just a single cipher text as in deterministic encryption).
This is done in such a way that it is provably as hard to obtain partial information about the message from the cipher text as it is to solve some hard problem
48
Q18 What are special signature schemes?
49
Since the time Diffie and Hellman introduced the concept of digital signatures many signature schemes have been proposed in cryptographic literature. These schemes can be categorized as either conventional digital signature schemes (for example, RSA and DSA) or special signature schemes depending on their security features. In a conventional signature scheme (the original model defined by Diffie and Hellman), we generally assume the following situation:
1) The signer knows the contents of the message that he has signed.
2) Anyone who knows the public key of the signer can verify the correctness of the signature at any time without any consent or input from the signer. (Digital signature schemes with this property are called self-authenticating signature schemes.)
3) The security of the signature schemes is based on certain complexity-theoretic assumptions.
50
Thank You
51