def gf_random(n, p, K):
 return ([K.one] + [K(int(uniform(0, p))) for i in range(0, n)])

def gf_random ( n , p , K ) : return ( [ K . one ] + [ K ( int ( uniform ( 0 , p ) ) ) for i in range ( 0 , n ) ] )
generate a random polynomial in gf(p)[x] of degree n .