Question

You have found two plaintext-ciphertext pairs which you know are from an affine cipher based on...

  1. You have found two plaintext-ciphertext pairs which you know are from an affine cipher based on the English alphabet. The pairs are (1,7) and (0,2).

a. Find the equation of the cipher.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution for the problem is provided below please comment if any doubts:

a.

Procedure:

  • The affine cypher is of the form (ax+b) mod 26, where a and b are two numbers.
  • “a” is relatively prime to 26 and b can be any number.
  • “x” is the input or plain character.
  • The cipher character y=(ax+b) mod 26.
  • Here we have two plain cipher pairs.(1, 7) and (0, 2)
  • Substitute to get two equations:
    • 7 = (1*a + b) mod 26
    • 2 = (0*a + b )mod 26
  • Now from second equation,
    • 2=b mod 26
    • Thus b=2 (The smallest positive value)
  • Substitute the value of “b” in first equation
    • 7 = (a+2)mod 26
    • 7 = a mod 26 + 2 mod 26
    • 7 – 2 = a mod 26
    • 5 = a mod 26
    • a = 5
    • since 5 is relatively prime to 26, a= 5.
  • Now the equation is: (5x+2) mod 26

Thus the required solution is: (5x+2) mod 26

Add a comment
Know the answer?
Add Answer to:
You have found two plaintext-ciphertext pairs which you know are from an affine cipher based on...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Substitution Cipher Ke 1. Decipher the following ciphertext using the substitution cipher key shown above: (4 points) Ciphertext: DOVMYWOJAYJMYWZBAOXOADY!U I Plaintext: The following information was...

    Substitution Cipher Ke 1. Decipher the following ciphertext using the substitution cipher key shown above: (4 points) Ciphertext: DOVMYWOJAYJMYWZBAOXOADY!U I Plaintext: The following information was extracted from The BLACK Chamber's Pigpen Cipher page. The content is available at https:/simonsingh net The_Black Chamber'pigpen html. "The Pigpen Cipher was used by Freemasons in the l8th Century to keep their records private. The cipher does not substitute one letter for another; rather it substitutes each letter for a symbol The aiphabet is written...

  • 1. Encrypt the message howareyou using the affine cipher using the key (7,3). (a) What is...

    1. Encrypt the message howareyou using the affine cipher using the key (7,3). (a) What is the resulting ciphertext? (b) What is the decryption function you can use to decipher each ciphertext character? (c) Use your decryption function to decrypt the message to confirm you get the ciphertext back. 2. Use the ADFGX cipher using the grid below and the keyword "place" to encrypt the plaintext "brandenburggate". FREE GX (a) (b) What is the resulting ciphertext? How does the ADFGC...

  • do the following in python idle 3.5 or higher know nothing on this subject Eile Edit...

    do the following in python idle 3.5 or higher know nothing on this subject Eile Edit Yew Hbtory Bookmarks bols Help Microsoft Word-Situatio x S Female coaches: Why are. x a SakaieURI:csc 110 spri.. x O lab7-crypto-s17-labr-cry. x Writer The owing Code. x https sakai. 7-Cryptog rithms -10 28 /lab7-cryp 67k e a Search A Most visited e Getting started To decode an Affine cipher, we need to reverse the process. This is not a simple as reversing a Caesar...

  • Using the website Repl.it Write a Java program that can perform the Caesar cipher for English...

    Using the website Repl.it Write a Java program that can perform the Caesar cipher for English messages that include both upper and lowercase alphabetic characters. The Caesar cipher replaces each plaintext letter with a different one, by a fixed number of places down the alphabet. The program should be able to shift a specific number of places based on the user's input number. For example Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG. Ciphertext: QEBNRFZH YOLTK CLU GRJMP...

  • Write a Python program which implements the following two classical cryptosystem which we covered n class:...

    Write a Python program which implements the following two classical cryptosystem which we covered n class: a) Affine Cipher b) Vigenere Cipher Your program should consist of at least five functions: a) Two functions named encrypt, one for each of the two algorithms which accepts a lowercase alphabetical plaintext string and key as input and outputs a corresponding cipher text string. b) Two functions named decrypt, one for each of the two algorithms which accepts a lowercase alphabetical ciphertext string...

  • a. b. c. What does the ciphertext ONL decode to with the modular inverse matrix from Question b? d. We use an encoded...

    a. b. c. What does the ciphertext ONL decode to with the modular inverse matrix from Question b? d. We use an encoded text using a Caesar cipher. The ciphertext was intercepted which is: THUBYLDH. What is the word? How did you work this out? Encode the uppercase letters of the English alphabet as A-0, B-1, C-2 and so on. Encrypt the word BUG with the block cipher matrix 16 4 11] 10 3 2 using modulo arithmetic with modulus...

  • Python code. NO importing modules. you may not use: contains(), index(), sum(),join(), split(). def column_cipher(plaintext): •...

    Python code. NO importing modules. you may not use: contains(), index(), sum(),join(), split(). def column_cipher(plaintext): • Parameter(s): plaintext ----- a string; the message to be encrypted • Return value: A string; the ciphertext after applying the column cipher algorithm • Assumptions: o The standard English alphabet is used: "abcdefghijklmnopqrstuvwxyz" o All strings will be non-empty, entirely lowercase, and only contain valid letters in the alphabet. • How it works: o First, transpose the text into 5 different columns by writing...

  • Write a javascript program which implements the following two classical cryptosystem which we covered in class:...

    Write a javascript program which implements the following two classical cryptosystem which we covered in class: Affine Cipher Vigenere Cipher Your program should consist of at least five functions: Two functions named encrypt, one for each of the two algorithms which accepts a lowercase alphabetical plaintext string and key as input and outputs a corresponding cipher text string. Two functions named decrypt, one for each of the two algorithms which accepts a lowercase alphabetical ciphertext string and a key as...

  • Part 3: Transposition Ciphers #can't use ord or chr functions You must implement three transposition ciphers...

    Part 3: Transposition Ciphers #can't use ord or chr functions You must implement three transposition ciphers (the "backwards" cipher, the Rail Fence cipher, and the Column Transposition cipher) where the ciphertext is created via an altered presentation of the plaintext. The algorithm for each is detailed in the function descriptions in this section. (13 points) def backwards_cipher(plaintext, key): • Parameter(s): plaintext ----- a string; the message to be encrypted key ----- an integer; the number to control this cipher •...

  • LANGUAGE: PYTHON Write a function called: d_polybius(). The function applies the decryption scheme for the polybius...

    LANGUAGE: PYTHON Write a function called: d_polybius(). The function applies the decryption scheme for the polybius cipher scheme above. The start of the function call the get_polybius_square function to get the square as a string. The second scenario when the number of characters is not even, excluding ‘\n’. For instance: “71\n5” is an invalid cipher because there is no way that the last number correspond to a character (we need two numbers). A customized version of Polybius square will be...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT