47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
/* 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
|