pkEncode static method
pkEncode(ρ, t1) – public key encoding.
Implementation
static BuBytes pkEncode(List<int> rho, PolyVec t1) {
final k = t1.k;
final out = BuBytes.fill(32 + k * 320, 0);
out.setRange(0, 32, rho);
var off = 32;
for (var i = 0; i < k; i++) {
final packed = simpleBitPack(t1.polys[i], 10);
out.setRange(off, off + 320, packed);
off += 320;
}
return out;
}