Prime Numbers in CS
- 22Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is one of the main reasons prime numbers are interesting in computer science, as stated in the text?
What is one of the main reasons prime numbers are interesting in computer science, as stated in the text?
22 questions
- 1
What is one of the main reasons prime numbers are interesting in computer science, as stated in the text?
- A
They are always very simple to identify instantly as prime numbers.
- B
Computers struggle to perform basic arithmetic operations with them.
- C
There is no known easy way to find their actual prime factors.
- D
They are primarily used for generating random numbers in systems.
Correct answer
CThere is no known easy way to find their actual prime factors.
Explanation
The text states that 'no one has found a shortcut to be able to find the actual prime factors,' making it relatively difficult for computers to do, which is why they are interesting for computer science.
- A
- 2
Which cryptographic algorithm is mentioned as being heavily based on prime numbers and widely used for internet connections?
- A
The Advanced Encryption Standard (AES) for symmetric encryption.
- B
The Diffie-Hellman Key Exchange algorithm for secure communication.
- C
The Caesar cipher, an older method based on simple substitutions.
- D
The RSA algorithm, crucial for secure communication over the internet.
Correct answer
DThe RSA algorithm, crucial for secure communication over the internet.
Explanation
The text explicitly states, 'another important application that uses prime numbers is RSA which stands for Rivest, Shamir, Adelman... it's heavily based on prime numbers. We see RSA everywhere, don't we? It's connecting to the internet we are almost always using RSA at some point.'
- A
- 3
What is the general class of cryptography that the RSA algorithm falls under?
- A
Symmetric-key cryptography, where the same key is shared by all.
- B
Stream cipher cryptography, encrypting data bit by bit sequentially.
- C
Public-key cryptography, using distinct keys for encryption and decryption.
- D
Hash-based cryptography, relying on one-way mathematical functions.
Correct answer
CPublic-key cryptography, using distinct keys for encryption and decryption.
Explanation
The text mentions, 'public key cryptography is the general class that RSA is in.'
- A
- 4
Which common internet protocol relies on public-key cryptography like RSA for secure connections?
- A
HTTP, the foundational protocol for data communication on the web.
- B
SMTP, utilized for sending and receiving electronic mail messages.
- C
FTP, used for transferring files between network clients and servers.
- D
HTTPS, ensuring secure communication over a computer network.
Correct answer
DHTTPS, ensuring secure communication over a computer network.
Explanation
The text states that 'one of the most important modern applications... crucial to the internet is the fact that HTTPS is built on top of this kind of technology.'
- A
- 5
Besides RSA, what is the other main competing algorithm mentioned for implementing public-key cryptography?
- A
The Diffie-Hellman Key Exchange for secure key negotiation.
- B
The Advanced Encryption Standard (AES) for data encryption.
- C
Elliptic Curve Cryptography, an alternative to RSA.
- D
The Digital Signature Algorithm (DSA) for digital signatures.
Correct answer
CElliptic Curve Cryptography, an alternative to RSA.
Explanation
The text notes, 'now there are two main flavors to implement it there's RSA... and there's elliptic curve cryptography... and those are basically the two competing algorithms.'
- A
- 6
What does the padlock icon in a web browser next to the address signify about the connection?
- A
The website is currently undergoing maintenance or updates.
- B
The connection to the website is fully encrypted and secure.
- C
The website requires a username and password for access.
- D
The browser has detected potential malware on the website.
Correct answer
BThe connection to the website is fully encrypted and secure.
Explanation
The text explains, 'what you can see is this little padlock in the top left next to the address which means that your connection is secure.'
- A
- 7
What information is revealed about the connection algorithm when viewing a website's certificate?
- A
The specific server hardware used to host the website.
- B
The geographic location of the website's data servers.
- C
The website's average daily traffic and user engagement.
- D
The algorithm used, key size, and a large modulus number.
Correct answer
DThe algorithm used, key size, and a large modulus number.
Explanation
When viewing the certificate information, the text shows 'the algorithm is RSA... key size being 2048 bits then it says exponent... and then there is this number which is the modulus.'
- A
- 8
The modulus number displayed in a website's certificate is the product of how many large prime numbers?
- A
Two very large prime numbers, each with hundreds of digits.
- B
Three distinct 200-digit prime numbers multiplied together.
- C
Four very small prime numbers, usually single-digit integers.
- D
A single prime number raised to a significant power itself.
Correct answer
ATwo very large prime numbers, each with hundreds of digits.
Explanation
The text states, 'it's a massive number and it's not a prime number actually but it is the product of two very very large prime numbers and two 300 digit prime numbers.'
- A
- 9
What reward is offered for successfully factoring a 600-digit modulus into its two 300-digit prime factors?
- A
A free online course and a digital certificate of completion.
- B
A fully funded PhD, guaranteed newspaper spot, and potential prize.
- C
A small cash prize and an honorary mention on a local forum.
- D
Exclusive access to advanced cryptographic research papers.
Correct answer
BA fully funded PhD, guaranteed newspaper spot, and potential prize.
Explanation
The speaker explicitly offers, 'if you can figure out what these two big 300 digit prime numbers are... I will offer you a fully funded PhD and a guaranteed spot in the newspapers and perhaps even a big prize here and there.'
- A
- 10
What mathematical concept forms the basis for how RSA's cryptographic protocol works?
- A
Modular arithmetic, similar to how an analog clock operates.
- B
Linear algebra, used for solving systems of linear equations.
- C
Calculus, involving rates of change and accumulation of quantities.
- D
Euclidean geometry, dealing with properties of shapes and space.
Correct answer
AModular arithmetic, similar to how an analog clock operates.
Explanation
The text introduces modular arithmetic by stating, 'in order to explain how it works we need to talk about a slightly different topic first it's called modular arithmetic.'
- A
- 11
How is modular arithmetic exemplified using an analog clock in the explanation?
- A
By identifying the precise speed at which the clock's hands move.
- B
By calculating the exact angle of the clock's hour and minute hands.
- C
By determining the remainder after division by 12 for hours.
- D
By converting clock time into a binary representation for analysis.
Correct answer
CBy determining the remainder after division by 12 for hours.
Explanation
The text explains, 'we do it every day if we're using an analog clock because a clock every 12 hours it goes back to its original position... it's the remainder after division by 12.'
- A
- 12
In the modular arithmetic example, if you take 18 to the fifth power on a 91-hour clock, what is the result?
- A
The number 0, indicating a complete cycle on the clock.
- B
The number 90, representing the maximum value on the clock.
- C
The number 18, which is the original number itself.
- D
The number 44, a specific value between 0 and 90.
Correct answer
DThe number 44, a specific value between 0 and 90.
Explanation
The text demonstrates, 'if i instruct you to take the number 18 raise it to the fifth power... the answer will be 44.'
- A
- 13
What is the result when 44 (the previous result) is raised to the 29th power on a 91-hour clock?
- A
The number 18, which is the original magic number.
- B
The number 91, representing the full cycle of the clock.
- C
The number 29, the second magic number used in the process.
- D
The number 1, signifying no change from the starting point.
Correct answer
AThe number 18, which is the original magic number.
Explanation
The text states, 'what i do is i take that number 44 and i raise it to the 29th power... and the number i end up with is 18.'
- A
- 14
The relationship between raising a number to the fifth power and then to the 29th power on a 91-hour clock is analogous to what mathematical concept?
- A
Addition and subtraction, where one operation undoes the other.
- B
Multiplication and division, used for scaling and distribution.
- C
Inverse operations, where one action reverses the effect of another.
- D
Exponentiation, involving repeated multiplication of a base number.
Correct answer
CInverse operations, where one action reverses the effect of another.
Explanation
The text clarifies, 'yes that's exactly right so 29 is a magical number that we found that will reverse you're doing the power to the s taking the number to the power five so whenever you take a number to the power of five if i take that result to the power 29 the result i end up with is the original.'
- A
- 15
How is the 72-hour clock, used to find the magic number 29, constructed?
- A
By adding the two prime numbers (7 and 13) and then squaring the sum.
- B
By multiplying the original two prime numbers (7 and 13) directly.
- C
By taking the average of the two prime numbers and multiplying by six.
- D
By subtracting one from each prime number (7 and 13) and then multiplying.
Correct answer
DBy subtracting one from each prime number (7 and 13) and then multiplying.
Explanation
The text explains, 'we're going to construct the different clock by taking the number before the prime number so 6 because it's 7 minus 1 and 12 because it's 13 minus 1. multiply them to get 72.'
- A
- 16
What is the chosen encryption value 'e' (number 5) based on in the example?
- A
It is derived by dividing 72 by the first prime factor, 7.
- B
It is a prime number that does not divide 72, chosen arbitrarily.
- C
It is the product of the two prime numbers minus one (7-1)*(13-1).
- D
It is a large prime number that must divide 72 without remainder.
Correct answer
BIt is a prime number that does not divide 72, chosen arbitrarily.
Explanation
The text states, 'then we're going to pick a prime number which does not divide 72... but 5 is allowed so let's say we pick the number 5 that is our encryption value e.'
- A
- 17
What mathematical relationship must exist between the encryption value 'e' (5) and the decryption value 'd' (29) on the 72-hour clock?
- A
Their product must be 1 on the 72-hour clock (e * d = 1 mod 72).
- B
Their quotient must result in a whole number (e / d = integer).
- C
Their difference must be a multiple of 72 (e - d = multiple of 72).
- D
Their sum must be a prime number (e + d = prime).
Correct answer
ATheir product must be 1 on the 72-hour clock (e * d = 1 mod 72).
Explanation
The text clarifies, 'what we want to do is we want to valid find a value d such that e in our case 5 times d is equal to 1 on our 72-hour clock.'
- A
- 18
Which algorithm is used by a computer to quickly find the decryption value 'd'?
- A
The Extended Euclidean Algorithm for modular inverse.
- B
The Quadratic Sieve for integer factorization.
- C
The Advanced Encryption Standard (AES) for key derivation.
- D
The Sieve of Eratosthenes for finding prime numbers.
Correct answer
AThe Extended Euclidean Algorithm for modular inverse.
Explanation
The text mentions, 'finding that by computer is very easy it uses an algorithm called the extended euclidean algorithm.'
- A
- 19
What property does 'e * d - 1' have with respect to the numbers '6' (7-1) and '12' (13-1)?
- A
It is always a prime number, regardless of 'e' and 'd'.
- B
It is always one greater than the product of the two primes.
- C
It is equal to the sum of the original prime numbers, 7 and 13.
- D
It is a multiple of both 6 and 12, the subtracted primes.
Correct answer
DIt is a multiple of both 6 and 12, the subtracted primes.
Explanation
The text states, 'so 5 times 29 minus 1 is a multiple of 72 but that also means it's a multiple of this number six... and it's a multiple of 12.'
- A
- 20
What theorem, named after a famous mathematician, is applied to deduce that 'm^(e * d - 1)' simplifies to one on the clock?
- A
Pythagorean Theorem, relating sides of a right triangle.
- B
Fermat's Little Theorem, useful in number theory and cryptography.
- C
The Fundamental Theorem of Calculus, linking differentiation and integration.
- D
Euler's Totient Theorem, generalized from Fermat's Little Theorem.
Correct answer
BFermat's Little Theorem, useful in number theory and cryptography.
Explanation
The text explains, 'because it is a multiple of both of those numbers for each of them individually we can apply a theorem known as fermat's little theorem.'
- A
- 21
Why is the RSA protocol considered secure against unauthorized decryption?
- A
Because finding the product of two large primes is computationally hard.
- B
Because the '72-hour clock' construction is difficult to discover.
- C
Because the public key 'e' is kept completely secret from everyone.
- D
Because only those who know the original prime factors can find 'd'.
Correct answer
DBecause only those who know the original prime factors can find 'd'.
Explanation
The text states, 'you cannot find number 72 simply because you don't know the prime factors of 91... it's secure because only people that have the numbers p and q will be able to deduce the secret magic numbers and nobody else can know the magic numbers.'
- A
- 22
What information about the RSA algorithm is publicly visible when inspecting a website's certificate?
- A
The product 'p * q' (modulus) and the public encryption key 'e'.
- B
The private decryption key 'd', hidden in the certificate code.
- C
The original two prime numbers 'p' and 'q' used for generation.
- D
The '72-hour clock' value and the Extended Euclidean Algorithm output.
Correct answer
AThe product 'p * q' (modulus) and the public encryption key 'e'.
Explanation
The text explains, 'you will see two of the three magic numbers which is the product p times q... You will see the number e... but you will not see the other magic value which in our example was the number 29.'
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.