aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/scalarproduct.h
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-03-07 15:52:26 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-03-07 15:52:26 +0000
commit918024cf6824c59e91593b7ade6b8ff8a93a214b (patch)
treeae50bf71b8032bf8a7d6ac524cac8b3bb2b77c4d /src/scalarproduct/scalarproduct.h
parentacc0419893e4cb67e46357fe77f0e8a285c6ee31 (diff)
downloadgnunet-918024cf6824c59e91593b7ade6b8ff8a93a214b.tar.gz
gnunet-918024cf6824c59e91593b7ade6b8ff8a93a214b.zip
- removed custom crypto functionality in scalarproduct
- scalarproduct now uses the paillier-API + associated structs - omitted SP-tests for now, scalarproduct is still heavily being reworked
Diffstat (limited to 'src/scalarproduct/scalarproduct.h')
-rw-r--r--src/scalarproduct/scalarproduct.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/scalarproduct/scalarproduct.h b/src/scalarproduct/scalarproduct.h
index 66f05e76d..5682362fd 100644
--- a/src/scalarproduct/scalarproduct.h
+++ b/src/scalarproduct/scalarproduct.h
@@ -36,21 +36,11 @@ extern "C"
36/////////////////////////////////////////////////////////////////////////////// 36///////////////////////////////////////////////////////////////////////////////
37// Defines 37// Defines
38/////////////////////////////////////////////////////////////////////////////// 38///////////////////////////////////////////////////////////////////////////////
39/**
40 * Length of the key used for encryption
41 */
42#define KEYBITS 2048
43
44/**
45 * When performing our crypto, we may add two encrypted values with each
46 * a maximal length of GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH.
47 */
48#define PAILLIER_ELEMENT_LENGTH (2*KEYBITS/sizeof(char))
49 39
50/** 40/**
51 * Maximum count of elements we can put into a multipart message 41 * Maximum count of elements we can put into a multipart message
52 */ 42 */
53#define MULTIPART_ELEMENT_CAPACITY ((GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - sizeof (struct GNUNET_SCALARPRODUCT_multipart_message)) / PAILLIER_ELEMENT_LENGTH) 43#define MULTIPART_ELEMENT_CAPACITY ((GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - sizeof (struct GNUNET_SCALARPRODUCT_multipart_message)) / sizeof (struct GNUNET_CRYPTO_PaillierCiphertext))
54 44
55/** 45/**
56 * Log an error message at log-level 'level' that indicates 46 * Log an error message at log-level 'level' that indicates
@@ -125,11 +115,6 @@ struct GNUNET_SCALARPRODUCT_service_request {
125 uint32_t mask_length GNUNET_PACKED; 115 uint32_t mask_length GNUNET_PACKED;
126 116
127 /** 117 /**
128 * the length of the publickey contained within this message
129 */
130 uint32_t pk_length GNUNET_PACKED;
131
132 /**
133 * the transaction/session key used to identify a session 118 * the transaction/session key used to identify a session
134 */ 119 */
135 struct GNUNET_HashCode key; 120 struct GNUNET_HashCode key;