Number Theory for Cryptography
- 44Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is modular arithmetic primarily concerned with?
Computing the remainder obtained when an integer is divided by a positive modulus.
Or swipe the card
44 cards
What is modular arithmetic primarily concerned with?
Computing the remainder obtained when an integer is divided by a positive modulus.
How is amodN defined for a positive modulus N?
amodN=r, where a=qN+r and 0≤r≤N−1.
What is the result of 5mod4?
1.
What is the result of −11mod3 under the standard remainder convention?
1.
What range must the remainder have when computing amodN?
The remainder must satisfy 0≤r≤N−1.
How can modular arithmetic be visualized using a clock with N marks?
The clock represents the possible remainders 0,1,…,N−1; counting from 0 identifies the remainder of a positive number modulo N.
How should a negative integer be represented on the modular clock?
Count in the anticlockwise direction from 0.
What does it mean for a to be congruent to b modulo N?
It means a and b have the same remainder when divided by N, written a≡b(modN).
What is an equivalent divisibility test for a≡b(modN)?
a≡b(modN) if and only if N completely divides a−b.
What computer science applications motivate the study of modular arithmetic in this lecture?
Modular arithmetic is especially useful in cryptography, including modular exponentiation used in cryptographic algorithms.
If amodN=a′ and bmodN=b′, how can (a+b)modN be computed?
(a+b)modN=(a′+b′)modN.
If amodN=a′ and bmodN=b′, how can (a−b)modN be computed?
(a−b)modN=(a′−b′)modN.
If amodN=a′ and bmodN=b′, how can (ab)modN be computed?
(ab)modN=(a′b′)modN.
What is the general strategy for simplifying modular addition, subtraction, or multiplication?
First reduce each operand modulo N, perform the operation on the smaller residues, and reduce the result modulo N if needed.
Why do modular arithmetic operations permit operands to be reduced before the operation?
Because addition, subtraction, and multiplication preserve congruence modulo N.
How can the addition rule be proved using quotient-remainder representations?
Write a=q1N+a′, b=q2N+b′, and a′+b′=q3N+r. Then a+b=(q1+q2+q3)N+r, so both expressions have remainder r modulo N.
What is the efficient way to compute 1234567828⋅901mod100 using operand reduction?
Reduce the operands first: 1234567828mod100=28 and 901mod100=1. Thus the result is 28⋅1mod100=28.
Why is modular division not generally defined in the same way as modular addition or multiplication?
The quotient a/b may not be an integer, so its remainder modulo N may be undefined.
Why can 13mod4 be evaluated but 53mod4 cannot be evaluated directly?
13=3 is an integer, so its residue is 3; 53=0.6 is not an integer, so its modulo-4 remainder is not defined.
What does ac≡bc(modN) imply about a and b?
It does not necessarily imply a≡b(modN).
Why is cancellation of a factor c not always valid modulo N?
Multiplication modulo N can map different residues to the same residue, so ac and bc may be congruent even when a and b are not.
Under what general circumstance may cancellation in a modular congruence be possible?
Only when additional conditions on the factor and modulus are satisfied; it is not valid automatically.
Which modular arithmetic algorithms are considered in the lecture?
Algorithms for modular addition, subtraction, multiplication, and exponentiation.
What parameter is used to measure the complexity of modular arithmetic algorithms?
The number of bits, n, needed to represent the input integers a, b, and the modulus N.
What type of running time is preferred for algorithms operating on n-bit integers?
Polynomial running time in n.
What is the complexity of modular addition, subtraction, and multiplication for n-bit inputs?
Each can be performed using a polynomial number of bit operations in n.
How is modular addition implemented at the bit level?
Add corresponding bits of the two n-bit operands while handling carries, then reduce the resulting value modulo N.
Why is repeated modular multiplication a poor method for computing abmodN?
It performs approximately b modular multiplications, and an n-bit exponent b can be as large as 2n, making the method exponential in n.
Why does the numerical magnitude of an n-bit exponent matter for complexity?
An n-bit exponent can have magnitude on the order of 2n, so an algorithm whose iteration count depends on the exponent value is exponential in the input length.
What is the square-and-multiply method used to compute?
It computes modular exponentiation, such as abmodN, in polynomial time.
Why is the method called square and multiply?
Each iteration squares the current power of a, and conditionally multiplies that power into an accumulator.
What is the binary representation of 53?
53=(110101)2.
How can a53 be expressed using powers selected by its binary representation?
a53=a32a16a4a.
In square-and-multiply exponentiation, which powers of a are accumulated for an exponent of 53?
The powers a1, a4, a16, and a32 are accumulated; powers corresponding to 0 bits, such as a2 and a8, are skipped.
How are successive powers of a generated in square-and-multiply?
Start with a1 and repeatedly square modulo N: a1,a2,a4,a8,a16,a32,….
What is the role of the accumulator in square-and-multiply?
It stores the running product of the powers of a selected by the 1 bits of the exponent.
When does square-and-multiply perform a conditional accumulator update?
It updates the accumulator when the current bit of the exponent is 1; it skips the update when the bit is 0.
How many compulsory squarings are required for an exponent represented using n bits?
At most n compulsory squarings.
What is the worst-case number of modular multiplications in square-and-multiply?
At most 2n: up to n compulsory squarings and up to n conditional accumulator multiplications.
How does square-and-multiply compare with the naive method for a 1024-bit exponent?
The naive method may require on the order of 21024 modular multiplications, whereas square-and-multiply requires only a number proportional to the exponent's bit length, about 1024 squarings plus conditional multiplications.
How does the square-and-multiply algorithm obtain the exponent's binary representation during execution?
Repeatedly test whether the current exponent x is odd, record the least significant bit as 1 if odd or 0 if even, then update x by integer division by 2.
What are the main variables in the square-and-multiply pseudocode?
The base, exponent x, modulus N, accumulator y, and current power z.
What happens to the current power z after each iteration of square-and-multiply?
It is squared modulo N to produce the next higher power of the base.
When does the square-and-multiply loop terminate?
It terminates when the remaining exponent variable x becomes 0.

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