Cryptography Answers
Cryptography Answers
Justify the claim that "The Diffie-Hellman approach was the first practical public key
crypto algorithm.
The public key idea was invented and first published by Whitfield Diffie and Martin Hellman in
1976. It turns out that it had been invented earlier but kept secret by governments. Public key
cryptography is a mathematical technique to avoid the need to communicate a secret key from
one person to another.
Justify the statement, "In DES, the initial key size is equal to the length of the plain text
block."
Yes initially the key is also of the same length as that of the plaintext which is 64 bits but every
8th bit of the key is discarded. So the bits 8,16,24,32,40,48,56 and 64 are discarded and the key
length becomes 56 bits.
How does DES-3 allow for the reuse of a key?
In 3-DES the keys that we use can be all different or it may also be that two keys are the same
and the other one is different. In the latter case, users encrypt plaintext blocks with key K1,
then decrypt with key K2, and finally encrypt with K1 again where K1 and K2 are the
keys.
Why does Triple DES have a decryption in the middle rather than an encryption?
Each triple encryption encrypts one block of 64 bits of data. In each case the middle
operation is the reverse of the first and last. This improves the strength of the algorithm
when using keying option 2 and provides backward compatibility with DES with keying
option 3.
Describe the potential issue with the DES-2 algorithm.
double DES uses a 112 bit key but gives a security level of 2^56 not 2^112 and this is because
of a meet-in-the middle attack which can be used to break through double DES.
Justify the claim that "Symmetric key cryptography does not enable authentication and
non-repudiation."
Give an example of how "Secret key cryptography is faster than public key
cryptography."
Asymmetric encryption is slower than symmetric encryption because it employs two
separate keys that are linked through a difficult mathematical procedure. Symmetric
encryption is mostly used to transfer large amounts of data.
Why is DES less secure than Double DES and Triple DES? Explain.
As we know the Data encryption standard (DES) uses a 56 bit key to encrypt any plain text
which can be easily cracked by using modern technologies. To prevent this from happening
double DES and triple DES were introduced which are much more secure than the original DES
because it uses 112 and 168 bit keys respectively. They offer much more security than DES.
It is well known that two communicating parties cannot easily share the same secret key
in symmetric-key cryptography. How does public-key cryptography work to address this
issue?
Public key or asymmetric key cryptography uses two different keys-one private key and one
public key, one is used for encryption with the other one being used for decryption. Generally
the receiver’s public key is used for encryption and the private key is used for encryption. So
even if the attacker gets hold of the public key, he won’t be able to decrypt the message without
getting the private key.
Comment about the RSA algorithm's strength.
The RSA algorithm is based on the prime factorization problem. So if the attacker can break the
large composite number into two primes and get the values of p and q then the security of the
system will be compromised.
Describe how "Man-in-the-middle attack" affects public key exchange
"A man-in-the-middle attack may permit the attacker to completely subvert encryption and gain
access to the encrypted contents, including passwords. A successful attacker is able to inject
commands into terminal sessions, to modify data in transit, or to steal data.
The attack also allows injecting malware into any binaries and software updates downloaded
through the system. Several attack groups and malware packages have used this technique in
the past"
Secret key encryption algorithms, such as Rijndael or Twofish, for message encryption.
Public key encryption algorithm from RSA for secret key encryption with a receiver’s public key.
● Message Authentication: You can verify the origin of the sender using the right
key combination.
● Integrity Verification: You cannot tamper with the message since it will prevent
the bundle from being decrypted altogether.
● Non-repudiation: The sender cannot claim they never sent the message if
verifies the signature.
Why does cryptography employ message digests?
https://www.google.com/amp/s/www.geeksforgeeks.org/message-digest-in-information-security/
amp/
Cipher suites
SSL protocol offers support for the Fortezza cipher suite. TLS does not offer support. TLS
follows a better standardization process that makes defining of new cipher suites easier like
RC4, Triple DES, AES, IDEA, etc.
Alert messages
SSL has the “No certificate” alert message. TLS protocol removes the alert message and
replaces it with several other alert messages.
Record Protocol
SSL uses Message Authentication Code (MAC) after encrypting each message while TLS on
the other hand uses HMAC — a hash-based message authentication code after each message
encryption.
Handshake process
In SSL, the hash calculation also comprises the master secret and pad while in TLS, the hashes
are calculated over handshake message
Interception attacks allow unauthorized users to access our data, applications, or environments,
and are primarily an attack against confidentiality."
What fundamental tenet underpins digital signatures?
Masquerade Attack...
Denial-of-Service Attack...
Trojans
A minor alteration to the plain text should result in a substantial modification to the
encrypted text. Why does that matter?
The plain text is encrypted into the ciphertext using some standard encryption algorithms and
specific user chosen keys. If change to a single bit of the plaintext results in change of a single
bit in the ciphertext then it will be easy to perform statistical analysis and cryptanalysis on it
because the underlying mathematics is simple. On the other hand if it causes significant
changes in the ciphertext then it will be very difficult for the attacker. For example in hash
function, one single bit change in the original message will result in an entirely different
message digest. This is known as the Avalanche property of Cryptography.
https://www.geeksforgeeks.org/avalanche-effect-in-cryptography/
There are many different types of cryptanalysis attacks and techniques, which
vary depending on how much information the analyst has about the ciphertext
being analyzed. Some cryptanalytic methods include:
1. The recipient applies his or her private key to the encrypted message key. The
result is the secret key that was originally used to encrypt the digital document.
2. The secret key that was revealed in the previous step is used to decrypt the
digital document. Result.
Choose the ideal type of website for server-side and client-side scripting by comparing
static, dynamic, and active webpages.
https://www.google.com/amp/s/www.geeksforgeeks.org/difference-between-static-and-dynamic-
web-pages/amp/
Describe the high-level steps for each mail security protocol.
https://www.techtarget.com/searchsecurity/answer/What-are-the-most-important-email-security-
protocols
Describe the PGP key rings concept
http://www.faadooengineers.com/online-study/post/cse/network-management-and-securuty/617/
pgp-key-rings
Use any two Transposition Techniques and any two Substitution Techniques to convert
"MEET ME."
Handwritten
Selecting the prime numbers p=7 and q=11, encrypt the message "BE" using the RSA
algorithm.
Handwritten
Draw a diagram of the RSA key generation algorithm.
https://www.researchgate.net/figure/Block-diagram-of-RSA-encryption-algorithms-IV-Design-of-t
he-RSA-Encryption-Algorithm-The_fig1_282249995
The message "where are you" should be encrypted and decrypted using the play fair
cypher technique.
Handwritten
What are the initial and inverse initial permutations of the plain string
123456ABCD132536 when it is submitted as input to the DES?
Handwritten
Draw a detailed diagram of the email sending and receiving process.
https://www.oasis-open.org/khelp/kmlm/user_help/html/how_email_works.html
Show how PGP is used to ensure the confidentiality of a message.
https://www.google.com/amp/s/www.geeksforgeeks.org/pgp-authentication-and-confidentiality/a
mp/
Showcase the MIME's features.
https://www.google.com/amp/s/www.geeksforgeeks.org/multipurpose-internet-mail-extension-mi
me-protocol/amp/
Distinguish between steganography and cryptography.
https://www.google.com/amp/s/www.geeksforgeeks.org/difference-between-steganography-and-
cryptography/amp/
Explain the differences between block and stream cypher
https://www.google.com/amp/s/www.geeksforgeeks.org/difference-between-block-cipher-and-str
eam-cipher/amp/
PGP and S/MIME can be compared and contrasted.
https://www.google.com/amp/s/www.geeksforgeeks.org/difference-between-pgp-and-s-mime/am
p/
Symmetric and asymmetric key encryption are compared and contrasted
https://www.geeksforgeeks.org/difference-between-symmetric-and-asymmetric-key-encryption/
RC5 and RC6 are contrasted.
https://crypto.stackexchange.com/questions/68460/difference-between-rc2-rc4-rc5-and-rc6
Use PGP to describe the transmission and receipt of messages
http://www.faadooengineers.com/online-study/post/cse/network-management-and-securuty/617/
pgp-message-transmission-and-reception
Examine the RC5's features.
https://www.google.com/amp/s/www.geeksforgeeks.org/rc5-encryption-algorithm/amp/
Examine the Fiestel cipher's characteristics.
https://www.google.com/amp/s/www.geeksforgeeks.org/feistel-cipher/amp/
Pick the S/MIME algorithms you want to use. Explain your response.
https://www.google.com/amp/s/www.compuquip.com/blog/what-is-smime%3fhs_amp=true
Discuss the qualities that a digital signature ought to have
NPTEL notes
How many bits are generated as the message digest and what should the MD5 block size
be?
The output from MD5 is a 128-bit message-digest value. Computation of the MD5
digest value is performed in separate stages that process each 512-bit block of data
along with the value computed in the preceding stage.
https://www.techtarget.com/searchsecurity/definition/MD5#:~:text=The%20output%20fro
m%20MD5%20is,computed%20in%20the%20preceding%20stage.
Discover the DES algorithm's advantages and disadvantages
https://www.tutorialspoint.com/what-are-the-advantage-and-disadvantage-of-des
10 marks questions:
Draw a block diagram to illustrate how one DES round works.
NPTEL NOTES
Describe the IDEA algorithm's guiding ideas
https://www.google.com/amp/s/www.geeksforgeeks.org/simplified-international-data-enc
ryption-algorithm-idea/amp/
Describe the RC5 encryption process.
https://www.google.com/amp/s/www.geeksforgeeks.org/rc5-encryption-algorithm/amp/
(a) What makes studying the Fiestel Cipher important? (b) Give a brief description
of the Fiestel Cipher construction. Draw attention to the design elements and
variables that affect how a design is realized. Talk about the decryption algorithm
used at the other end as well.
https://www.google.com/amp/s/www.geeksforgeeks.org/feistel-cipher/amp/
Give a brief description of the S-DES approach. (b) Give a brief overview of
the DES-2 (or Double DES) algorithm. (c) What exactly is Triple DES? Why is it
safer than DES, exactly?
Ans:
a) NPTEL notes
b) https://www.geeksforgeeks.org/double-des-and-triple-des/
c) https://www.geeksforgeeks.org/double-des-and-triple-des/
Why is the SHA-1 (message digest) algorithm important? Explain the differences
between SHA-1 and MD5, then examine the main criteria for message digests.
https://www.encryptionconsulting.com/education-center/what-is-sha/
https://www.geeksforgeeks.org/difference-between-md5-and-sha1/amp/
https://www.google.com/amp/s/www.geeksforgeeks.org/message-digest-in-information-
security/amp/
The following should be discussed critically: (a) Symmetric key cryptography
does not offer authentication and non-repudiation. (b) The symmetric and
asymmetric key cryptography's greatest qualities are combined in the digital
envelope technique. (c) In contrast to public key cryptography, secret key
cryptography is faster.
Describe the functions that the SSL Record Protocol offers. Infer the steps that
the SSL handshake protocol takes
https://www.google.com/amp/s/www.geeksforgeeks.org/secure-socket-layer-ssl/amp/
What exactly is a dual signature and why would you want one? List the four
essential procedures involved in producing a digital certificate. What drawbacks
are there to using clear text passwords?
https://www.google.com/amp/s/www.geeksforgeeks.org/secure-electronic-transaction-s
et-protocol/amp/
https://www.google.com/amp/s/www.geeksforgeeks.org/digital-certificate-creation/amp/
https://security.stackexchange.com/questions/12641/what-are-all-of-the-issues-with-sto
ring-a-cleartext-password#:~:text=There%20are%20two%20primary%20risks,This%20i
s%20poor%20practice
A generalization of the Caesar cipher, known as the affine Caesar cipher, has the
following form: For each plaintext letter p, substitute the ciphertext letter C: C =
E([a, b], p) = (ap + b) mod 26 A basic requirement of any encryption algorithm is
that it be one-to-one. That is, if p ≠ q, then E(k, p) ≠ E(k, q). Otherwise, decryption
is impossible, because more than one plaintext character maps into the same
ciphertext character. The affine Caesar cipher is not one-to-one for all values of
a. For example, for a = 2 and b = 3, then E([a, b], 0) = E([a, b], 13) = 3. a. Are there
any limitations on the value of b? Explain why or why not. b. Determine which
values of a are not allowed. c. Provide a general statement of which values of a
are and are not allowed. Justify your statement
a. No. A change in the value of b shifts the relationship between plaintext letters and
ciphertext letters to the left or right uniformly, so that if the mapping is one-to-one it
remains one-to-one.
b. 2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24. Any value of a larger than 25 is equivalent
to a mod 26.
c. The values of a and 26 must have no common positive integer factor other than 1. This
is equivalent to saying that a and 26 are relatively prime, or that the greatest
common divisor of a and 26 is 1. To see this, first note that E(a, p) = E(a, q) (0 ≤ p ≤
q < 26) if and only if a(p – q) is divisible by 26. 1. Suppose that a and 26 are
relatively prime. Then, a(p – q) is not divisible by 26, because there is no way to
reduce the fraction a/26 and (p – q) is less than 26. 2. Suppose that a and 26 have a
common factor k > 1. Then E(a, p) = E(a, q), if q = p + m/k ≠ p.
Consider a block encryption algorithm that encrypts blocks of length n, and let N =
2n. Say we have t plaintext–ciphertext pairs Pi, Ci = E(K, Pi), where we assume
that the key K selects one of the N! possible mappings. Imagine that we wish
to find K by exhaustive search. We could generate the key K′ and test whether
Ci = E(K′, Pi) for 1 … i … t. If K′ encrypts each Pi to its proper Ci, then we have
evidence that K = K′. However, it may be the case that the mappings E(K, # )
and E(K′, # ) exactly agree on the t plaintext–ciphertext pairs Pi, Ci and agree
on no other pairs. a. What is the probability that E(K, # ) and E(K′, # ) are in fact
distinct mappings? b. What is the probability that E(K, # ) and E(K′, # ) agree
on another t′ plaintext ciphertext pairs where 0 … t′ … N- t?
The second signatory as a first step must verify that the document was
really signed by the first signatory. She then incorporates her signature
into the document’s signature so that the recipient, as well as any member
of the public, may verify that the document was indeed signed by both
signatories. In addition, only the second signatory has to be able to verify
the document’s signature after the first step; that is, the recipient (or any
member of the public) should be able to verify only the complete document
with signatures of both signatories, but not the document in its
intermediate form where only one signatory has signed it. Moreover, the
bank would like to make use of its existing modules that support RSA-style
digital signatures.” “Hm, I understand how RSA can be used to digitally
sign documents by one signatory, Holmes. I guess you have solved the
problem of Mr. Hosgrave by appropriate generalization of RSA digital
signatures.” “Exactly, Watson,” nodded Sherlock Holmes. “Originally, the
RSA digital signature was formed by encrypting the document by the
signatory’s private decryption key ‘d’, and the signature could be verified
by anyone through its decryption using publicly known encryption key ‘e’.
One can verify that the signature S was formed by the person who knows
d, which is supposed to be the only signatory. Now the problem of Mr.
Hosgrave can be solved in the same way by slight generalization of the
process, that is …” Finish the explanation.