Number Theory for Cryptography
- 41Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the defining requirement for the remainder r in amodN when N is positive?
What is the defining requirement for the remainder r in amodN when N is positive?
41 questions
- 1
What is the defining requirement for the remainder r in amodN when N is positive?
- A
The remainder must be smaller than the quotient produced by division
- B
The remainder must be strictly greater than 0 and less than N
- C
The remainder must be in the range from 0 through N−1
- D
The remainder must have the same sign as the original integer
Correct answer
CThe remainder must be in the range from 0 through N−1
Explanation
For a positive modulus N, the remainder r is defined so that 0≤r≤N−1 and a=qN+r for some integer quotient q.
- A
- 2
Which equation correctly represents the definition of amodN?
- A
a=qN+r, where 0≤r≤N−1
- B
a=q+r, where 0≤r≤N−1
- C
a=qN−r, where 0≤r≤N
- D
a=q+rN, where 0≤q≤N−1
Correct answer
Aa=qN+r, where 0≤r≤N−1
Explanation
The quotient-remainder relationship is a=qN+r, with the remainder restricted to 0≤r≤N−1.
- A
- 3
What is the value of 5mod4?
- A
2
- B
1
- C
3
- D
0
Correct answer
B1
Explanation
Since 5=1⋅4+1, the remainder is 1, so 5mod4=1.
- A
- 4
What is the value of −11mod3 under the standard remainder convention?
- A
2
- B
−2
- C
1
- D
0
Correct answer
C1
Explanation
The remainder must be in the range 0 through 2. Since −11=(−4)⋅3+1, −11mod3=1.
- A
- 5
How can modular arithmetic with a positive integer be visualized using a clock with N marks?
- A
Count clockwise from 0 and stop at the mark reached after counting the integer
- B
Start at 1 and count only the marks that are prime numbers
- C
Divide the integer by the number of marks and use the quotient as the answer
- D
Count counterclockwise from N and stop at the mark reached after counting the integer
Correct answer
ACount clockwise from 0 and stop at the mark reached after counting the integer
Explanation
For a positive value, begin at 0 and count clockwise around the clock. The stopping position gives the remainder modulo N.
- A
- 6
How does the clock visualization change when computing the modulus of a negative integer?
- A
The negative sign is ignored before counting
- B
The count proceeds counterclockwise from 0
- C
The count proceeds clockwise from 0 as usual
- D
The count begins at N−1 and proceeds clockwise
Correct answer
BThe count proceeds counterclockwise from 0
Explanation
The lecture describes using the same clock process in the counterclockwise direction for negative integers.
- A
- 7
What does it mean for a to be congruent to b modulo N?
- A
They have the same quotient when divided by N
- B
They have the same remainder when divided by N
- C
Their product is divisible by N
- D
Their sum is equal to N
Correct answer
BThey have the same remainder when divided by N
Explanation
The notation a≡b(modN) means that a and b produce the same remainder upon division by N.
- A
- 8
Which condition is equivalent to a≡b(modN)?
- A
a−b is completely divisible by N
- B
ab is equal to N
- C
a and b have equal quotients modulo N
- D
a+b is completely divisible by N
Correct answer
Aa−b is completely divisible by N
Explanation
Two integers are congruent modulo N if and only if their difference a−b is divisible by N.
- A
- 9
Suppose amodN=a′ and bmodN=b′. Which expression correctly computes (a+b)modN?
- A
(a′+b′)modN
- B
(a′b′)modN
- C
(a′−b′)modN
- D
(a′+b′)N
Correct answer
A(a′+b′)modN
Explanation
Addition is compatible with reduction: (a+b)modN=((amodN)+(bmodN))modN=(a′+b′)modN.
- A
- 10
Suppose amodN=a′ and bmodN=b′. Which expression correctly computes (a−b)modN?
- A
(a′b′)modN
- B
(a−b)N
- C
(a′+b′)modN
- D
(a′−b′)modN
Correct answer
D(a′−b′)modN
Explanation
Subtraction can be performed after reducing both operands: (a−b)modN=(a′−b′)modN.
- A
- 11
Suppose amodN=a′ and bmodN=b′. Which expression correctly computes (ab)modN?
- A
(a′b′)modN
- B
(a′−b′)modN
- C
(a′b′)N
- D
(a′+b′)modN
Correct answer
A(a′b′)modN
Explanation
Multiplication is compatible with modular reduction, so (ab)modN=(a′b′)modN.
- A
- 12
What is the main practical advantage of reducing operands before performing modular addition or multiplication?
- A
It makes division by every nonzero operand valid
- B
It changes the mathematical result to a larger representative
- C
It eliminates the need to perform the final modular reduction
- D
It replaces potentially large operands with smaller equivalent remainders
Correct answer
DIt replaces potentially large operands with smaller equivalent remainders
Explanation
Reducing operands first preserves the final modular result while often making the intermediate arithmetic much easier.
- A
- 13
Let a=128 and b=201, with modulus 100. Using modular reduction before multiplication, what is (ab)mod100?
- A
56
- B
1
- C
29
- D
28
Correct answer
D28
Explanation
Reduce first: 128mod100=28 and 201mod100=1. Therefore, (ab)mod100=(28⋅1)mod100=28.
- A
- 14
Why does the same reduction-before-operation principle work for addition, subtraction, and multiplication?
- A
Every operation produces a result smaller than N automatically
- B
Terms divisible by N contribute remainder 0 after the operation
- C
The quotient of every operand is always equal to 1
- D
Modular arithmetic treats all operations as ordinary division
Correct answer
BTerms divisible by N contribute remainder 0 after the operation
Explanation
Writing each operand as a multiple of N plus its remainder shows that the multiples of N vanish under final reduction, leaving the result obtained from the reduced operands.
- A
- 15
Which operation does the lecture identify as not always well-defined in ordinary modular arithmetic?
- A
Subtraction
- B
Addition
- C
Multiplication
- D
Division
Correct answer
DDivision
Explanation
Modular division is not always well-defined because the quotient of two integers may be a fraction, and ordinary modular remainders are defined for integers.
- A
- 16
Why is 53mod4 not ordinarily well-defined under the lecture's definition?
- A
53 is not an integer
- B
The modulus must be larger than both operands
- C
3 is smaller than the modulus
- D
5 is not relatively prime to the modulus
Correct answer
A53 is not an integer
Explanation
The standard modular remainder operation is defined for integers. Since 53=0.6 is not an integer, its remainder modulo 4 is not defined in this framework.
- A
- 17
What invalid inference does the lecture warn against in modular arithmetic?
- A
Adding the same number to both sides of a congruence
- B
Reducing both sides of a congruence modulo N
- C
Multiplying both sides of a congruence by the modulus
- D
Canceling a common factor from both sides without checking conditions
Correct answer
DCanceling a common factor from both sides without checking conditions
Explanation
From ac≡bc(modN), one cannot always conclude a≡b(modN). Cancellation is valid only under additional conditions.
- A
- 18
If ac≡bc(modN), what can safely be concluded without additional assumptions?
- A
N divides c always holds
- B
The two products have the same remainder modulo N
- C
a≡b(modN) always holds
- D
c≡1(modN) always holds
Correct answer
BThe two products have the same remainder modulo N
Explanation
The given congruence directly means that ac and bc have the same remainder modulo N. It does not automatically permit cancellation of c.
- A
- 19
Why is modular division different from modular addition and multiplication in the lecture?
- A
Division is always exponential in the number of bits
- B
Division never produces a remainder in the range 0 through N−1
- C
Addition and multiplication cannot be applied to reduced operands
- D
Division may produce a noninteger, and cancellation may require extra conditions
Correct answer
DDivision may produce a noninteger, and cancellation may require extra conditions
Explanation
The lecture emphasizes both that ordinary division may produce a fraction and that common-factor cancellation in congruences is not automatically valid.
- A
- 20
What determines whether cancellation in a congruence is valid?
- A
Whether the canceled factor is larger than the modulus
- B
Whether certain additional conditions involving the factor and modulus hold
- C
Whether both sides have different remainders
- D
Whether the operands are represented in binary
Correct answer
BWhether certain additional conditions involving the factor and modulus hold
Explanation
The lecture states that cancellation can be justified in some cases, but only when certain conditions are satisfied; it is not universally valid.
- A
- 21
What parameter is used to measure the efficiency of the modular arithmetic algorithms discussed?
- A
The numerical value of the largest remainder
- B
The number of digits in the final answer only
- C
The number of bits needed to represent the inputs
- D
The number of prime factors of the modulus
Correct answer
CThe number of bits needed to represent the inputs
Explanation
Complexity is measured as a function of the number of bits needed to represent the integers a, b, and N.
- A
- 22
If a, b, and N are n-bit integers, what kind of running time is preferred for their modular arithmetic algorithms?
- A
A polynomial function of n
- B
A constant function independent of n
- C
An exponential function of n
- D
A subexponential function with no input dependence
Correct answer
AA polynomial function of n
Explanation
The lecture prefers algorithms whose number of bit operations is polynomial in the input bit length n, rather than exponential or subexponential approaches.
- A
- 23
Which group of operations is stated to be computable using a polynomial number of bit operations in n?
- A
Division, factoring, and primality testing
- B
Clock visualization, division, and cancellation
- C
Addition, subtraction, and modular multiplication
- D
Exponentiation by repeated multiplication only
Correct answer
CAddition, subtraction, and modular multiplication
Explanation
The lecture explicitly states that addition, subtraction, and modular multiplication can all be performed in polynomial time in the bit length n.
- A
- 24
How is addition of two n-bit integers typically performed at the bit level?
- A
By repeatedly dividing both operands by the modulus
- B
By processing corresponding bits while managing carries
- C
By converting every bit into a decimal fraction
- D
By testing whether each bit position is prime
Correct answer
BBy processing corresponding bits while managing carries
Explanation
Binary addition processes the bits of the two operands and handles carries, requiring a number of operations polynomial in n.
- A
- 25
Why is repeated modular multiplication for computing abmodN not generally polynomial time in the input length?
- A
The modulus N cannot be represented using binary notation
- B
Each modular multiplication is itself impossible for large inputs
- C
The exponent b may have numerical magnitude as large as 2n
- D
Reducing after each multiplication changes the exponent
Correct answer
CThe exponent b may have numerical magnitude as large as 2n
Explanation
Although each modular multiplication is polynomial in n, an n-bit exponent can be numerically as large as approximately 2n, causing exponentially many repetitions.
- A
- 26
What is the central problem with the naive method of computing abmodN by multiplying by a repeatedly?
- A
It requires the exponent to be written in decimal form
- B
It cannot reduce intermediate results modulo N
- C
It performs a number of modular multiplications proportional to the numerical value of b
- D
It uses fewer multiplications than necessary
Correct answer
CIt performs a number of modular multiplications proportional to the numerical value of b
Explanation
The naive method requires roughly b−1 modular multiplications, and b can be exponentially large relative to its n-bit representation.
- A
- 27
Why is modular exponentiation especially important in the context of the lecture?
- A
It replaces all uses of prime numbers in number theory
- B
It makes modular division valid for every modulus
- C
It is the only operation that can define a remainder
- D
It is a central operation in cryptographic algorithms
Correct answer
DIt is a central operation in cryptographic algorithms
Explanation
The lecture identifies modular exponentiation as a very important or central operation in cryptographic algorithms.
- A
- 28
What is the main idea of the square-and-multiply method?
- A
Represent the exponent in binary and selectively accumulate powers of the base
- B
Divide the modulus by the exponent before each multiplication
- C
Multiply the base by itself once for every decimal digit of the exponent
- D
Replace the exponent with its remainder modulo the base
Correct answer
ARepresent the exponent in binary and selectively accumulate powers of the base
Explanation
Square-and-multiply uses the binary representation of the exponent. It generates successive powers by squaring and multiplies selected powers when the corresponding exponent bit is 1.
- A
- 29
Why is the method called square and multiply?
- A
It repeatedly squares the current power and optionally multiplies it into an accumulator
- B
It squares every bit and adds the resulting decimal values
- C
It multiplies only when two adjacent exponent bits are equal
- D
It squares the modulus and multiplies the exponent
Correct answer
AIt repeatedly squares the current power and optionally multiplies it into an accumulator
Explanation
Each iteration performs a compulsory squaring to obtain the next power of the base and may perform an optional multiplication into the accumulator.
- A
- 30
What is the binary representation of the exponent 53?
- A
1001012
- B
1011012
- C
1101012
- D
1110012
Correct answer
C1101012
Explanation
Since 53=32+16+4+1, its binary representation is 1101012.
- A
- 31
Which decomposition of a53 follows from the binary representation 1101012?
- A
a53=a1a8a16a32
- B
a53=a1a4a16a32
- C
a53=a2a4a8a32
- D
a53=a1a2a8a16
Correct answer
Ba53=a1a4a16a32
Explanation
The 1 bits in 1101012 correspond to 1, 4, 16, and 32, so a53=a1a4a16a32.
- A
- 32
In square-and-multiply, what does a 0 bit in the binary exponent indicate?
- A
The modulus should be replaced by zero
- B
The algorithm must terminate immediately
- C
The current power of the base must be squared twice
- D
The corresponding power of the base is excluded from the accumulator
Correct answer
DThe corresponding power of the base is excluded from the accumulator
Explanation
A 0 bit means that the corresponding power does not appear in the binary decomposition of the exponent, so it is not accumulated.
- A
- 33
How is the next higher power of the base generated in each square-and-multiply iteration?
- A
By multiplying the current power by the modulus
- B
By squaring the current power modulo N
- C
By dividing the current power by the exponent
- D
By adding the current power to the modulus
Correct answer
BBy squaring the current power modulo N
Explanation
Starting with a1, squaring successively produces a2, a4, a8, and so on, with each operation performed modulo N.
- A
- 34
What is the role of the accumulator in the square-and-multiply algorithm?
- A
It stores the binary representation of the modulus
- B
It stores the product of the selected powers of the base
- C
It records only the quotient from each division
- D
It determines whether the current exponent is prime
Correct answer
BIt stores the product of the selected powers of the base
Explanation
The accumulator stores the running product of those powers of a whose corresponding exponent bits are 1.
- A
- 35
When does square-and-multiply perform its optional accumulation step?
- A
Only after all exponent bits have been processed
- B
Whenever the current exponent bit is 0
- C
Only when the modulus is odd
- D
Whenever the current exponent bit is 1
Correct answer
DWhenever the current exponent bit is 1
Explanation
The current power is multiplied into the accumulator when the corresponding bit of the exponent is 1.
- A
- 36
For an exponent with n binary bits, what is the worst-case number of modular multiplications in square-and-multiply according to the lecture?
- A
At most n
- B
At most n+1
- C
At most 2n
- D
At most 2n
Correct answer
CAt most 2n
Explanation
There are n compulsory squarings and, in the worst case, n optional accumulations when all bits are 1, giving at most 2n modular multiplications.
- A
- 37
Why does square-and-multiply have polynomial complexity in the exponent's bit length?
- A
It performs at most a linear number of modular multiplications in the number of exponent bits
- B
It avoids all modular reductions during the computation
- C
It requires the modulus to contain only one bit
- D
It performs a number of multiplications proportional to the exponent's numerical value
Correct answer
AIt performs at most a linear number of modular multiplications in the number of exponent bits
Explanation
The method performs at most about 2n modular multiplications for an n-bit exponent, rather than a number proportional to the potentially exponential numerical value of the exponent.
- A
- 38
How can the binary representation of an exponent be generated algorithmically?
- A
Repeatedly divide the exponent by the modulus and record each quotient
- B
Subtract the modulus until the exponent becomes zero
- C
Repeatedly divide the exponent by 2 and record each remainder
- D
Square the exponent until it becomes odd
Correct answer
CRepeatedly divide the exponent by 2 and record each remainder
Explanation
Repeated division by 2 produces remainders of 0 or 1, which give the binary digits from least significant bit to most significant bit.
- A
- 39
In the pseudocode, what does testing whether xmod2=1 determine?
- A
Whether the current least significant bit of x is 1
- B
Whether the modulus has an odd number of bits
- C
Whether the accumulator is already reduced
- D
Whether the base is larger than the exponent
Correct answer
AWhether the current least significant bit of x is 1
Explanation
An odd value of x has least significant binary bit 1; an even value has least significant bit 0.
- A
- 40
What update advances the exponent-processing loop toward its next binary bit?
- A
Replace x with x/2 after determining its parity
- B
Replace x with x−1 only when it is even
- C
Replace x with xN after each multiplication
- D
Replace x with x2 after each squaring
Correct answer
AReplace x with x/2 after determining its parity
Explanation
After reading the current least significant bit, the algorithm divides x by 2 to shift to the next bit.
- A
- 41
Which two operations occur during each iteration of the square-and-multiply pseudocode?
- A
A compulsory division and a conditional modulus change
- B
A compulsory addition and a conditional subtraction
- C
A compulsory squaring and a conditional accumulator update
- D
A compulsory factorization and a conditional primality test
Correct answer
CA compulsory squaring and a conditional accumulator update
Explanation
Each iteration squares the current power to obtain the next one, and conditionally multiplies that power into the accumulator when the current exponent bit is 1.
- A

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