aboutsummaryrefslogtreecommitdiff
path: root/internals.h
blob: 32080ecb29292d1fe0d09560f1bf56f76ed2a5d0 (plain) (blame)
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
/* 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 internals.h
 * @brief This header contains library internal structs.
 */

#ifndef _BRANDT_INTERNALS_H
#define _BRANDT_INTERNALS_H

#include <pari/pari.h>

struct AuctionData {
	GEN p; /** The "safe prime" p */
	GEN q; /** The prime @f$q = (p - 1) / 2@f$. */
	GEN g; /** The generator of @f$\mathbb{G}_q@f$ */
	uint16_t n; /** The amount of bidders/agents */
	uint16_t k; /** The amount of possible prices */

	GEN x; /** Own private additive key share */
	GEN y; /** Own public multiplicative key share */
	GEN Y; /** Shared public key */

	GEN m; /** Additive share of random exponents, type: Matrix(n,k) */
	GEN r; /** Key share exponent, type: Vector(k) */
	GEN b; /** Own bid, type: Vector(k) */

	GEN alpha; /** Own alpha, type: Vector(k) */
	GEN beta; /** Own beta, type: Vector(k) */
};

#endif