aboutsummaryrefslogtreecommitdiff
path: root/smc.h
blob: 6309123b2e6dc42530d473834075e2dafa7fac71 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* This file is part of libbrandt.
 * Copyright (C) 2016 GNUnet e.V.
 *
 * libbrandt is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * libbrandt is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * libbrandt.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @file smc.h
 * @brief describes the secure multiparty computation interface.
 */

#ifndef _BRANDT_SMC_H
#define _BRANDT_SMC_H

#include <gcrypt.h>

void smc_zkp_dl (const gcry_mpi_point_t v,
                 const gcry_mpi_point_t g,
                 const gcry_mpi_t       x,
                 const gcry_mpi_point_t a,
                 gcry_mpi_t             c,
                 gcry_mpi_t             r);
int smc_zkp_dl_check (const gcry_mpi_point_t v,
                      const gcry_mpi_point_t g,
                      const gcry_mpi_point_t a,
                      const gcry_mpi_t       c,
                      const gcry_mpi_t       r);

void smc_zkp_2dle (const gcry_mpi_point_t v,
                   const gcry_mpi_point_t w,
                   const gcry_mpi_point_t g1,
                   const gcry_mpi_point_t g2,
                   const gcry_mpi_t       x,
                   gcry_mpi_point_t       a,
                   gcry_mpi_point_t       b,
                   gcry_mpi_t             c,
                   gcry_mpi_t             r);
int smc_zkp_2dle_check (const gcry_mpi_point_t v,
                        const gcry_mpi_point_t w,
                        const gcry_mpi_point_t g1,
                        const gcry_mpi_point_t g2,
                        const gcry_mpi_point_t a,
                        const gcry_mpi_point_t b,
                        const gcry_mpi_t       c,
                        const gcry_mpi_t       r);

void smc_zkp_0og (gcry_mpi_point_t       alpha,
                  const gcry_mpi_point_t m,
                  const gcry_mpi_point_t y,
                  gcry_mpi_point_t       beta,
                  gcry_mpi_point_t       a1,
                  gcry_mpi_point_t       a2,
                  gcry_mpi_point_t       b1,
                  gcry_mpi_point_t       b2,
                  gcry_mpi_t             c,
                  gcry_mpi_t             d1,
                  gcry_mpi_t             d2,
                  gcry_mpi_t             r1,
                  gcry_mpi_t             r2);
int smc_zkp_0og_check (const gcry_mpi_point_t alpha,
                       const gcry_mpi_point_t y,
                       const gcry_mpi_point_t beta,
                       const gcry_mpi_point_t a1,
                       const gcry_mpi_point_t a2,
                       const gcry_mpi_point_t b1,
                       const gcry_mpi_point_t b2,
                       const gcry_mpi_t       c,
                       const gcry_mpi_t       d1,
                       const gcry_mpi_t       d2,
                       const gcry_mpi_t       r1,
                       const gcry_mpi_t       r2);

#endif // ifndef _BRANDT_SMC_H