Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

While choosing the value of a and m (m is the no. of alphabets) in affine cipher it must be ensured that?(a) a and m are prime numbers(b) a and m are odd numbers(c) a and m are coprime(d) a and m are even numbersThis question was posed to me during an interview.The question is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (c) a and m are coprime

For explanation: While choosing the VALUES of a and m it should be ensured that a and m are coprime. OTHERWISE DECODING the ciphered TEXT WOULD be difficult.

2.

What will be the plain text corresponding to ciphered text “rmw ” if an affine cipher is used with key values as a=5, b=10?(a) csk(b) kkr(c) srt(d) msdThis question was posed to me during an interview for a job.Question is taken from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (c) srt

The BEST EXPLANATION: AFFINE cipher uses linear algebra for the purpose of ENCRYPTION It uses the formula a^-1(x-b)%26 for decryption of ciphered text. So the plain text will be “srt”.

3.

What will be the ciphered text corresponding to plain text “sanfoundry” if an affine cipher is used with key values as a=5, b=10?(a) wkxjcgxzra(b) gkxteuxfzw(c) ukxhmyxdfg(d) rfsexbsumvThe question was posed to me in homework.My question is from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right option is (a) wkxjcgxzra

Easiest EXPLANATION - Affine cipher uses LINEAR ALGEBRA for the PURPOSE of ENCRYPTION. It uses the formula(ax+b)%26 for this purpose. So the ciphered text will be “wkxjcgxzra”.

4.

Affine cipher is not susceptible to frequency analysis.(a) true(b) falseThe question was posed to me during a job interview.Origin of the question is Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT option is (B) false

Explanation: Affine CIPHER is a very weak cipher as it can be EASILY broken using frequency analysis. It can be easily cracked EVEN if 2 characters are known.

5.

Affine cipher is less secure than caesar cipher.(a) true(b) falseI got this question during an interview.My question is taken from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer» RIGHT choice is (b) false

Easiest explanation - Affine cipher is more secure as COMPARED to caesar cipher. But affine cipher is a very WEAK cipher as it can be easily broken using frequency ANALYSIS.
6.

Affine cipher is an example of?(a) Mono alphabetic cipher(b) Poly alphabetic cipher(c) Transposition cipher(d) Asymmetric cipherI got this question in class test.My query is from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

Right choice is (a) Mono ALPHABETIC cipher

The best I can explain: Affine cipher FALLS in the category of mono alphabetic substitution cipher. It uses linear ALGEBRA for encrypting the plain text.

7.

What is the formula used for decoding the ciphered text using affine cipher(a,b are constants and x is the numerical equivalent of a letter to be encrypted)?(a) a^-1(x-b)%26(b) (ax+b)%26(c) b^-1(x-a)%26(d) b^-1(x-a)I got this question by my college professor while I was bunking the class.My question is based upon Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

The correct option is (a) a^-1(x-b)%26

To EXPLAIN: Affine cipher uses LINEAR ALGEBRA for the purpose of encryption. It uses the formulaa^-1(x-b)%26 for DECRYPTION of ciphered TEXT.

8.

What is the formula used for encryption of data using affine cipher(a,b are constants and x is the numerical equivalent of a letter to be encrypted)?(a) ax+b(b) (ax+b)%26(c) ax^2+bx(d) (ax^2+bx)%26This question was addressed to me in class test.I need to ask this question from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (b) (ax+b)%26

To explain: AFFINE cipher uses LINEAR algebra for the purpose of ENCRYPTION. It uses the FORMULA (ax+b)%26 for this purpose.

9.

Choose the weakest cipher from the following?(a) Vigenere cipher(b) Autokey cipher(c) Affine cipher(d) Hill cipherThe question was asked during an interview for a job.This key question is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

Correct answer is (c) AFFINE cipher

The EXPLANATION is: Affine cipher is the weakest cipher out of the GIVEN options as it is a mono alphabetic cipher and other options are poly alphabetic ciphers. So it is QUITE vulnerable to frequency analysis.

10.

Which of the following cipher requires only one key for decoding the ciphered text?(a) Affine cipher(b) RSA(c) DSA(d) PKCSI have been asked this question during an interview for a job.Question is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

Correct ANSWER is (a) Affine CIPHER

For explanation: Asymmetric cipher makes use of 2 keys for the PURPOSE of encryption. As affine cipher is the only SYMMETRIC cipher out of the given options so it requires only one KEY.

11.

Which of the following cipher makes use of linear algebra for encrypting data?(a) polybius square cipher(b) affine cipher(c) caesar cipher(d) rail fence cipherThis question was posed to me in final exam.My question is taken from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

Correct answer is (b) AFFINE CIPHER

The best explanation: Affine cipher is the only cipher out of the GIVEN options that MAKE use of linear algebra for the purpose of encryption. It is a type of mono alphabetic cipher.

12.

Which of the following statement is not true regarding columnar transposition cipher?(a) it is a weak cipher(b) probability of error is high while deciphering(c) it cannot be combined with other ciphers(d) it is a traditional symmetric cipherThe question was posed to me in exam.My enquiry is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (c) it cannot be combined with other ciphers

Easiest explanation - Although columnar TRANSPOSITION cipher is a WEAK cipher in itself. But it can be combined with other substitution ciphers so as to improve its SECURITY. The probability of error remains high while decoding columnar cipher as it is a lengthy PROCESS.

13.

How many rows will the letters of the plain text occupy in the table, that is used for encryption in columnar transposition cipher when a given keyword is “SECRET” and plain text is “SANFOUNDRY”?(a) 1(b) 2(c) 3(d) 4I have been asked this question during an interview for a job.I need to ask this question from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right option is (b) 2

The explanation is: The NUMBER of columns in the table used for the purpose encryption in columnar transposition cipher will always be equal to the number of letters in the keyword.So when we will write the letters of the plain TEXT row wise then there will be 2 ROWS of plain text in this CASE. The table is shown below :-

S E C R E T

1 S A N F O U

2 N D R Y

14.

What will be the encrypted text corresponding to plain text “CLASSIFIED” using columnar transposition cipher with a keyword as “GAMES”?(a) LFDSIASECI(b) SECIAISDFL(c) CILFAISESD(d) LFSECIAISDThis question was posed to me during an interview for a job.Question is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

The correct answer is (d) LFSECIAISD

Easiest explanation - For encrypting USING columnar cipher we have to arrange the letters of the plain text in a table which has the same NUMBER of columns as the letters of the KEYWORD. Then the letters of the keyword are arranged in alphabetical order and we read along each column.

3 1 4 2 5

G A M E S

C L A S S

I F I E D

So the ciphered text will be “IFSECIAISD”.

15.

How many columns do we need to have in the table, that is used for encryption in columnar transposition cipher when a given keyword is “SECRET” and plain text is “SANFOUNDRY”?(a) 4(b) 5(c) 6(d) 7This question was addressed to me in an internship interview.Question is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

The correct answer is (c) 6

The explanation is: The NUMBER of columns in the table used for the PURPOSE encryption in columnar transposition cipher will always be equal to the number of letters in the keyword. So in this case it will be equal to 6.

16.

Columnar transposition cipher is harder to crack as compared to double transposition cipher?(a) true(b) falseI got this question during an online interview.This is a very interesting question from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

The correct CHOICE is (B) false

The BEST explanation: Double transposition cipher is formed by applying columnar transposition cipher twice. So it is harder to crack than a simple columnar transposition cipher.

17.

In which of the following cipher the plain text and the ciphered text does not have the same set of letters?(a) route cipher(b) columnar transposition cipher(c) myszkowski cipher(d) additive cipherThis question was posed to me by my school teacher while I was bunking the class.My question is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT OPTION is (d) additive cipher

To explain: In TRANSPOSITION cipher, the letters remain the same in ciphered and plain text. Their position is only changed whereas in SUBSTITUTION cipher the letters become different in encrypted text. As additive cipher is the only non transposition cipher out of the given OPTIONS so it will be the correct option.

18.

Which of the following cipher is formed by applying columnar transposition cipher twice?(a) Rail Fence cipher(b) Route cipher(c) Double transposition cipher(d) One time padI got this question in an interview for internship.My question comes from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

The correct option is (c) Double transposition CIPHER

Explanation: Double transposition cipher is formed by applying columnar transposition cipher twice. For the purpose of encryption, we may USE the same KEY twice or we can use two different KEYS.

19.

Which of the following ciphered text would have NOT used transposition cipher for encryption of the plain text “CIPHER”?(a) EPIHRC(b) EHIPCR(c) DTIPRC(d) HRIPECI got this question in a job interview.Query is from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Correct answer is (c) DTIPRC

The BEST explanation: We know that TRANSPOSITION CIPHER encrypts the plain text by shuffling the letters of the plain text. So out of the given options, only “DTIPRC” does not have the same set of letters as “CIPHER”.

20.

Columnar cipher falls under the category of?(a) mono-alphabetic cipher(b) poly-alphabetic cipher(c) transposition cipher(d) additive cipherI got this question during an online interview.Question is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (c) transposition CIPHER

The BEST I can EXPLAIN: COLUMNAR cipher is a transposition cipher. It falls under the CATEGORY of transposition cipher as it encrypts the plain text by rearranging its letters.

21.

Which of the following is an example of asymmetric encryption technique?(a) one-time pad(b) one-time password(c) DSA(d) blowfishThis question was addressed to me in examination.Origin of the question is Cryptography in section Cryptography of Data Structures & Algorithms II

Answer» RIGHT answer is (c) DSA

The best explanation: Asymmetric cipher makes use of 2 KEYS for the purpose of ENCRYPTION. DSA is an example of asymmetric encryption technique.
22.

Asymmetric encryption is also known as?(a) Private key cryptography(b) Public key cryptography(c) Public private key cryptography(d) Traditional cryptographyI had been asked this question in examination.The doubt is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (b) PUBLIC KEY cryptography

Explanation: Asymmetric encryption is ALSO known as public key cryptography. Asymmetric CIPHER makes use of 2 keys for the purpose of encryption.

23.

Which of the following cipher uses two keys to encrypt data?(a) substitution cipher(b) transposition cipher(c) symmetric cipher(d) asymmetric cipherThis question was addressed to me by my school principal while I was bunking the class.This intriguing question comes from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer» RIGHT CHOICE is (d) asymmetric cipher

Easiest explanation - Asymmetric cipher makes USE of 2 keys for the purpose of encryption. One is known as public KEY whereas other is CALLED private key.
24.

Which of the following is not a type of traditional cipher?(a) Substitution cipher(b) Transpositioncipher(c) Mono alphabetic cipher(d) PKCS cipherI had been asked this question during an interview.Enquiry is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer» RIGHT option is (d) PKCS CIPHER

The best I can explain: There are two types of the TRADITIONAL cipher. One is transposition cipher and the other is SUBSTITUTION cipher. Whereas PKCS is a modern ASYMMETRIC cipher.
25.

Who along with Samuel Morse developed Morse code?(a) Alfred Vail(b) Alan Turing(c) Jedidiah Morse(d) Lucretia Pickering WalkerThis question was addressed to me in class test.My question is taken from Morse Code in division Cryptography of Data Structures & Algorithms II

Answer»

Right ANSWER is (a) Alfred Vail

For EXPLANATION: Alfred Vail ALONG with Samuel Morse developed Morse code. While Jedidiah Morse, Lucretia Pickering Walker were his father and spouse RESPECTIVELY.

26.

Which device was used to generate high speed Morse Code?(a) Iambic Paddle(b) Note Paddle(c) Vibrolex(d) KSM RadioI have been asked this question in quiz.Enquiry is from Morse Code topic in portion Cryptography of Data Structures & Algorithms II

Answer» CORRECT option is (a) Iambic Paddle

Easy EXPLANATION - Iambic Paddle was used to generate high SPEED Morse Code in conjunction with an ELECTRONIC keyer. It was COMMERCIALLY manufactured.
27.

In which year the symbol @ was added to the official Morse character set by ITU-R?(a) 2003(b) 2004(c) 2005(d) 2006I had been asked this question in exam.My question is from Morse Code in chapter Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (b) 2004

The BEST I can explain: On May 24, 2004, the SYMBOL @ was added to the official Morse CHARACTER SET by International TELECOMMUNICATION Union.

28.

For which symbol there is no standard representation in Morse Code?(a) /(b) .(c) *(d) !I had been asked this question in exam.Query is from Morse Code topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right CHOICE is (d) !

Best explanation: There is no STANDARD representation for the exclamation mark (!) in Morse code. The other symbols have been DEFINED by the International Telecommunication UNION.

29.

Which symbol is not defined inside the ITU recommendation on Morse code?(a) Dollar symbol(b) .(c) +(d) ~I have been asked this question in an international level competition.The question is from Morse Code in chapter Cryptography of Data Structures & Algorithms II

Answer»

The RIGHT choice is (a) Dollar symbol

The explanation is: The symbol 'Dollar symbol' and & are not defined INSIDE the ITU RECOMMENDATION on Morse code. INTERNATIONAL Telecommunication Union is a union that mandated Morse code worldwide.

30.

The letters of a word are separated by a space of how many units?(a) 1 Unit(b) 2 Units(c) 3 Units(d) 4 UnitsI have been asked this question by my college professor while I was bunking the class.My doubt stems from Morse Code in chapter Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (C) 3 Units

Easiest EXPLANATION - The letters of a word are SEPARATED by a space of 3 UNIT. The representation of dot symbol has 1 unit, while the DASH symbol has 2 units.

31.

Space signal is of how many unit?(a) 1(b) 2(c) 3(d) 4The question was posed to me in a national level competition.I'm obligated to ask this question of Morse Code in division Cryptography of Data Structures & Algorithms II

Answer»

The correct OPTION is (a) 1

The explanation is: Since the duration of Space Signal is equal to DOT Duration. So, the space signal is of 1 UNIT. While a dash is 3 units and space between LETTERS is also three units.

32.

What is the name of special procedural signals that are used to indicate changes in communications protocol status?(a) Prosigns(b) Aldis(c) BIT(d) AsteriskThe question was posed to me in semester exam.The doubt is from Morse Code in division Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (b) Aldis

The best EXPLANATION: Prosigns are SPECIAL unwritten PROCEDURAL SIGNALS which are used to show changes in communications protocol STATUS or white space text.

33.

Which word offers a word rate that is typical of 5-letter code groups?(a) PARIS(b) CODEX(c) PARCOD(d) SPACEThis question was addressed to me in quiz.My question comes from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT option is (b) CODEX

The EXPLANATION is: CODEX word OFFERS a word RATE that is typical of 5-letter code groups. PARIS is a standard word to measure the operator transmission speed of Morse Code.

34.

What is meant by the single dot in Morse code?(a) A(b) C(c) B(d) EThis question was posed to me in a job interview.I would like to ask this question from Morse Code topic in division Cryptography of Data Structures & Algorithms II

Answer»

Right CHOICE is (d) E

Best explanation: The most COMMON LETTER in English, the letter “E”, has a single dot. Morse code was designed so that the length of each SYMBOL is inverse to FREQUENCY of occurrence in text.

35.

Who is the creator of Modern International Morse Code?(a) Samuel F. B. Morse(b) Karl Morse(c) Alexander Morse(d) Friedrich Clemens GerkeI got this question in examination.I'd like to ask this question from Morse Code in portion Cryptography of Data Structures & Algorithms II

Answer»

Right OPTION is (d) FRIEDRICH Clemens Gerke

The BEST explanation: It was created by Friedrich Clemens Gerke in 1848 and INITIALLY USED for telegraphy in Germany. Samuel Morse is the inventor of the telegraph after whom Morse code was named.

36.

Is Morse code speed measured in characters per minute (cpm)?(a) True(b) FalseThe question was posed to me in an international level competition.The doubt is from Morse Code in section Cryptography of Data Structures & Algorithms II

Answer»

The correct ANSWER is (a) True

Best explanation: Morse code speed is measured in characters per minute (cpm) as well as in WORDS per minute (wpm). The transmission rate of the Morse code is also measured is GROUPS per UNIT (gpm).

37.

Is Morse code speed measured in words per minute (wpm).(a) True(b) FalseThis question was posed to me in an online quiz.The above asked question is from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer» RIGHT choice is (a) True

To EXPLAIN: Morse CODE speed is measured in WORDS per minute (wpm). The transmission rate of the Morse code is ALSO measured is groups per unit (gpm).
38.

Which word tells a word rate of Morse code’s shorter code durations for common characters such as “e” and “t”.?(a) PARIS(b) CODEX(c) PARCOD(d) SPACEI had been asked this question in an online quiz.My question comes from Morse Code in section Cryptography of Data Structures & Algorithms II

Answer»

The correct answer is (a) PARIS

Best explanation: PARIS tells about word rate that is TYPICAL of natural language words and reflects the benefits of Morse code’s shorter code DURATIONS for common CHARACTERS such as “E” and “t”.

39.

Which letter of the English alphabet has the shortest code in Morse Code?(a) A(b) C(c) B(d) EI have been asked this question in an interview.My doubt stems from Morse Code topic in chapter Cryptography of Data Structures & Algorithms II

Answer» RIGHT OPTION is (d) E

Easiest EXPLANATION - Morse code was designed so that the length of each symbol is inverse to the frequency of OCCURRENCE in text. Thus the letter in English, “E”, has a single dot.
40.

When was Morse system for telegraphy first used?(a) 1843(b) 1844(c) 1845(d) 1846The question was posed to me during an internship interview.My doubt is from Morse Code topic in portion Cryptography of Data Structures & Algorithms II

Answer»

The correct answer is (b) 1844

Best EXPLANATION: Morse system for telegraphy was first USED in 1844 to MAKE indentations on a PAPER TAPE when electric currents were received.

41.

For which device was Morse code developed for?(a) Telegraphy(b) Stethoscope(c) Telephone(d) SONARI have been asked this question during an internship interview.The doubt is from Morse Code in section Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (a) Telegraphy

For EXPLANATION: A CODE was NEEDED to transmit natural language using only the pulses in a TELEGRAPH system. Morse developed the modern INTERNATIONAL Morse code.

42.

What is the Morse code for the distress signal is SOS?(a) 3 Dots, 3Dashes, and 3 Dots(b) 3 Dots, 3 Dashes, and 2 Dots(c) 3 Dots, 2 Dashes, and 3 Dots(d) 2 Dots, 3 Dashes, and 3 DotsThe question was posed to me in semester exam.The query is from Morse Code in division Cryptography of Data Structures & Algorithms II

Answer»

The correct option is (a) 3 Dots, 3DASHES, and 3 Dots

For EXPLANATION: In an EMERGENCY the DISTRESS signal is SOS– 3 dots, 3 dashes, and 3 dots – internationally recognized by treaty. It is used to call emergency help when someone is in need.

43.

What is meant by the single dash in Morse code?(a) A(b) T(c) Z(d) EThe question was asked in exam.My question is from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (b) T

Easiest explanation - The common letter in ENGLISH, the letter “T”, has the shortest dash CODE: a single dash. While the letter in English, “E”, has a single dot. It is considered to be the smallest Morse Code EVER DEFINED till now while other LETTERS are larger in time duration.

44.

Is the letter “E” represented by the single dot in Morse code?(a) True(b) FalseI have been asked this question in quiz.Query is from Morse Code topic in chapter Cryptography of Data Structures & Algorithms II

Answer» RIGHT CHOICE is (a) True

Explanation: The letter in English, “E”, has a single dot. It is CONSIDERED to be the smallest MORSE Code ever defined till now while other letters are LARGER in time duration.
45.

Is the letter “E” of English alphabet has the shortest code in Morse Code?(a) True(b) FalseThis question was addressed to me in an online quiz.This interesting question is from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT answer is (a) True

The best I can explain: Morse code was designed so that the length of each SYMBOL is inverse to the frequency of occurrence in TEXT. Therefore, the letter the letter “E”, has a SINGLE dot.

46.

The words are separated by a space of how many durations?(a) 5(b) 6(c) 7(d) 4I have been asked this question by my college director while I was bunking the class.My enquiry is from Morse Code topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (C) 7

For explanation: The WORDS are separated by a SPACE of 7 dot durations. Since the dot duration is of 1 Unit. So, the words are separated by a space of 7 Unit.

47.

The letters of a word are separated by a space of how many durations?(a) 1 Dot Duration(b) 2 Dot Duration(c) 3 Dot Duration(d) 4 Dot DurationI had been asked this question during an interview for a job.This interesting question is from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer»

The correct option is (c) 3 Dot DURATION

Easiest explanation - The letters of a WORD are separated by a space of 3 dot durations. SINCE the dot duration is of 1 Unit. So, the letters of a word are separated by a space of 3 Unit.

48.

What is the duration of Space Signal?(a) Equal to Dot Duration(b) More than Dot Duration(c) Equal to Dash Duration(d) More than Dash DurationThe question was asked in an interview for internship.My question is taken from Morse Code in chapter Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT ANSWER is (a) EQUAL to DOT Duration

For explanation: The duration of Space SIGNAL is 1 Unit and Dot Duration is also 1 Unit. So the duration of Space Signal is equal to Dot Duration.

49.

In Morse Code, each dot or dash within a character is followed by a period of signal absence. What is the name of that signal?(a) Slash(b) Space(c) Ampersand(d) AsteriskI had been asked this question during an online exam.The doubt is from Morse Code topic in portion Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT answer is (b) Space

For explanation: Each dot or dash within a character is FOLLOWED by a period of signal absence called Space Signal which is of 1 Unit. The space signal is used after every word in Morse Code.

50.

The dash duration is how many times the dot duration?(a) 1(b) 2(c) 3(d) 4The question was posed to me during an online exam.I'd like to ask this question from Morse Code topic in section Cryptography of Data Structures & Algorithms II

Answer»

Correct OPTION is (c) 3

The best I can explain: The duration of a dash is 3 times the duration of a dot as duration of dot is defined to be 1 UNIT in MORSE Code and duration of dash is 3 units in Morse Code.