aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-26 22:13:01 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-26 22:13:01 +0000
commit64d3e46cfb99a711e500fa1f114e7c44bdf10040 (patch)
tree83093d92761d5c1b8b2fded713adaa19af29274c /src/include/gnunet_crypto_lib.h
parentef6f05f63769263a5201636c4b7f71eaa455cdf3 (diff)
downloadgnunet-64d3e46cfb99a711e500fa1f114e7c44bdf10040.tar.gz
gnunet-64d3e46cfb99a711e500fa1f114e7c44bdf10040.zip
-bugfixes, code cleanup
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 3bb60d9e5..ff7bffdbb 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -71,7 +71,6 @@ enum GNUNET_CRYPTO_Quality
71 */ 71 */
72#define GNUNET_CRYPTO_AES_KEY_LENGTH (256/8) 72#define GNUNET_CRYPTO_AES_KEY_LENGTH (256/8)
73 73
74
75/** 74/**
76 * @brief Length of RSA encrypted data (2048 bit) 75 * @brief Length of RSA encrypted data (2048 bit)
77 * 76 *
@@ -84,30 +83,27 @@ enum GNUNET_CRYPTO_Quality
84 */ 83 */
85#define GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH 256 84#define GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH 256
86 85
87
88/** 86/**
89 * Length of an RSA KEY (n,e,len), 2048 bit (=256 octests) key n, 2 byte e 87 * Length of an RSA KEY (n,e,len), 2048 bit (=256 octests) key n, 2 byte e
90 */ 88 */
91#define GNUNET_CRYPTO_RSA_KEY_LENGTH 258 89#define GNUNET_CRYPTO_RSA_KEY_LENGTH 258
92 90
93
94/** 91/**
95 * Length of a hash value 92 * Length of a hash value
96 */ 93 */
97#define GNUNET_CRYPTO_HASH_LENGTH 512/8 94#define GNUNET_CRYPTO_HASH_LENGTH 512/8
98 95
99
100/** 96/**
101 * FIXME: what is an acceptable value here? 97 * FIXME: what is an acceptable value here?
102 * Note: round to multiple of 8 minus 2. 98 * Note: round to multiple of 8 minus 2.
103 */ 99 */
104#define GNUNET_CRYPTO_ECC_DATA_ENCODING_LENGTH 510 100#define GNUNET_CRYPTO_ECC_SIGNATURE_DATA_ENCODING_LENGTH 138
105 101
106/** 102/**
107 * FIXME: what is an acceptable value here? 103 * FIXME: what is an acceptable value here?
108 * Maximum length of the public key (q-point, Q = dP) when encoded. 104 * Maximum length of the public key (q-point, Q = dP) when encoded.
109 */ 105 */
110#define GNUNET_CRYPTO_ECC_MAX_PUBLIC_KEY_LENGTH 254 106#define GNUNET_CRYPTO_ECC_MAX_PUBLIC_KEY_LENGTH 140
111 107
112 108
113/** 109/**
@@ -277,7 +273,7 @@ struct GNUNET_CRYPTO_EccSignature
277 /** 273 /**
278 * S-expression, padded with zeros. 274 * S-expression, padded with zeros.
279 */ 275 */
280 char sexpr[GNUNET_CRYPTO_ECC_DATA_ENCODING_LENGTH]; 276 char sexpr[GNUNET_CRYPTO_ECC_SIGNATURE_DATA_ENCODING_LENGTH];
281}; 277};
282 278
283 279