First time here? Check out the FAQ!
answered 2022-01-19 20:29:34 +0100
The given conditions imply that k0 and j are simply the remainder and quotient of division of k by p-1. Correspondingly, they can be computed as:
k0
j
k
p-1
j, k0 = k.quo_rem(p-1)