31.6-1

Draw a table showing the order of every element in Z11\mathbb Z_{11}^*. Pick the smallest primitive root gg and compute a table giving ind11,g(x)\text{ind}_{11, g}(x) for all xZ11x \in \mathbb Z_{11}^*.

g=2g = 2, {1,2,4,8,5,10,9,7,3,6}\{1, 2, 4, 8, 5, 10, 9, 7, 3, 6\}.

31.6-2

Give a modular exponentiation algorithm that examines the bits of bb from right to left instead of left to right.

1
2
3
4
5
6
7
8
9
MODULAR-EXPONENTIATION(a, b, n)
    i = 0
    d = 1
    while (1 << i)  b
        if (b & (1 << i)) > 0
            d = (d * a) % n
        a = (a * a) % n
        i = i + 1
    return d

31.6-3

Assuming that you know ϕ(n)\phi(n), explain how to compute a1mod  na^{-1} \mod n for any aZna \in \mathbb Z_n^* using the procedure MODULAR-EXPONENTIATION\text{MODULAR-EXPONENTIATION}.

aϕ(n)1(modn),aaϕ(n)11(modn),a1aϕ(n)1(modn). \begin{array}{rlll} a^{\phi(n)} & \equiv & 1 & \pmod n, \\ a\cdot a^{\phi(n) - 1} & \equiv & 1 & \pmod n, \\ a^{-1} & \equiv & a^{\phi(n)-1} & \pmod n. \end{array}