ONLY PART II of this question, i only uploaded part 1 as it might have relevance
ID: 3679488 • Letter: O
Question
ONLY PART II of this question, i only uploaded part 1 as it might have relevance to part 2 You announce to the world that if they need to write you a secret message they should convert it to numbers and then use the encryptor N = 2021 and the public exponent E = 5 to convert their messages, and then send their converted messages to you. Try to go through this process step by step: i) first pretend you are the sender: convert the message he and send it to the receiver (this is the encrypted R that is sent to the you,) ii) then pretend you are the receiver of the message, determine the values D and k, decipher the encrypted message, R, and make sure you recover the original message, that is heExplanation / Answer
Cryptography:
The area of study containing the principles and methods of transforming an intelligible message into one that is unintelligible, and then retransforming that message back to its original form.
Plaintext: This is the original intelligible message.
Encryption algorithm: The encryption algorithm performs various substitutions and transformations on the plaintext. It takes in plaintext and key and gives the ciphertext.
Secret key: The key is a value independent of the plaintext and of the algorithm. Different keys will yield different outputs.
Ciphertext: This is the scrambled message produced as output. It depends on the plaintext and the secret key.
Decryption algorithm: Runs on the ciphertext and the key to produce the plaintext. This is essentially the encryption algorithm run in reverse.
Two basic requirements of encryption are:
Encryption algorithm should be strong. An attacker knowing the algorithm and having any number of ciphertext should not be able to decrypt the ciphertext or guess the key.
The key shared by the sender and the receiver should be secret.
Let the plaintext be X = [X1, X2,…, XM], key be K = [K1, K2,…, KJ] and the ciphertext produced be Y = [Y1, Y2,…, YN]. Then, we can write Y = E(K, X) Here E represents the encryption algorithm and is a function of plaintext X and key K.
The receiver at the other ends decrypts the ciphertext using the key X=D(K,Y) Here D represents the decryption algorithm and it inverts the transformations of encryption algorithm.
An opponent not having access to X or K may attempt to recover K or X or both.
It is assumed that the opponent knows the encryption (E) and decryption (D) algorithms.
If the opponent is interested in only this particular message, then the focus of the effort is to recover by generating a plaintext estimate. .
If the opponent is interested in being able to read future messages as well then he will attempt to recover the key by making an estimate. .
If secrecy of the message is desired, encryption can be combined with the digital signature, providing privacy as well as proof of authorship. To do this, we can pick a random key, K, with which to encrypt the message (using a symmetric algorithm).
This key will then be encrypted with the public key of each recipient of the message. A recipient will be able to decrypt K with his private key, then decrypt the message, compute the hash, decrypt the hash attached to the message (decrypted with the sender's public key), and verify the origin and authenticity of the message.
Let's look at this again: Alice has a message, M, to send to Bob. She computes its hash, H(M) and encrypts it with her own private key: Ea(H(M)) . This is her signature. Secrecy of the message is important in this example, so she will encrypt the signed message with a symmetric algorithm using a randomly generated key, K. The encrypted signed message is EK({M,Ea(H(M))}). Now she has to enable only Bob to be able to decrypt this message, so she encrypts the key, K, with Bob’s public key: EB(K). Finally, she sends out the complete message: { EK({M,Ea(H(M))}), EB(K) }.
When Bob gets this message. He first decrypts the key, K, using his private key. Now, using K, he can decrypt the entire message with signature. Having done this, he computes a hash of M, H(M). He then decrypts Alice’s signature using Alice’s public key and compares the two hashes to validate the message.
Diffie-Hellman exponential key exchange
Diffie-Hellman is the first public key algorithm. Its use is different from RSA public-key cryptography in that it is only suitable for key exchange, not encryption. The publicly readable data is not really a key that will be used for encryption or decryption. The algorithm is based on the difficulty of calculating discrete logarithms in a finite field compared to the ease of calculating exponentiation.
Exponential key exchange allows us to negotiate a secret session key without the fear of eavesdroppers.
To perform this algorithm, all arithmetic operations are performed in the field of integers modulo some large number (modulo means that we divide the results by and keep the remainder). Both parties then agree on some large prime number, p, and a number , where < p and is a primitive root of p. 1
Each party then generates a public/private key pair. The private key for user i is Xi , which is just a random number less than q. The corresponding public key, Yi , is computed as:
€ Yi =B Xi mod p
Now, suppose that Alice and Bob wish to talk. Alice has a secret key XA and a public key YA and Bob has a secret key XB and a public key YB.
1. Alice sends Bob her public key, YA.
2. Bob sends Alice his public key, YB.
3. Alice computes: K Y p XA = ( B ) mod
4. Bob computes: K Y p XB = ( A ) mod
5. Alice and Bob can now use symmetric encryption using the shared key K
The essential point is that both Alice and Bob could generate a common shared key using their private key and the other’s public key but nobody else could do so. The keys are equivalent because:
€ K = (YA ) XB mod p = (XA mod p) XB mod p =XA XB mod p.
Now that two parties can derive a common conversation key (that only they can derive) , one of them can pick a random token and send it to the other for encryption
note-All this explanation can be helpful for the query
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.