did basic sigs

This commit is contained in:
h 2023-08-06 16:57:46 -04:00
parent e6e39c04f0
commit d139927d00

View File

@ -134,6 +134,7 @@ where
[(); k(L) * n(L)]:, [(); k(L) * n(L)]:,
[(); m(L)]:, [(); m(L)]:,
[(); m(L) / 2]:, [(); m(L) / 2]:,
[(); (k(L) * n(L) + 1) / 2]:,
[(); k(L) * v_bytes(L) + ((k(L) * o(L) + 1) / 2)]:, [(); k(L) * v_bytes(L) + ((k(L) * o(L) + 1) / 2)]:,
[(); salt_bytes(L) + o_bytes(L) + p1_bytes(L) + l_bytes(L)]:, [(); salt_bytes(L) + o_bytes(L) + p1_bytes(L) + l_bytes(L)]:,
[(); digest_bytes(L)]:, [(); digest_bytes(L)]:,
@ -233,12 +234,14 @@ where
let s = Mat([[0; k(L) * n(L)]; 1]); let s = Mat([[0; k(L) * n(L)]; 1]);
for i in 0..(k(L)) { for i in 0..(k(L)) {
s.0[0][(i * n(L))..((i + 1) * n(L) - o(L))] = s.0[0][(i * n(L))..((i + 1) * n(L) - o(L))].copy_from_slice(
(vv[i].tp() + Mat([(om.mul_right(x)).0[(i * o(L))..((i + 1) * o(L))]; 1])).0[0]; &(vv[i] + (om.mul_right(Mat([x.0[(i * o(L))..((i + 1) * o(L))]; 1]).tp()))).0[0],
s.0[0][((i + 1) * n(L) - o(L))..((i + 1) * n(L))] = x.0[(i * o(L))..((i + 1) * o(L))]; );
s.0[0][((i + 1) * n(L) - o(L))..((i + 1) * n(L))]
.copy_from_slice(&x.0[(i * o(L))..((i + 1) * o(L))]);
} }
let sig = encode_vec(s.tp()).to_vec(); let sig = encode_vec::<{ k(L) * n(L) }>(s.tp()).to_vec();
for i in salt { for i in salt {
sig.push(i); sig.push(i);