1. Home
  2. Explore
  3. Computer Science
  4. Prime Numbers in CS

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Prime Numbers in CS

  • 22Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Prime Numbers in CS

What is one of the main reasons prime numbers are interesting in computer science, as stated in the text?

22 questions

  1. 1

    What is one of the main reasons prime numbers are interesting in computer science, as stated in the text?

    1. A

      They are always very simple to identify instantly as prime numbers.

    2. B

      Computers struggle to perform basic arithmetic operations with them.

    3. C

      There is no known easy way to find their actual prime factors.

    4. D

      They are primarily used for generating random numbers in systems.

    Correct answer
    C

    There 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.

  2. 2

    Which cryptographic algorithm is mentioned as being heavily based on prime numbers and widely used for internet connections?

    1. A

      The Advanced Encryption Standard (AES) for symmetric encryption.

    2. B

      The Diffie-Hellman Key Exchange algorithm for secure communication.

    3. C

      The Caesar cipher, an older method based on simple substitutions.

    4. D

      The RSA algorithm, crucial for secure communication over the internet.

    Correct answer
    D

    The 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.'

  3. 3

    What is the general class of cryptography that the RSA algorithm falls under?

    1. A

      Symmetric-key cryptography, where the same key is shared by all.

    2. B

      Stream cipher cryptography, encrypting data bit by bit sequentially.

    3. C

      Public-key cryptography, using distinct keys for encryption and decryption.

    4. D

      Hash-based cryptography, relying on one-way mathematical functions.

    Correct answer
    C

    Public-key cryptography, using distinct keys for encryption and decryption.

    Explanation

    The text mentions, 'public key cryptography is the general class that RSA is in.'

  4. 4

    Which common internet protocol relies on public-key cryptography like RSA for secure connections?

    1. A

      HTTP, the foundational protocol for data communication on the web.

    2. B

      SMTP, utilized for sending and receiving electronic mail messages.

    3. C

      FTP, used for transferring files between network clients and servers.

    4. D

      HTTPS, ensuring secure communication over a computer network.

    Correct answer
    D

    HTTPS, 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.'

  5. 5

    Besides RSA, what is the other main competing algorithm mentioned for implementing public-key cryptography?

    1. A

      The Diffie-Hellman Key Exchange for secure key negotiation.

    2. B

      The Advanced Encryption Standard (AES) for data encryption.

    3. C

      Elliptic Curve Cryptography, an alternative to RSA.

    4. D

      The Digital Signature Algorithm (DSA) for digital signatures.

    Correct answer
    C

    Elliptic 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.'

  6. 6

    What does the padlock icon in a web browser next to the address signify about the connection?

    1. A

      The website is currently undergoing maintenance or updates.

    2. B

      The connection to the website is fully encrypted and secure.

    3. C

      The website requires a username and password for access.

    4. D

      The browser has detected potential malware on the website.

    Correct answer
    B

    The 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.'

  7. 7

    What information is revealed about the connection algorithm when viewing a website's certificate?

    1. A

      The specific server hardware used to host the website.

    2. B

      The geographic location of the website's data servers.

    3. C

      The website's average daily traffic and user engagement.

    4. D

      The algorithm used, key size, and a large modulus number.

    Correct answer
    D

    The 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.'

  8. 8

    The modulus number displayed in a website's certificate is the product of how many large prime numbers?

    1. A

      Two very large prime numbers, each with hundreds of digits.

    2. B

      Three distinct 200-digit prime numbers multiplied together.

    3. C

      Four very small prime numbers, usually single-digit integers.

    4. D

      A single prime number raised to a significant power itself.

    Correct answer
    A

    Two 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.'

  9. 9

    What reward is offered for successfully factoring a 600-digit modulus into its two 300-digit prime factors?

    1. A

      A free online course and a digital certificate of completion.

    2. B

      A fully funded PhD, guaranteed newspaper spot, and potential prize.

    3. C

      A small cash prize and an honorary mention on a local forum.

    4. D

      Exclusive access to advanced cryptographic research papers.

    Correct answer
    B

    A 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.'

  10. 10

    What mathematical concept forms the basis for how RSA's cryptographic protocol works?

    1. A

      Modular arithmetic, similar to how an analog clock operates.

    2. B

      Linear algebra, used for solving systems of linear equations.

    3. C

      Calculus, involving rates of change and accumulation of quantities.

    4. D

      Euclidean geometry, dealing with properties of shapes and space.

    Correct answer
    A

    Modular 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.'

  11. 11

    How is modular arithmetic exemplified using an analog clock in the explanation?

    1. A

      By identifying the precise speed at which the clock's hands move.

    2. B

      By calculating the exact angle of the clock's hour and minute hands.

    3. C

      By determining the remainder after division by 12 for hours.

    4. D

      By converting clock time into a binary representation for analysis.

    Correct answer
    C

    By 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.'

  12. 12

    In the modular arithmetic example, if you take 18 to the fifth power on a 91-hour clock, what is the result?

    1. A

      The number 0, indicating a complete cycle on the clock.

    2. B

      The number 90, representing the maximum value on the clock.

    3. C

      The number 18, which is the original number itself.

    4. D

      The number 44, a specific value between 0 and 90.

    Correct answer
    D

    The 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.'

  13. 13

    What is the result when 44 (the previous result) is raised to the 29th power on a 91-hour clock?

    1. A

      The number 18, which is the original magic number.

    2. B

      The number 91, representing the full cycle of the clock.

    3. C

      The number 29, the second magic number used in the process.

    4. D

      The number 1, signifying no change from the starting point.

    Correct answer
    A

    The 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.'

  14. 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?

    1. A

      Addition and subtraction, where one operation undoes the other.

    2. B

      Multiplication and division, used for scaling and distribution.

    3. C

      Inverse operations, where one action reverses the effect of another.

    4. D

      Exponentiation, involving repeated multiplication of a base number.

    Correct answer
    C

    Inverse 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.'

  15. 15

    How is the 72-hour clock, used to find the magic number 29, constructed?

    1. A

      By adding the two prime numbers (7 and 13) and then squaring the sum.

    2. B

      By multiplying the original two prime numbers (7 and 13) directly.

    3. C

      By taking the average of the two prime numbers and multiplying by six.

    4. D

      By subtracting one from each prime number (7 and 13) and then multiplying.

    Correct answer
    D

    By 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.'

  16. 16

    What is the chosen encryption value 'e' (number 5) based on in the example?

    1. A

      It is derived by dividing 72 by the first prime factor, 7.

    2. B

      It is a prime number that does not divide 72, chosen arbitrarily.

    3. C

      It is the product of the two prime numbers minus one (7-1)*(13-1).

    4. D

      It is a large prime number that must divide 72 without remainder.

    Correct answer
    B

    It 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.'

  17. 17

    What mathematical relationship must exist between the encryption value 'e' (5) and the decryption value 'd' (29) on the 72-hour clock?

    1. A

      Their product must be 1 on the 72-hour clock (e * d = 1 mod 72).

    2. B

      Their quotient must result in a whole number (e / d = integer).

    3. C

      Their difference must be a multiple of 72 (e - d = multiple of 72).

    4. D

      Their sum must be a prime number (e + d = prime).

    Correct answer
    A

    Their 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.'

  18. 18

    Which algorithm is used by a computer to quickly find the decryption value 'd'?

    1. A

      The Extended Euclidean Algorithm for modular inverse.

    2. B

      The Quadratic Sieve for integer factorization.

    3. C

      The Advanced Encryption Standard (AES) for key derivation.

    4. D

      The Sieve of Eratosthenes for finding prime numbers.

    Correct answer
    A

    The 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.'

  19. 19

    What property does 'e * d - 1' have with respect to the numbers '6' (7-1) and '12' (13-1)?

    1. A

      It is always a prime number, regardless of 'e' and 'd'.

    2. B

      It is always one greater than the product of the two primes.

    3. C

      It is equal to the sum of the original prime numbers, 7 and 13.

    4. D

      It is a multiple of both 6 and 12, the subtracted primes.

    Correct answer
    D

    It 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.'

  20. 20

    What theorem, named after a famous mathematician, is applied to deduce that 'm^(e * d - 1)' simplifies to one on the clock?

    1. A

      Pythagorean Theorem, relating sides of a right triangle.

    2. B

      Fermat's Little Theorem, useful in number theory and cryptography.

    3. C

      The Fundamental Theorem of Calculus, linking differentiation and integration.

    4. D

      Euler's Totient Theorem, generalized from Fermat's Little Theorem.

    Correct answer
    B

    Fermat'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.'

  21. 21

    Why is the RSA protocol considered secure against unauthorized decryption?

    1. A

      Because finding the product of two large primes is computationally hard.

    2. B

      Because the '72-hour clock' construction is difficult to discover.

    3. C

      Because the public key 'e' is kept completely secret from everyone.

    4. D

      Because only those who know the original prime factors can find 'd'.

    Correct answer
    D

    Because 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.'

  22. 22

    What information about the RSA algorithm is publicly visible when inspecting a website's certificate?

    1. A

      The product 'p * q' (modulus) and the public encryption key 'e'.

    2. B

      The private decryption key 'd', hidden in the certificate code.

    3. C

      The original two prime numbers 'p' and 'q' used for generation.

    4. D

      The '72-hour clock' value and the Extended Euclidean Algorithm output.

    Correct answer
    A

    The 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.'

Question 1 of 22
Question 1 of 22

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent