aboutsummaryrefslogtreecommitdiff
path: root/internals.h
blob: f705c6d1644272b575c8f063766d99090326714f (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 <gcrypt.h>

struct AuctionData {
	uint16_t n;                /** The amount of bidders/agents */
	uint16_t k;                /** The amount of possible prices */
	uint16_t i;                /** Own agents index, only used when bidding */

	gcry_mpi_t       x;        /** Own private additive key share */
	gcry_mpi_point_t *y;       /** public multiplicative key shares, size: n */
	gcry_mpi_point_t Y;        /** Shared public key */

	gcry_mpi_point_t *b;       /** Own bid, size: k */

	gcry_mpi_point_t **alpha;  /** alphas, size: n*k */
	gcry_mpi_point_t **beta;   /** betas, size: n*k */

	gcry_mpi_point_t ***gamma; /** gamma, size: n*n*k */
	gcry_mpi_point_t ***delta; /** delta, size: n*n*k */
	gcry_mpi_point_t ***phi;   /** phi, size: n*n*k */
};

#endif /* ifndef _BRANDT_INTERNALS_H */