<jupyter_start><jupyter_text>Example with homomorphism<jupyter_code>H = setup()
x1 = randint(0, N.order() // 2)
(C1, t1) = commit(x1, H)
x2 = randint(0, N.order() // 2)
(C2, t2) = commit(x2, H)
Cs = addC(C1, C2)
ts = addT(t1, t2)
xs = addX(x1, x2)

open(C1, t1, x1, H), open(C2, t2, x2, H), open(Cs, ts, xs, H)
F.polynomial()
Fi = PolynomialRing(ZZ[p], 'x')
14.quo_rem(3)
7600.factor()
4598037234.factor()
Z8 = Integers(8)
Z8
(x, P) = keypair()
R.<w> = Integers(p)[]
Poly = R.lagrange_polynomial([(0, int(x)), (1, 255), (2, 999)])
Poly(0)
def Shamir (s, t, n, p):
    assert(s < p)
    R.<w> = Integers(p)[]
    coords = [(0, s)] + [(randint(1, p-1), randint(0, p-1)) for _ in range(t-1)]
    Fn = R.lagrange_polynomial(coords)
    print(Fn)
    return [(x, Fn(x)) for x in range(1, n+1)]
Shamir(10, 3, 10, 19)
R.<u> = Integers(19)[]
R.lagrange_polynomial([(1,13), (10, 3), (9, 15)])(0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24017467248908297, 'fraction_numerical': 0.08842794759825327, 'mean_word_length': 4.3313953488372094, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '656754', 'license': '0BSD', 'n_tokens_mistral': 511, 'n_tokens_neox': 463, 'n_words': 106, 'path': 'pedersen-commitment.ipynb', 'repo_name': 'emilbayes/abstract-algebra-fun', 'size': '916'}