Finally finished Chapter 1 of Programming Bitcoin and attempted all the exercises!
This is the only thing I don't understand.
```
def __pow__(self, exponent):
n = exponent % (self.prime - 1) # how come?!
num = pow(self.num, n, self.prime)
return self.__class__(num, self.prime)
```
I get why. We need a positive exponent and an efficient way of taking a negative exponent positive. But how come `n = exponent % (self.prime -1)`
As I'm saying this I want to make a Nostr stackoverflow...