-
Notifications
You must be signed in to change notification settings - Fork 26
/
picnic_impl.h
39 lines (32 loc) · 1.07 KB
/
picnic_impl.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
/*
* 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 PICNIC_IMPL_H
#define PICNIC_IMPL_H
#include "lowmc.h"
#include "picnic_instances.h"
#include "picnic.h"
#include <stdio.h>
typedef struct {
mzd_local_t m_plaintext[(MAX_LOWMC_BLOCK_SIZE_BITS + 255) / 256];
/* private key for signing, public key for verification */
mzd_local_t m_key[(MAX_LOWMC_KEY_SIZE_BITS + 255) / 256];
const uint8_t* plaintext;
const uint8_t* private_key;
const uint8_t* public_key;
const uint8_t* msg;
size_t msglen;
#if defined(WITH_UNRUH)
bool unruh;
#endif
} picnic_context_t;
int picnic_impl_sign(const picnic_instance_t* pp, const picnic_context_t* context, uint8_t* sig,
size_t* siglen);
int picnic_impl_verify(const picnic_instance_t* pp, const picnic_context_t* context,
const uint8_t* sig, size_t siglen);
#endif