2016-06-07 15:49:22 +02:00
|
|
|
/* 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.
|
2016-06-22 23:18:46 +02:00
|
|
|
* @author Markus Teich
|
2016-06-07 15:49:22 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BRANDT_INTERNALS_H
|
|
|
|
#define _BRANDT_INTERNALS_H
|
|
|
|
|
2016-06-17 15:34:46 +02:00
|
|
|
#include <gcrypt.h>
|
2016-06-07 15:49:22 +02:00
|
|
|
|
|
|
|
struct AuctionData {
|
2016-06-17 15:34:46 +02:00
|
|
|
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 */
|
2016-06-20 01:41:41 +02:00
|
|
|
uint16_t b; /** Own bid */
|
2016-06-17 15:34:46 +02:00
|
|
|
|
|
|
|
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 **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 */
|
2016-06-07 15:49:22 +02:00
|
|
|
};
|
|
|
|
|
2016-06-17 15:34:46 +02:00
|
|
|
#endif /* ifndef _BRANDT_INTERNALS_H */
|