did basic sigs
This commit is contained in:
parent
e6e39c04f0
commit
d139927d00
11
src/mayo.rs
11
src/mayo.rs
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user