1. Home
  2. Explore
  3. Mathematics
  4. Number Theory and Cryptography

Study methods

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

Number Theory and Cryptography

  • 114Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Divisibility and Congruences
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What does it mean for an integer aaa to divide an integer bbb?

Tap to flipClick to flipspace

aaa divides bbb if b=acb=acb=ac for some integer ccc. Then aaa is a divisor of bbb, and bbb is a multiple of aaa.

Or swipe the card

114 cards

  1. What does it mean for an integer aaa to divide an integer bbb?

    aaa divides bbb if b=acb=acb=ac for some integer ccc. Then aaa is a divisor of bbb, and bbb is a multiple of aaa.

  2. If aaa divides both bbb and ccc, what can be concluded about b+cb+cb+c and mb+ncmb+ncmb+nc?

    aaa divides b+cb+cb+c and every linear combination mb+ncmb+ncmb+nc for integers m,nm,nm,n.

  3. What are three basic divisibility rules for integers?

    If a∣ba\mid ba∣b and a∣ca\mid ca∣c, then a∣(b+c)a\mid(b+c)a∣(b+c); if a∣ba\mid ba∣b, then a∣bca\mid bca∣bc for any integer ccc; and if a∣ba\mid ba∣b and b∣cb\mid cb∣c, then a∣ca\mid ca∣c.

  4. State the division algorithm for an integer aaa and a positive integer ddd.

    There are unique integers q,rq,rq,r such that a=dq+ra=dq+ra=dq+r and 0≤r<d0\le r<d0≤r<d.

  5. In the division algorithm, what do aaa, ddd, qqq, and rrr represent?

    aaa is the dividend, ddd the positive divisor, qqq the quotient, and rrr the remainder. They can be written q=adiv⁡dq=a\operatorname{ div}dq=adivd and r=amod⁡dr=a\operatorname{ mod}dr=amodd.

  6. What are the quotient and remainder when 101101101 is divided by 111111?

    101=11⋅9+2101=11\cdot9+2101=11⋅9+2, so the quotient is 999 and the remainder is 222.

  7. What are the quotient and remainder when −11-11−11 is divided by 333 under the division algorithm?

    −11=3(−4)+1-11=3(-4)+1−11=3(−4)+1, so the quotient is −4-4−4 and the remainder is 111.

  8. When are integers aaa and bbb congruent modulo a positive integer mmm?

    a≡b(modm)a\equiv b\pmod ma≡b(modm) exactly when m∣(a−b)m\mid(a-b)m∣(a−b).

  9. How can congruence modulo mmm be interpreted using remainders?

    a≡b(modm)a\equiv b\pmod ma≡b(modm) exactly when aaa and bbb have the same remainder upon division by mmm.

  10. Test whether 17≡5(mod6)17\equiv5\pmod617≡5(mod6) and whether 24≡14(mod6)24\equiv14\pmod624≡14(mod6).

    17≡5(mod6)17\equiv5\pmod617≡5(mod6) because 17−5=1217-5=1217−5=12 is divisible by 666. But 24≢14(mod6)24\not\equiv14\pmod624≡14(mod6) because 24−14=1024-14=1024−14=10 is not divisible by 666.

  11. What does the equivalence a≡b(modm)a\equiv b\pmod ma≡b(modm) if and only if a=b+kma=b+kma=b+km express?

    Two integers are congruent modulo mmm exactly when they differ by kkk whole steps of size mmm, for some integer kkk.

  12. How are the relation a≡b(modm)a\equiv b\pmod ma≡b(modm) and the remainder function amod⁡ma\operatorname{ mod}mamodm connected?

    a≡b(modm)a\equiv b\pmod ma≡b(modm) if and only if amod⁡m=bmod⁡ma\operatorname{ mod}m=b\operatorname{ mod}mamodm=bmodm.

  13. Which operations preserve congruences?

    Congruences can be added and multiplied: if a≡b(modm)a\equiv b\pmod ma≡b(modm) and c≡d(modm)c\equiv d\pmod mc≡d(modm), then a+c≡b+d(modm)a+c\equiv b+d\pmod ma+c≡b+d(modm) and ac≡bd(modm)ac\equiv bd\pmod mac≡bd(modm).

  14. Why is division not always valid in a congruence?

    Dividing both sides can destroy the congruence. For example, 14≡8(mod6)14\equiv8\pmod614≡8(mod6), but dividing by 222 gives 7≢4(mod6)7\not\equiv4\pmod67≡4(mod6).

  15. How can modular addition and multiplication keep calculations with large numbers manageable?

    Reduce each input modulo mmm, perform the operation on the smaller remainders, then reduce the result modulo mmm.

  16. What is Zm\mathbb Z_mZm​, and what does arithmetic modulo mmm do?

    Zm={0,1,…,m−1}\mathbb Z_m=\{0,1,\ldots,m-1\}Zm​={0,1,…,m−1}. Modular addition or multiplication performs the usual operation and then reduces the result modulo mmm.

  17. Which familiar arithmetic properties hold in Zm\mathbb Z_mZm​?

    Addition and multiplication are closed, associative, and commutative; 000 and 111 are their respective identities; every element has an additive inverse; and multiplication distributes over addition.

  18. Does every element of Zm\mathbb Z_mZm​ have a multiplicative inverse?

    No. For example, 222 has no multiplicative inverse modulo 666, since no multiple of 222 modulo 666 equals 111.

  19. What is a base-bbb expansion of a positive integer?

    It is a unique expression n=akbk+ak−1bk−1+⋯+a0n=a_kb^k+a_{k-1}b^{k-1}+\cdots+a_0n=ak​bk+ak−1​bk−1+⋯+a0​, where each digit satisfies 0≤ai<b0\le a_i<b0≤ai​<b and the leading digit aka_kak​ is nonzero.

  20. How does place value work in base ten?

    Each position is a power of 101010. For example, 965=9⋅102+6⋅10+5965=9\cdot10^2+6\cdot10+5965=9⋅102+6⋅10+5.

  21. What are the digits used in binary, octal, and hexadecimal?

    Binary (base 222) uses 0,10,10,1; octal (base 888) uses 000 through 777; hexadecimal (base 161616) uses 000 through 999 and AAA through FFF, where A=10A=10A=10 through F=15F=15F=15.

  22. How do you convert a binary numeral to decimal?

    Sum the powers of 222 corresponding to positions containing a 111. For example, (11011)2=16+8+2+1=27(11011)_2=16+8+2+1=27(11011)2​=16+8+2+1=27.

  23. How do you convert an octal or hexadecimal numeral to decimal?

    Multiply each digit by its place value and add. For example, (7016)8=7⋅83+1⋅8+6=3598(7016)_8=7\cdot8^3+1\cdot8+6=3598(7016)8​=7⋅83+1⋅8+6=3598, and (E5)16=14⋅16+5=229(E5)_{16}=14\cdot16+5=229(E5)16​=14⋅16+5=229.

  24. What are the base-conversion steps for converting a positive integer nnn to base bbb?

    Repeatedly divide by bbb, recording each remainder. Continue with each quotient until it is zero; read the remainders in reverse order.

  25. How can binary be converted to octal or hexadecimal without arithmetic?

    Group bits from the right into groups of 333 for octal or 444 for hexadecimal, padding the left with zeros if needed, then convert each group to one digit.

  26. What is the basic binary-addition procedure at each bit position?

    Add the two bits and the incoming carry. The sum bit is the remainder modulo 222; the outgoing carry is the floor of the total divided by 222.

  27. What is the running time of binary addition of two nnn-bit integers?

    O(n)O(n)O(n) bit operations.

  28. How does the shifted-partial-products algorithm multiply binary integers?

    For each 111 bit of one factor at position jjj, include the other factor shifted left by jjj places, equivalent to multiplying it by 2j2^j2j. Add all partial products.

  29. What is the bit-operation cost of multiplying two nnn-bit integers by shifted partial products?

    O(n2)O(n^2)O(n2) bit additions.

  30. How does repeated squaring compute bnb^nbn efficiently?

    Write nnn in binary, successively square bbb to obtain b,b2,b4,b8,…b,b^2,b^4,b^8,\ldotsb,b2,b4,b8,…, then multiply only the powers whose corresponding exponent bits are 111.

  31. How does repeated squaring compute bn(modm)b^n\pmod mbn(modm) while controlling the size of intermediate values?

    Initialize the answer to 111 and the current power to b mod mb\bmod mbmodm. Process exponent bits: multiply the answer by the current power modulo mmm for each 111 bit, and square the current power modulo mmm at every step.

  32. What is the stated bit-operation cost of modular exponentiation by repeated squaring?

    O((log⁡m)2log⁡n)O((\log m)^2\log n)O((logm)2logn) bit operations for computing bn(modm)b^n\pmod mbn(modm).

  33. What defines a prime, a composite number, and the special case 111?

    A prime is an integer greater than 111 whose only positive divisors are 111 and itself. A composite integer greater than 111 is not prime. The number 111 is neither prime nor composite.

  34. What does the Fundamental Theorem of Arithmetic say?

    Every integer greater than 111 has a prime factorization, unique apart from the order of its prime factors.

  35. Give prime factorizations of 100100100, 999999999, and 102410241024.

    100=22⋅52100=2^2\cdot5^2100=22⋅52; 999=33⋅37999=3^3\cdot37999=33⋅37; 1024=2101024=2^{10}1024=210.

  36. How does the Sieve of Eratosthenes find primes up to a bound?

    List integers from 222 to the bound. Keep the next uncrossed number and cross out its larger multiples; repeat until the needed prime divisors have been tested. The uncrossed numbers are prime.

  37. Why is it enough to test prime divisors up to n\sqrt nn​ when checking whether nnn is composite?

    If n=abn=abn=ab is composite, its two factors cannot both exceed n\sqrt nn​, so at least one factor—and therefore a prime divisor—is at most n\sqrt nn​.

  38. What is trial division, and why does it become impractical for very large integers?

    Test whether any integer from 222 through n\sqrt nn​ divides nnn; if none does, nnn is prime. The number of tests grows too large for integers with many digits.

  39. What is Euclid's proof that there are infinitely many primes?

    Assume the primes are a finite list and form qqq as their product plus 111. No listed prime divides qqq, because each would then divide 111. Yet qqq is prime or has a prime factor, giving a prime missing from the list—a contradiction.

  40. What is a Mersenne prime, and does a prime exponent guarantee one?

    A Mersenne prime has the form 2p−12^p-12p−1 and is prime. A prime exponent ppp does not guarantee primality: 211−1=2047=23⋅892^{11}-1=2047=23\cdot89211−1=2047=23⋅89 is composite.

  41. What does the prime number theorem say about the number and frequency of primes?

    The number of primes up to xxx is approximately xln⁡x\frac{x}{\ln x}lnxx​, with a better relative estimate as xxx grows. The chance that a random integer near nnn is prime is about 1ln⁡n\frac1{\ln n}lnn1​.

  42. Can a nonconstant polynomial with integer coefficients produce only primes for all integer inputs?

    No. No nonconstant polynomial with integer coefficients always produces primes.

  43. What is Goldbach's conjecture?

    Every even integer greater than 222 is the sum of two primes; for example, 10=3+710=3+710=3+7. It remains unproved.

  44. What are the twin-prime conjecture and the conjecture about numbers of the form n2+1n^2+1n2+1?

    The twin-prime conjecture says infinitely many prime pairs differ by 222. Another unproved conjecture says infinitely many numbers n2+1n^2+1n2+1 are prime.

  45. Why is finding large primes important in cryptography?

    Large primes are used to construct cryptographic keys, while factoring large composite numbers is computationally difficult.

  46. What is the greatest common divisor of two integers?

    The greatest common divisor, gcd⁡(a,b)\gcd(a,b)gcd(a,b), is the largest positive integer dividing both aaa and bbb.

  47. When are two integers relatively prime?

    They are relatively prime when their greatest common divisor is 111.

  48. What does it mean for a list of integers to be pairwise relatively prime?

    Every pair of distinct members has greatest common divisor 111.

  49. How can prime factorizations be used to find a greatest common divisor?

    For each prime appearing in either factorization, take the smaller exponent; multiply the resulting prime powers.

  50. Why is prime factorization a poor general method for finding the gcd of large integers?

    The exponent rule is simple, but finding the prime factorizations of large integers is difficult and no fast general method is known.

  51. How is the least common multiple defined, and how can it be found from prime factorizations?

    The least common multiple, lcm⁡(a,b)\operatorname{lcm}(a,b)lcm(a,b), is the smallest positive common multiple. From prime factorizations, use the larger exponent for each prime.

  52. What relationship connects the product, gcd, and lcm of two positive integers?

    ab=gcd⁡(a,b)lcm⁡(a,b)ab=\gcd(a,b)\operatorname{lcm}(a,b)ab=gcd(a,b)lcm(a,b).

  53. State the key reduction rule behind the Euclidean algorithm.

    If a=bq+ra=bq+ra=bq+r, then gcd⁡(a,b)=gcd⁡(b,r)\gcd(a,b)=\gcd(b,r)gcd(a,b)=gcd(b,r).

  54. Use the Euclidean algorithm to find gcd⁡(287,91)\gcd(287,91)gcd(287,91).

    287=3⋅91+14287=3\cdot91+14287=3⋅91+14, 91=6⋅14+791=6\cdot14+791=6⋅14+7, and 14=2⋅7+014=2\cdot7+014=2⋅7+0, so gcd⁡(287,91)=7\gcd(287,91)=7gcd(287,91)=7.

  55. How does the Euclidean algorithm update its values?

    Start with x=a,y=bx=a,y=bx=a,y=b. While y≠0y\ne0y=0, set r=xmod⁡yr=x\operatorname{ mod}yr=xmody, then replace (x,y)(x,y)(x,y) by (y,r)(y,r)(y,r). Return xxx when y=0y=0y=0.

  56. Why does the Euclidean algorithm terminate, and which remainder gives the gcd?

    Each remainder is a nonnegative integer smaller than the previous divisor, so the sequence must reach zero. The gcd is the last nonzero remainder.

  57. What is Bezout's identity?

    For positive integers a,ba,ba,b, there exist integers s,ts,ts,t such that gcd⁡(a,b)=sa+tb\gcd(a,b)=sa+tbgcd(a,b)=sa+tb. The integers s,ts,ts,t are Bezout coefficients.

  58. How can the Euclidean algorithm produce Bezout coefficients?

    Record the divisions in a forward pass, then substitute each remainder backward until the gcd is expressed using the original two numbers.

  59. State the divisibility lemma that follows from Bezout's identity.

    If gcd⁡(a,b)=1\gcd(a,b)=1gcd(a,b)=1 and a∣bca\mid bca∣bc, then a∣ca\mid ca∣c.

  60. What does the prime-divisor lemma say about a prime dividing a product?

    If a prime ppp divides a1a2⋯ana_1a_2\cdots a_na1​a2​⋯an​, then ppp divides at least one factor.

  61. How does the prime-divisor lemma establish uniqueness of prime factorization?

    If two prime factorizations of the same integer differed, a prime on one side would divide the product on the other side and therefore equal one of its prime factors. Canceling common primes then contradicts the assumption that the factorizations differed.

  62. When is cancellation valid in a congruence ac≡bc(modm)ac\equiv bc\pmod mac≡bc(modm)?

    If gcd⁡(c,m)=1\gcd(c,m)=1gcd(c,m)=1, then ac≡bc(modm)ac\equiv bc\pmod mac≡bc(modm) implies a≡b(modm)a\equiv b\pmod ma≡b(modm).

  63. What is a linear congruence, and how are its solutions organized?

    A linear congruence has form ax≡b(modm)ax\equiv b\pmod max≡b(modm). If xxx is a solution, then so is x+kmx+kmx+km for any integer kkk; solutions occur in congruence classes.

  64. What do the examples 2x≡3(mod6)2x\equiv3\pmod62x≡3(mod6) and 2x≡2(mod6)2x\equiv2\pmod62x≡2(mod6) illustrate?

    2x≡3(mod6)2x\equiv3\pmod62x≡3(mod6) has no solution because 2x2x2x is always even. The congruence 2x≡2(mod6)2x\equiv2\pmod62x≡2(mod6) has two solution classes: x≡1x\equiv1x≡1 and x≡4(mod6)x\equiv4\pmod6x≡4(mod6).

  65. What is a multiplicative inverse of aaa modulo mmm?

    An inverse of aaa modulo mmm is a number aˉ\bar aaˉ satisfying aˉa≡1(modm)\bar a a\equiv1\pmod maˉa≡1(modm).

  66. When does aaa have a unique multiplicative inverse modulo mmm?

    If m>1m>1m>1 and gcd⁡(a,m)=1\gcd(a,m)=1gcd(a,m)=1, then an inverse exists and is unique modulo mmm.

  67. How does Bezout's identity prove that an inverse exists when gcd⁡(a,m)=1\gcd(a,m)=1gcd(a,m)=1?

    Bezout gives integers s,ts,ts,t with sa+tm=1sa+tm=1sa+tm=1. Reducing modulo mmm yields sa≡1(modm)sa\equiv1\pmod msa≡1(modm), so sss is an inverse of aaa.

  68. How can the Euclidean algorithm find the inverse of 333 modulo 777?

    7=2⋅3+17=2\cdot3+17=2⋅3+1, so 1=7−2⋅31=7-2\cdot31=7−2⋅3. Thus −2-2−2 is an inverse of 333 modulo 777; its representative in {0,…,6}\{0,\ldots,6\}{0,…,6} is 555.

  69. How do you solve 3x≡4(mod7)3x\equiv4\pmod73x≡4(mod7) using an inverse?

    Multiply by the inverse −2≡5(mod7)-2\equiv5\pmod7−2≡5(mod7): x≡−8≡6(mod7)x\equiv-8\equiv6\pmod7x≡−8≡6(mod7).

  70. What is the Chinese Remainder Theorem?

    If moduli m1,…,mnm_1,\ldots,m_nm1​,…,mn​ are pairwise relatively prime, then any system x≡ai(modmi)x\equiv a_i\pmod{m_i}x≡ai​(modmi​) has a unique solution modulo M=m1m2⋯mnM=m_1m_2\cdots m_nM=m1​m2​⋯mn​.

  71. How does the constructive proof of the Chinese Remainder Theorem build a solution?

    Set M=∏imiM=\prod_i m_iM=∏i​mi​, Mk=M/mkM_k=M/m_kMk​=M/mk​, and choose yky_kyk​ with Mkyk≡1(modmk)M_ky_k\equiv1\pmod{m_k}Mk​yk​≡1(modmk​). Then x=∑kakMkykx=\sum_k a_kM_ky_kx=∑k​ak​Mk​yk​ solves the system.

  72. Solve Sun-Tsu's system x≡2(mod3)x\equiv2\pmod3x≡2(mod3), x≡3(mod5)x\equiv3\pmod5x≡3(mod5), x≡2(mod7)x\equiv2\pmod7x≡2(mod7).

    x≡23(mod105)x\equiv23\pmod{105}x≡23(mod105).

  73. How does back substitution solve a system of congruences?

    Rewrite the first congruence as an equation with an integer parameter, substitute into the next congruence, solve for the new parameter, and repeat. Convert the final equation back into a congruence.

  74. State Fermat's little theorem in its two forms.

    If ppp is prime and p∤ap\nmid ap∤a, then ap−1≡1(modp)a^{p-1}\equiv1\pmod pap−1≡1(modp). For every integer aaa, ap≡a(modp)a^p\equiv a\pmod pap≡a(modp).

  75. How does Fermat's little theorem simplify a large exponent modulo a prime?

    Reduce the exponent using ap−1≡1(modp)a^{p-1}\equiv1\pmod pap−1≡1(modp), leaving only the exponent's remainder modulo p−1p-1p−1 when p∤ap\nmid ap∤a.

  76. What is a pseudoprime to base bbb?

    A composite integer nnn is a pseudoprime to base bbb if bn−1≡1(modn)b^{n-1}\equiv1\pmod nbn−1≡1(modn).

  77. What can a Fermat primality test conclude when its congruence fails or passes?

    If the test fails, nnn is certainly composite. If it passes, nnn may be prime or a pseudoprime, so the test is inconclusive.

  78. What is a primitive root modulo a prime ppp?

    A primitive root rrr has powers that visit every nonzero residue modulo ppp exactly once before repeating.

  79. What is a discrete logarithm modulo a prime?

    If rrr is a primitive root modulo ppp, the discrete logarithm of aaa to base rrr is the exponent eee such that re≡a(modp)r^e\equiv a\pmod pre≡a(modp).

  80. Why is the discrete logarithm problem useful in cryptography?

    Computing a modular power forward is efficient, while recovering its exponent for large parameters is believed to be difficult.

  81. What is a hashing function, and what does h(k)=kmod⁡mh(k)=k\operatorname{ mod}mh(k)=kmodm accomplish?

    A hash function maps a record's key to a storage location. The function h(k)=kmod⁡mh(k)=k\operatorname{ mod}mh(k)=kmodm maps keys into locations 000 through m−1m-1m−1.

  82. What is a collision in hashing, and why are collisions unavoidable?

    A collision occurs when distinct keys map to the same location. Collisions are unavoidable when there are more possible keys than storage locations.

  83. How does linear probing handle a hashing collision?

    Try (h(k)+i)mod⁡m(h(k)+i)\operatorname{ mod}m(h(k)+i)modm for i=0,1,2,…i=0,1,2,\ldotsi=0,1,2,… until a free slot is found.

  84. What is a pseudorandom number generator, and how does the linear congruential method work?

    It produces deterministic numbers that appear random. The linear congruential rule is xn+1=(axn+c)mod⁡mx_{n+1}=(ax_n+c)\operatorname{ mod}mxn+1​=(axn​+c)modm, using a modulus, multiplier, increment, and seed.

  85. What is the period of a pseudorandom sequence, and why must it eventually repeat?

    The period is the number of terms before the sequence repeats. With only mmm possible residues, some value must recur; because the next value depends only on the current one, the sequence then cycles.

  86. What is a pure multiplicative generator, and what problem occurs with a zero seed?

    It is a linear congruential generator with c=0c=0c=0. A zero seed remains zero forever because each next value is a multiple of the current value modulo mmm.

  87. How do check digits detect errors using modular arithmetic?

    An extra digit is chosen so a specified weighted sum of the digits is congruent to 000 modulo a chosen number. A typing error often changes the sum and makes the check fail.

  88. What is the UPC check-digit rule?

    For a twelve-digit UPC, multiply digits in odd positions by 333, leave digits in even positions unchanged, and require the total to be 000 modulo 101010.

  89. What does a failed UPC weighted-sum check establish?

    If the weighted sum of all twelve digits is not congruent to 0(mod10)0\pmod{10}0(mod10), the code fails validation.

  90. What is the ISBN-10 check-digit rule?

    Multiply the ten digits by their positions 111 through 101010 and require the weighted sum to be 000 modulo 111111; equivalently, the check digit is the first nine digits' weighted sum modulo 111111.

  91. Why can the ISBN-10 check detect every single-digit error and every transposition error?

    Its position-weighted sum is computed modulo the prime 111111. A single-digit change or a swap of two unequal digits changes the weighted sum by a nonzero amount modulo 111111.

  92. What is cryptography, and how do encryption and decryption differ?

    Cryptography studies methods for secret messages. Encryption transforms plaintext into ciphertext; decryption recovers the plaintext.

  93. How does the Caesar cipher encode letters and encrypt them?

    Represent AAA through ZZZ by 000 through 252525, then encrypt ppp as (p+3)mod⁡26(p+3)\operatorname{ mod}26(p+3)mod26.

  94. How is a Caesar-cipher message decrypted?

    Shift each ciphertext letter back by 333, using p↦(p−3)mod⁡26p\mapsto(p-3)\operatorname{ mod}26p↦(p−3)mod26.

  95. What is a shift cipher and why is it weak?

    A shift cipher uses a key kkk, encrypting by (p+k)mod⁡26(p+k)\operatorname{ mod}26(p+k)mod26 and decrypting by (c−k)mod⁡26(c-k)\operatorname{ mod}26(c−k)mod26. It has only 262626 possible keys.

  96. What defines an affine cipher, and when is it decryptable?

    An affine cipher encrypts ppp as (ap+b)mod⁡26(ap+b)\operatorname{ mod}26(ap+b)mod26. It is decryptable exactly when gcd⁡(a,26)=1\gcd(a,26)=1gcd(a,26)=1.

  97. How do you decrypt an affine cipher c≡ap+b(mod26)c\equiv ap+b\pmod{26}c≡ap+b(mod26)?

    If aˉ\bar aaˉ is the inverse of aaa modulo 262626, then p≡aˉ(c−b)(mod26)p\equiv\bar a(c-b)\pmod{26}p≡aˉ(c−b)(mod26).

  98. How can letter-frequency analysis break a shift cipher?

    Count ciphertext letters, guess that the most frequent represents English EEE, infer the shift, and decrypt. If the result is not English, try another frequent-letter guess.

  99. What is a monoalphabetic cipher, and what weakness do such ciphers share?

    It consistently replaces each plaintext letter with one ciphertext letter. Because the same letter always maps to the same one, letter-frequency patterns remain available to an attacker.

  100. How does a transposition cipher encrypt a message?

    Split the message into blocks and rearrange positions within each block using a permutation; pad a short final block if needed. Decrypt using the inverse permutation.

  101. Does transposition alone hide single-letter frequencies?

    No. It only rearranges letters, so every single-letter frequency is preserved exactly.

  102. What five components define a cryptosystem?

    A cryptosystem consists of the plaintext set PPP, ciphertext set CCC, keyspace KKK, encryption functions EEE, and decryption functions DDD.

  103. How does the shift cipher fit the general cryptosystem definition?

    Plaintext and ciphertext are strings over Z26\mathbb Z_{26}Z26​; the keyspace is Z26\mathbb Z_{26}Z26​; encryption adds the key modulo 262626, and decryption subtracts it.

  104. What distinguishes private-key cryptography from public-key cryptography?

    Private-key systems require communicating parties to share a secret key. Public-key systems publish the encryption key while keeping a separate decryption key secret.

  105. What numbers make up an RSA public key, and how are they chosen?

    The public key is (n,e)(n,e)(n,e), where n=pqn=pqn=pq for distinct large primes p,qp,qp,q, and eee is relatively prime to (p−1)(q−1)(p-1)(q-1)(p−1)(q−1).

  106. Why is RSA designed around multiplying primes but hiding their factors?

    Multiplying large primes is easy, while factoring their product into the primes is believed to be difficult.

  107. How is a text message prepared and encrypted with RSA?

    Encode each letter as a two-digit number, join the numbers, split into blocks smaller than nnn, and encrypt each block by c≡Me(modn)c\equiv M^e\pmod nc≡Me(modn).

  108. How is an RSA message decrypted?

    Find ddd such that ed≡1(mod(p−1)(q−1))ed\equiv1\pmod{(p-1)(q-1)}ed≡1(mod(p−1)(q−1)), then recover each block with M≡cd(modn)M\equiv c^d\pmod nM≡cd(modn).

  109. Why can an RSA sender encrypt using a public key while only the receiver can decrypt?

    Computing the private exponent ddd requires (p−1)(q−1)(p-1)(q-1)(p−1)(q−1), which requires knowing ppp and qqq; recovering them from n=pqn=pqn=pq requires factoring nnn.

  110. What is a cryptographic protocol, and what is the goal of Diffie–Hellman key exchange?

    A protocol is a set of messages exchanged to achieve a goal. Diffie–Hellman lets two parties establish a shared secret key over a channel an eavesdropper can observe.

  111. What are the steps of Diffie–Hellman key exchange?

    Publicly agree on a prime ppp and primitive root aaa. Alice sends ak1(modp)a^{k_1}\pmod pak1​(modp) and Bob sends ak2(modp)a^{k_2}\pmod pak2​(modp); each raises the received value to their own secret exponent.

  112. Why is a Diffie–Hellman eavesdropper unable to compute the shared key from the public messages?

    The eavesdropper sees ak1a^{k_1}ak1​ and ak2a^{k_2}ak2​ but would need to recover a secret exponent, which is a discrete logarithm problem.

  113. What does a digital signature establish, and how does the RSA signing idea work?

    A digital signature provides evidence of authorship, not secrecy. The sender applies the private RSA transform to the message blocks; anyone can apply the public transform to recover and verify them.

  114. What weakness does raw RSA signing have, and how do real systems address it?

    With raw RSA, an attacker can choose a number sss and define the corresponding message as se(modn)s^e\pmod nse(modn), producing a pair that passes the check. Real systems sign a hash of the message instead.

Card 1 of 114
Card 1 of 114

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent