Neptune-Crypto / twenty-first

Collection of mathematics routines and cryptography for the twenty-first century
GNU General Public License v2.0
74 stars 22 forks source link

feat: Implement `BFieldCodec` for `Polynomial` #201

Closed Sword-Smith closed 7 months ago

Sword-Smith commented 7 months ago

This implementation prevents and disallows trailing zeros in the coefficients list when the polynomial is encoded. This is done to ensure that the encoding of a polynomial is unique, and that proof streams containing polynomials become as simple and short as possible.

Motivated by: https://github.com/TritonVM/triton-vm/issues/268

This closes #200.

coveralls commented 7 months ago

Coverage Status

coverage: 97.197% (-0.1%) from 97.306% when pulling 7ac68e7707dfc56eec192b0f024d89c51710304c on 200-bfieldcodec-for-polys into 8bc05393cefed3a44744b9193adbae442853bfa2 on master.