-
Notifications
You must be signed in to change notification settings - Fork 26
/
mpc_lowmc.h
42 lines (32 loc) · 1.2 KB
/
mpc_lowmc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* This file is part of the optimized implementation of the Picnic signature scheme.
* See the accompanying documentation for complete details.
*
* The code is provided under the MIT license, see LICENSE for
* more details.
* SPDX-License-Identifier: MIT
*/
#ifndef MPC_LOWMC_H
#define MPC_LOWMC_H
#include <stdbool.h>
#include "lowmc.h"
/* Share count for proofs */
#define SC_PROOF 3
/* Share count for verification */
#define SC_VERIFY 2
typedef union {
uint64_t t[SC_PROOF];
mzd_local_t s[SC_PROOF];
} view_t;
typedef view_t rvec_t;
typedef ATTR_ALIGNED(32) struct {
mzd_local_t s[SC_PROOF][(MAX_LOWMC_BLOCK_SIZE + 255) / 256];
} in_out_shares_t;
typedef void (*zkbpp_lowmc_implementation_f)(mzd_local_t const*, view_t*, in_out_shares_t*, rvec_t*,
recorded_state_t*);
typedef void (*zkbpp_lowmc_verify_implementation_f)(mzd_local_t const*, view_t*, in_out_shares_t*,
rvec_t*, unsigned int);
zkbpp_lowmc_implementation_f get_zkbpp_lowmc_implementation(const lowmc_parameters_t* lowmc);
zkbpp_lowmc_verify_implementation_f
get_zkbpp_lowmc_verify_implementation(const lowmc_parameters_t* lowmc);
#endif