Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Errors Kheler's straight addition will/wont catch (no doubling)

- WONT cant any transposition errors because it doesn't care about that. it only cares about the final number - WILL catch all single digit errors

What type of errors WOULD Luhn catch

- all single digit errors - transposition errors EXCEPT 0 and 9

Errors Kheler's doubling WON'T catch but Luhn's WOULD

- any single digit errors when its in a double position where the correct digit & the digit that gets typed instead are off by exactly 5

Things to remember for Hamming (7,4)

- corrects single-bit errors - for every 4 data bits you have to add 3 party bits (7 total) - costs space to do this - it is possible to run this system in an error-detection only mode -> it can identify all 1 and 2 bit errors BUT it cannot correct them

What errors can ISBM number catch - understand why

- every single digit error - every transposition error

Errors Kheler's tripling will/won't catch

- every single digit error EXCEPT no two numbers where the difference is a multiple of 10

Say I do a Huffman encoding of the following symbol set and frequencies, resulting in the tree below (you'll have to fill in the 0's and 1's). Symbol Frequency a 82 b 15 c 28 d 42 Type in the bit string that represents the word bad with this encoding.

001101

Consider the following invalid ISBN code: 0-15-508483-X The second-to-the-last digit (i.e., the 3) is wrong. What should it be? (Remember that the 'X' represents the number 10!) Enter a single digit or an X.`

1

Consider the following partial credit card number: - 4777 2032 6784 207? - What value should the check digit be? Enter a single digit.

1

Consider the following part of an ISBN code: - 0-631-20126-? - What should the check digit be? Enter a single digit or an X.

2

Suppose we represent the word decode using your tree (from previous). How many bits would be saved for this word, compared to a representation using a minimal fixed-length code for this alphabet? (That is, calculate the length of the representation for the word decode using a minimal fixed-length code minus the length of the representation for it using the Huffman code.) Type in your answer.

2

Consider the following Universal Product Code (UPC) number: - 0 67030 79549 4 - Let's say someone tells you that there is a single-digit error in this number, specifically on the third digit (7). What digit should this have been? Enter a single digit.

5

for a 20 bit binary code to pass a spectral level 2 how many occurrences should there be? a.)there should be 10 occurrences of 1's and o's b.) there should be 5 occurrences on each of the four combinations c.) equal amount of 1's and 0 s 10 and 10

5 occurrences on each four combinations

Hamming (7,4): what errors can/can't it catch

CAN: - every single bit error and correct them as well (expense of more space) CAN'T: - if there are two errors in a 7-bit sequence i.e.: 1000011 -----> 1100011 1110011 wrongly corrected ^

ISBM what method to use for what

Right --> Left: use to find the correct number when incorrect is given Left --> Right: use to find the check digit Any: is this number correct

with respect to the type of mapping between the plaintext alphabet and the ciphertext alphabet, which of the following types of cipher is a Caesar shift cipher conceptually most similar to? a.) caesar shift b.) MSC c.) MSC with homophones d.)Vigenere cipher e.) book cipher

Simple MSC both have a one to one mapping

know how to tell what a wrong huffman tree looks like

Things to keep in mind: 1. combine the two sets of characters with the smallest number on the list regardless of the tree (you may have to start a new tree) 2. biggest on the LEFT 3. Earliest in the alphabet goes first when the numbers are equal 4. In the branches 0 on the LEFT, 1 on the RIGHT

with respect to the type of mapping between the plaintext alphabet and the ciphertext alphabet, which of the following types of cipher is a MSC with keyword conceptually most similar to? a.) caesar shift b.) MSC c.) MSC with homophones d.)Vigenere cipher e.) book cipher

Vigenere cipher both have a many to many mapping

UPC: Errors it will/won't catch

WILL - all single digit errors WONT - transposition errors between digits that differ by exactly 5 errors aren't made too often in UPC because you are scanning

Checksum errors it will/wont catch

WILL - extra 1s - 0s switched to a 1 - 1 switched to a 0 WONT - if extra 0s are added - transposition error --> equal number of 1s turned to 0s and equal number of 0s turned to 1s - can't tell which bit is wrong (could be the checksum)

consider the following message: a man in a mill mails lillian all ill snails Do a frequency count of the characters (don't forget spaces!), and build a Huffman tree. Remember that when you combine two 'nodes', put the one with the higher frequency count to the left. And if they are tied, go in alphabetical order of the leftmost letter (or if there is only one letter, use that one, of course). I recommend that you double check your tree with respect to these rules after completing it. Prove that you built the right tree by decoding the following bit string written in the prefix-code that your Huffman tree should have derived. (If the result is gibberish, you did something wrong!) 000111001100000001011101010001000000 Type in your answer using all lower case letters and include spaces.

a small llama

Let's say that I defined a substitution cipher that contains the following mappings (among others for the rest of the alphabet, not listed here): Plaintext Symbol Ciphertext Symbol c i l s p x Which of the following types of ciphers could my encryption system not be an example of? a. Caesar shift cipher b. Simple monoalphabetic substitution cipher c. Monoalphabetic substitution cipher with a key phrase d. Nomenclator e. Huh? It could be any of these!

a. Caesar shift cipher

Suppose I use a monoalphetic substitution cipher (MSC) for which the plaintext alphabet is the set of English characters, and the ciphertext alphabet is a subset of the possible 2-digit numbers. After encrypting the following plaintext: yay steelers boo jaguars I get the following ciphertext: 12 95 12 41 39 76 53 22 76 15 41 29 65 53 11 95 44 27 95 15 41 Which of the following statements is true? a. My MSC must include at least one dowbleth b. My MSC must include at least one null c. My MSC must include at least one dowbleth and one null d. My MSC must have been augmented with a code (i.e., a Nomenclator) e. None of the first four answers is true; I could have used an ordinary MSC

a. My MSC must include at least one dowbleth

a simple recipe for multiplying a binary number by 8 would be: a.) add three zeros b.)add two zeros c.) remove two zeros

add three zeros

a simple recipe for multiplying a binary number by 4 would be: a.) add three zeros b.)add two zeros c.) remove two zeros

add two zeros to the end of the number

I've just encoded a message using a 100-symbol monoalphabetic substitution cipher with homophones, and, after removing spaces from the plaintext, ended up with the following ciphertext: 97 14 30 71 76 67 31 46 08 27 53 85 40 59 94 21 65 27 39 71 11 Which of the following messages could I have encoded? a. "This question is too hard" b. "This problem is very easy" c. "I do love this problem set" d. Any of the above e. None of the above

b. "This problem is very easy"

Which of the following does the least well according to the Spectral Level 2 test? a. 11001100110011001100 b. 01010101010101010101 c. 10011101010010110001 d. 11010101110101111001 e. 00101100111001110011

b. 01010101010101010101

6^(34351987) is an incredibly large number. Yet you don't need a supercomputer to figure out what 6^(34351987) (mod 5) is. In fact, you can do it in your head. What is the value of 6^(34351987) (mod 5)? ( Hint: What was one of the key facts about modular arithmetic that makes the Diffie-Hellman system work?) a. 0 b. 1 c. 2 d. 3 e. 4 f. 5

b. 1

Alice and Bob want to exchange a secret message, and so they use the Diffie-Hellman method (as described on page 265 of Singh) to agree on a key. They choose Y=5 and P=7, so that the function they both use is: 5X(mod 7) Furthermore, Alice picks 3 as her secret number (A), and Bob picks 4 as his secret number (B). What key will Alice and Bob agree on at the end of the process? a. 0 b. 1 c. 2 d. 3 e. 4 f. 5 g. 6

b. 1

Which of the following is a simple recipe for doubling (i.e., multipling by 2) a number in binary? a. Add a 1 to the front of the number. b. Add a 0 to the end of the number. c. Add two 1's to the front of the number. d. Add two 0's to the end of the number. e. Add 10 to the front of the number.

b. Add a 0 to the end of the number.

with respect to the type of mapping between the plaintext alphabet and the ciphertext alphabet, which of the following types of cipher is a MSC with homophones conceptually most similar to? a.) caesar shift b.) MSC c.) MSC with homophones d.)Vigenere cipher e.) book cipher

book cipher one -to -many

For this problem, let's suppose that instead of using a simple monoalphabetic substitution cipher, I decided to be more creative and use two such ciphers, in the following way. First, I encrypt the plaintext using the first cipher. Then, I encrypt the resulting ciphertext using the second cipher, yielding a second ciphertext. (I'm careful to make sure that the second cipher does not change any characters back to the original one in the plaintext.) Which of the following statements is true? a. The resulting cipher is generally going to be more secure than if I had used just one, since two decryptions must be performed to uncover the plaintext. b. The resulting cipher is generally going to be less secure than if I had used just one, since the result of the second encryption will actually be more vulnerable to frequency analysis than the first. c. The resulting cipher is generally going to be equally secure as if I had used just one, since for any two monoalphabetic substitution ciphers applied one after the other, there exists another, single monoalphabetic substitution cipher that achieves the same result.

c. The resulting cipher is generally going to be equally secure as if I had used just one, since for any two monoalphabetic substitution ciphers applied one after the other, there exists another, single monoalphabetic substitution cipher that achieves the same result.

Let's say we want to encrypt the message yay steelers boo patriots (first removing spaces, of course) using a 3-line rail fence cipher. Which of the following is the correct ciphertext? a. ysreoasiatslotyoeepbrt b. sryoeaisatlsoytoeeprbt c. yseroaisatlsotoyeebprt d. yaysoresialtstooeepbrt

c. yseroaisatlsotoyeebprt

Add the numbers 101111 and 11101 in binary, and then add 1101 to the result of that in binary. What is the answer in binary? a. 1011010 b. 1010111 c. 1011001 d. 1010101 e. 1110010

c. 1011001

Alice and Bob want to exchange a secret message, and so they use the Diffie-Hellman method (as described on page 265 of Singh) to agree on a key. They choose Y=5 and P=7, so that the function they both use is: 5X(mod 7) Furthermore, Alice picks 3 as her secret number (A), and Bob picks 4 as his secret number (B). What is the number β (beta) that Bob will send to Alice in Stage 3? a. 0 b. 1 c. 2 d. 3 e. 4 f. 5 g. 6

c. 2

Suppose the following text is a message encoded with a Vigenere cipher. Assuming that the keyword has more than two letters, how many letters does it probably have? (HINT: Look for occurrences of XYZ. NOTE: Do not try to actually decode the message!) DANCGYRZFJXYZSJARPADXWQTJXYZRNVDOPJXYZABSHCD a. 3 b. 4 c. 5 d. could be either 3 or 6 (can't tell) e. 7

c. 5

Consider the following variable-length code for the symbols n through u. Symbol Binary Code n 0110 o 11 p 100 q 010 r 000 s 01001 t 01111 u 01110 Which of the following changes will make this a prefix-free code? (Pick a if no changes are necessary.) a. None (It is already a prefix-free code). b. Change the code for n to 0111. c. Change the code for q to 001. d. Change the code for s to 01101. e. Change the code for u to 011110.

c. Change the code for q to 001.

Using the tree in previous question, which of the following words would receive a longer encoding than if we were to have used a minimal fixed-length encoding for the same alphabet? a. dad b. cad c. cab d. dab e. none of these would be longer

c. cab

Suppose you have a message that contains only the following seven letters, with the listed frequency counts: Symbol Frequency c 28 d 43 e 127 o 75 r 60 s 63 v 10 Build the Huffman tree for these characters. Remember that when you combine two 'nodes', put the one with the higher frequency count to the left. Prove that you got the right tree by decoding the following English word (if you get gibberish, you did something wrong!): 10101110000011010 Type in the word using only lower-case letters.

coders

With respect to the type of mapping between the plaintext alphabet and the ciphertext alphabet, which of the following types of cipher is a book cipher conceptually most similar to? a. Caesar Shift Cipher b. Monoalphabetic substitution cipher c. Monoalphabetic substitution cipher with a keyword d. Monoalphabetic substitution cipher with homophones e. Vigenere cipher

d. Monoalphabetic substitution cipher with homophones

Suppose I claimed that all of the following are the result of applying some type of transposition cipher to the message "yay steelers boo patriots" and then removing spaces. Without a lot of effort, you react by telling me that one of these could not possibly be a transposition ciphertext for this message. Which one? a. oebtprsyayrsoeailttsoe b. ratttssseeeoooilbpryay c. tseooetbprysaysroaeitl d. jezeeoxloiqpabyarytsts e. ssseteeooloirpbayraytt

d. jezeeoxloiqpabyarytsts

Which of the following does the least well according to the Spectral Level 1 test? a. 11001100110011001100 b. 01010101010101010101 c. 10011101010010110001 d. 11010101110101111001 e. 00101100111001110011

d. 11010101110101111001

The following is a message that I encrypted as a rail fence cipher. How many rows (i.e., horizontal lines) did I use? YLHZOVELUEPESDUOTZ a. 2 b. 3 c. 4 d. 5 e. 6

d. 5

When we described the checksum system for binary messages in class, we added the number of 1's in the ASCII representation of the message and tacked on the binary representation of the sum to the end. In our example, the checksum was encoded by 8 bits. For this problem, let's suppose that we are going to represent the checksum with only 6 bits instead. Of course, representing the sum of a long message might require more than 6 bits. As such, we won't tack on the total sum of all of the 1's, but instead the sum (mod N). What is the most sensible choice for N? a. 8 b. 16 c. 32 d. 64 e. 256

d. 64

The letter l in English has a frequency of about 4%. If we constructed a monoalphabetic substitution cipher with homophones with 200 symbols in the ciphertext alphabet, how many symbols should be used to represent the letter l? a. 1 b. 2 c. 4 d. 8 e. 16

d. 8

Let's say I encrypt a message using a monoalphabetic substitution cipher with a keyphrase, using the keyphrase patriots lose. The letter y in the plaintext will be encoded with what letter in the ciphertext? (Note: we assume that, after the keyphrase is used, the cipher-alphabet begins with the letter after the last letter used in the keyphrase.) a. z b. a c. b d. c e. d

d. c

Suppose we applied a transposition cipher to the following sequence of bits, which is the 7-bit ASCII encoding of my first name ( ANDY). Which of the following is the only sequence of bits that could possibly have been the result of this transposition? 1000001100111010001001011001 a.1011000100001100010010010001 b. 01010101010101001010100101001 c. 01000110101010010101100101 d. 0001100100100010110110010100 e. 0001000010100100011111001011

e. 0001000010100100011111001011

Which of the following ciphertexts could not possibly be the result of encoding a message with a random, one-time pad cipher? a. TIHRJGDSGS b. XXXXXXXXXX c. CDEFGHIJKL d. CIPHERDERP e. All of these could possibly be the result of encoding a message with a random, one-time pad cipher.

e. All of these could possibly be the result of encoding a message with a random, one-time pad cipher.

Suppose we have a Caesar shift cipher that shifts the English alphabet by N places, and a plaintext to apply it to. Which of the following is true? a. If N is even, applying the cipher 13 times -- each time to the output of the last time -- will always recover the plaintext again. b. If N is odd, applying the cipher repeatedly -- each time to the output of the last time -- will never recover the plaintext again. c. No matter what N is, applying the cipher 26 times -- each time to the output of the last time -- will always recover the plaintext again. d. Answers (a) and (b) are both true. e. Answers (a) and (c) are both true.

e. Answers (a) and (c) are both true.

Consider the following variable-length code for the symbols d through i. Symbol Binary Code d 10 e 01 f 110 g 0110 h 0010 i 0001 Which of the following changes will suffice to make this a prefix-free code? (Pick a if no changes are necessary.) a. None (It is already a prefix-free code). b. Change the code for d to 1. c. Change the code for e to 00. d. Change the code for f to 100. e. Change the code for g to 0000.

e. Change the code for g to 0000.

Let's say I typed out the following Visa card number: - 4888 6053 7432 0139 - Is this number valid, and if not, which of the following mistakes could have been made? a. This is a valid Visa card number. b. The 5th digit (6) should have been a 5. c. The 6th digit (0) should have been a 1. d. The 7th digit (5) should have been a 4. e. The 8th digit (3) should have been a 2.

e. The 8th digit (3) should have been a 2.

Alice and Bob want to exchange a secret message, and so they use the Diffie-Hellman method (as described on page 265 of Singh) to agree on a key. They choose Y=5 and P=7, so that the function they both use is: 5X(mod 7) Furthermore, Alice picks 3 as her secret number (A), and Bob picks 4 as his secret number (B). What is the number α (alpha) that Alice will send to Bob in Stage 3? a. 0 b. 1 c. 2 d. 3 e. 4 f. 5 g. 6

g. 6

What is the Vigenere encoding of my name (andykehler) with the keyword goofball?

gbrdleswkf

In order for a 20 bit binary code to pass the spectral level 1 test what pattern of number should it show on the four different possible combinations? a.) 5 all across the board? b.) 10 at least in two combinations? c.) have an equal amount of 1's and 0's

have an equal amount of symbols for example in a code with 20 binary numbers there should be 10 ones and 10 zeros

I completed a Vigenere encoding of my name (andykehler) with a keyword, which resulted in the ciphertext mrdrvshqqv. What was the keyword I used?

meatloaf

I've encoded my first name ( ANDY, in 7-bit ASCII as in Problem 1) using the simple binary substitution cipher discussed in class and on page 247 in Singh, using the 7-bit ASCII representation of a four-letter word as the key. The resulting ciphertext is: 0010011000111100011010010101 Type in the four letter word (using the English alphabet, i.e., not in binary) that I used for the key, in lowercase. Don't forget that the ASCII codes are listed on page 246 of Singh.

rail

what would be a simple recipe for dividing a number by two in binary? a.) add two zeros at the end of the number b.) remove one zero from the end of the number c.)add one zero at the end of the number.

remove one zero from the end of the number.

Recall that book ciphers do not necessarily require a full book to decode, but instead any written text, such as the Declaration of Independence. For the example discussed in class (the second Beale cipher), we created the key by numbering words and taking the first letter. But we can also number characters themselves instead, making sure to skip spaces. The following is a message encrypted with a book cipher, using the text of this question as a key. What is the hidden message? 37 25 41 46 13 41 24 56 26 18 28 9 27 21 75 2 34

youfoundtheanswer or you found the answer


Kaugnay na mga set ng pag-aaral

Programming Fundamentals 1: Exam 1 (Ch 1-3)

View Set