Solve 28^{27} mod 76 using the Successive Squaring Method

Step 1: Convert our power of 27 to binary notation:

Using our binary calculator, we see that 27 in binary form is 11011 The length of this binary term is 5, so this is how many steps we will take for our algorithm below

Step 2: Construct Successive Squaring Algorithm:

i

a

a^{2}

a^{2} mod p

0

28

28

28 mod 76 = 28

1

28

784

784 mod 76 = 24

2

24

576

576 mod 76 = 44

3

44

1936

1936 mod 76 = 36

4

36

1296

1296 mod 76 = 4

Take a look at our binary term with values of 1 in red, this signifies which terms we use for our expansion: 4 x 36 x 24 x 28 = 96768 mod 76 = 20