aboutsummaryrefslogtreecommitdiff
path: root/internals.h
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-06-07 15:49:22 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-06-07 15:49:22 +0200
commitad52777275b84c4acbb2dfbf30bf2ac8e6506272 (patch)
tree29950fbc131190e98debd6bc4c24b221b38fe772 /internals.h
parent9938f3ad206df64597083d6b73513fdfd2f67b5f (diff)
low level implementation of round1
Diffstat (limited to 'internals.h')
-rw-r--r--internals.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/internals.h b/internals.h
new file mode 100644
index 0000000..32080ec
--- /dev/null
+++ b/internals.h
@@ -0,0 +1,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