polyvec library

Classes

PolyVec
Main functions:

Functions

polyvecadd(PolyVec a, PolyVec b) PolyVec
Component-wise sum of two polyvecs.
polyveccompress(PolyVec v) Uint8List
Applies polycompress to each polynomial and concatenates.
polyvecdecompress(Uint8List r) PolyVec
Decompresses a polyvec from bytes using polydecompress on each polynomial.
polyvecfrombytes(Uint8List r) PolyVec
Converts bytes to a polyvec, assuming the format produced by polyvectobytes.
polyvecinvntttomont(PolyVec v) → void
Applies the inverse NTT (iNTT) to each polynomial in the vector.
polyvecntt(PolyVec v) → void
Applies NTT to each polynomial in the vector.
polyvecreduce(PolyVec v) → void
Reduce all coefficients in each polynomial modulo q.
polyvectobytes(PolyVec v) Uint8List
Converts a polyvec to bytes. Each polynomial is converted with polytobytes and concatenated.