Deck 8: Cryptanalysis: Advanced Dictionaries and Lists, Regular Expressions
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/32
العب
ملء الشاشة (f)
Deck 8: Cryptanalysis: Advanced Dictionaries and Lists, Regular Expressions
1
One of the most secure algorithms for encryption today is called:
A) brute force.
B) RSA.
C) the Turing cipher.
D) the rail fence cipher.
A) brute force.
B) RSA.
C) the Turing cipher.
D) the rail fence cipher.
B
2
Manually trying every possible combination of letters to decode a message is called:
A) breaking.
B) cryptomania.
C) brute force.
D) encryption.
A) breaking.
B) cryptomania.
C) brute force.
D) encryption.
C
3
The rail-fence cipher with a rail size of ___ breaks the plaintext into strings consisting of characters with odd and even numbered indexes.
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
B
4
Case Study 1:
1. def railBreak(cipherText):
2. wordDict = createWordDict('wordlist.txt')
3. cipherLen = len(cipherText)
4. maxGoodSoFar = 0
5. bestGuess = "No words found in dictionary"
6. for i in range(2, cipherLen + 1):
7. words = railDecrypt(cipherText, i)
8. goodCount = 0
9. for w in words:
10. if w in wordDict:
11. goodCount = goodCount + 1
12. if goodCount > maxGoodSoFar:
13. maxGoodSoFar = goodCount
14. bestGuess = " ".join(words)
15. return bestGuess
-Refer to the session in the accompanying Case Study 1. What pattern is used on lines 12-14?
A) Minmax
B) Rail break
C) Cryptology
D) Brute force
1. def railBreak(cipherText):
2. wordDict = createWordDict('wordlist.txt')
3. cipherLen = len(cipherText)
4. maxGoodSoFar = 0
5. bestGuess = "No words found in dictionary"
6. for i in range(2, cipherLen + 1):
7. words = railDecrypt(cipherText, i)
8. goodCount = 0
9. for w in words:
10. if w in wordDict:
11. goodCount = goodCount + 1
12. if goodCount > maxGoodSoFar:
13. maxGoodSoFar = goodCount
14. bestGuess = " ".join(words)
15. return bestGuess
-Refer to the session in the accompanying Case Study 1. What pattern is used on lines 12-14?
A) Minmax
B) Rail break
C) Cryptology
D) Brute force
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
5
Case Study 1:
1. def railBreak(cipherText):
2. wordDict = createWordDict('wordlist.txt')
3. cipherLen = len(cipherText)
4. maxGoodSoFar = 0
5. bestGuess = "No words found in dictionary"
6. for i in range(2, cipherLen + 1):
7. words = railDecrypt(cipherText, i)
8. goodCount = 0
9. for w in words:
10. if w in wordDict:
11. goodCount = goodCount + 1
12. if goodCount > maxGoodSoFar:
13. maxGoodSoFar = goodCount
14. bestGuess = " ".join(words)
15. return bestGuess
-Refer to the session in the accompanying case study. What is the function of
" ")join(words) on line 14?
A) It glues together all of the strings in the list words separating them using the space character.
B) It creates a dictionary of all the words in the list words.
C) It separates each word in the list words into a range.
D) It sets all of the values in words to a single space.
1. def railBreak(cipherText):
2. wordDict = createWordDict('wordlist.txt')
3. cipherLen = len(cipherText)
4. maxGoodSoFar = 0
5. bestGuess = "No words found in dictionary"
6. for i in range(2, cipherLen + 1):
7. words = railDecrypt(cipherText, i)
8. goodCount = 0
9. for w in words:
10. if w in wordDict:
11. goodCount = goodCount + 1
12. if goodCount > maxGoodSoFar:
13. maxGoodSoFar = goodCount
14. bestGuess = " ".join(words)
15. return bestGuess
-Refer to the session in the accompanying case study. What is the function of
" ")join(words) on line 14?
A) It glues together all of the strings in the list words separating them using the space character.
B) It creates a dictionary of all the words in the list words.
C) It separates each word in the list words into a range.
D) It sets all of the values in words to a single space.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
6
____ order takes the first row of the table and stores all the values on that row one after the other, followed by the second row and the third, and so on.
A) Column major
B) Row major
C) Encrypted
D) Rail post
A) Column major
B) Row major
C) Encrypted
D) Rail post
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
7
What of the following is one of the most frequently occurring letters in the English language?
A) B
B) E
C) U
D) S
A) B
B) E
C) U
D) S
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
8
What method sorts a list of values from largest to smallest?
A) reverse
B) reversesort
C) sort(reverse = True)
D) sort('descending')
A) reverse
B) reversesort
C) sort(reverse = True)
D) sort('descending')
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is the value of myList after the following statement?
MyList = myList.sort().
A) None
B) The original list, sorted in ascending order
C) The original list, sorted in descending order
D) An empty list
MyList = myList.sort().
A) None
B) The original list, sorted in ascending order
C) The original list, sorted in descending order
D) An empty list
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
10
Case Study 2:
1. def maybeAdd(ch, toList):
2. if ch in 'abcdefghijklmnopqrstuvwxyz'
and ch not in toList:
3. toList.append (ch)
-Refer to the session in the accompanying Case Study 2. What is the value of myList after the following code is executed?
>>> myList = []
>>> maybeAdd('a', myList)
A) []
B) ['a']
C) ['abcdefghijklmnopqrstuvwxyz']
D) None
1. def maybeAdd(ch, toList):
2. if ch in 'abcdefghijklmnopqrstuvwxyz'
and ch not in toList:
3. toList.append (ch)
-Refer to the session in the accompanying Case Study 2. What is the value of myList after the following code is executed?
>>> myList = []
>>> maybeAdd('a', myList)
A) []
B) ['a']
C) ['abcdefghijklmnopqrstuvwxyz']
D) None
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
11
Case Study 2:
1. def maybeAdd(ch, toList):
2. if ch in 'abcdefghijklmnopqrstuvwxyz'
and ch not in toList:
3. toList.append (ch)
-Refer to the session in the accompanying Case Study 2. What is the value of myList after the following code is executed?
>>> myList
['a', 'b']
>>> maybeAdd('a', myList)
A) ['a', 'a', 'b']
B) ['a', 'b']
C) ['abcdefghijklmnopqrstuvwxyz']
D) None
1. def maybeAdd(ch, toList):
2. if ch in 'abcdefghijklmnopqrstuvwxyz'
and ch not in toList:
3. toList.append (ch)
-Refer to the session in the accompanying Case Study 2. What is the value of myList after the following code is executed?
>>> myList
['a', 'b']
>>> maybeAdd('a', myList)
A) ['a', 'a', 'b']
B) ['a', 'b']
C) ['abcdefghijklmnopqrstuvwxyz']
D) None
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
12
What three-letter word appears most often in War of the Worlds?
A) The
B) And
C) Was
D) Had
A) The
B) And
C) Was
D) Had
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
13
In Python, regular expressions are available through the ____ module.
A) pattern
B) wildcard
C) regex
D) re
A) pattern
B) wildcard
C) regex
D) re
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
14
In a regular expression, a part of the expression surrounded by () is called a(n):
A) capture group.
B) cluster.
C) object.
D) wildcard.
A) capture group.
B) cluster.
C) object.
D) wildcard.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
15
Some of the first computer scientists were deeply involved in cryptanalysis.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
16
When decrypting using the rail fence cipher, one can easily see how many rails were used and encrypt the message by simply examining the encoded message.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
17
If we want to store a two-dimensional table in a computer's memory, we need to map from the row, column coordinates, which correspond to a cell in the table, to a location in memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
18
One effective way to ignore non-letter characters is to add them to the string before we start counting.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
19
Using the setDefault pattern is efficient for adding values to a dictionary.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
20
Match each definition with its term.
-Allows us to match strings using patterns.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
-Allows us to match strings using patterns.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
21
Match each definition with its term.
-Refers to the field of code breaking.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
-Refers to the field of code breaking.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
22
Match each definition with its term.
-Allow us to determine what characters in a target word match letters in different
Parts of a given pattern.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
-Allow us to determine what characters in a target word match letters in different
Parts of a given pattern.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match each definition with its term.
-Refers to trying all possible solutions.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
-Refers to trying all possible solutions.
A) Regular expression
B) Cryptanalysis
C) Capture group
D) Brute force
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
24
Describe the use of brute force to decrypt encrypted messages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
25
How can a dictionary be used to improve upon a brute force approach to decrypting a rail fence cipher?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
26
What are the benefits of using a dictionary over a list when looking up values?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
27
Describe the use of the join method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is the difference between row major order and column major order?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
29
Briefly describe how to crack a substitution cipher.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
30
Describe the two keyword parameters to the sort method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
31
Explain how to identify the difference between vowels and consonants in the English language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
32
Describe the function of regular expressions and explain how to use them in Python.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck