diff options
Diffstat (limited to 'src/include/gnunet_revocation_service.h')
-rw-r--r-- | src/include/gnunet_revocation_service.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h index 105bb1149..d56116914 100644 --- a/src/include/gnunet_revocation_service.h +++ b/src/include/gnunet_revocation_service.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef GNUNET_REVOCATION_SERVICE_H_ | 21 | #ifndef GNUNET_REVOCATION_SERVICE_H_ |
22 | #define GNUNET_REVOCATION_SERVICE_H_ | 22 | #define GNUNET_REVOCATION_SERVICE_H_ |
23 | 23 | ||
24 | #include "gnunet_identity_service.h" | ||
25 | |||
24 | /** | 26 | /** |
25 | * @author Christian Grothoff | 27 | * @author Christian Grothoff |
26 | * | 28 | * |
@@ -51,6 +53,13 @@ extern "C" | |||
51 | #define GNUNET_REVOCATION_VERSION 0x00000001 | 53 | #define GNUNET_REVOCATION_VERSION 0x00000001 |
52 | 54 | ||
53 | /** | 55 | /** |
56 | * Maximum length of a revocation | ||
57 | */ | ||
58 | #define GNUNET_REVOCATION_MAX_PROOF_SIZE sizeof(struct GNUNET_REVOCATION_PowP) +\ | ||
59 | sizeof(struct GNUNET_IDENTITY_PublicKey) +\ | ||
60 | 1024 //FIXME max sig_len | ||
61 | |||
62 | /** | ||
54 | * The proof-of-work narrowing factor. | 63 | * The proof-of-work narrowing factor. |
55 | * The number of PoWs that are calculates as part of revocation. | 64 | * The number of PoWs that are calculates as part of revocation. |
56 | */ | 65 | */ |
@@ -79,15 +88,7 @@ struct GNUNET_REVOCATION_PowP | |||
79 | */ | 88 | */ |
80 | uint64_t pow[POW_COUNT] GNUNET_PACKED; | 89 | uint64_t pow[POW_COUNT] GNUNET_PACKED; |
81 | 90 | ||
82 | /** | 91 | /** followed by the public key type, the key and a signature **/ |
83 | * The signature | ||
84 | */ | ||
85 | struct GNUNET_CRYPTO_EcdsaSignature signature; | ||
86 | |||
87 | /** | ||
88 | * The revoked public key | ||
89 | */ | ||
90 | struct GNUNET_CRYPTO_EcdsaPublicKey key; | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | 94 | ||
@@ -102,14 +103,11 @@ struct GNUNET_REVOCATION_SignaturePurposePS | |||
102 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | 103 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; |
103 | 104 | ||
104 | /** | 105 | /** |
105 | * The revoked public key | ||
106 | */ | ||
107 | struct GNUNET_CRYPTO_EcdsaPublicKey key; | ||
108 | |||
109 | /** | ||
110 | * The timestamp of the revocation | 106 | * The timestamp of the revocation |
111 | */ | 107 | */ |
112 | struct GNUNET_TIME_AbsoluteNBO timestamp; | 108 | struct GNUNET_TIME_AbsoluteNBO timestamp; |
109 | |||
110 | /** Followed by the zone public key type and key **/ | ||
113 | }; | 111 | }; |
114 | 112 | ||
115 | GNUNET_NETWORK_STRUCT_END | 113 | GNUNET_NETWORK_STRUCT_END |
@@ -150,7 +148,7 @@ typedef void (*GNUNET_REVOCATION_Callback) (void *cls, | |||
150 | */ | 148 | */ |
151 | struct GNUNET_REVOCATION_Query * | 149 | struct GNUNET_REVOCATION_Query * |
152 | GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, | 150 | GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, |
153 | const struct GNUNET_CRYPTO_EcdsaPublicKey *key, | 151 | const struct GNUNET_IDENTITY_PublicKey *key, |
154 | GNUNET_REVOCATION_Callback func, void *func_cls); | 152 | GNUNET_REVOCATION_Callback func, void *func_cls); |
155 | 153 | ||
156 | 154 | ||
@@ -217,7 +215,7 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
217 | * @param pow the pow object to work with in the calculation. | 215 | * @param pow the pow object to work with in the calculation. |
218 | */ | 216 | */ |
219 | void | 217 | void |
220 | GNUNET_REVOCATION_pow_init (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 218 | GNUNET_REVOCATION_pow_init (const struct GNUNET_IDENTITY_PrivateKey *key, |
221 | struct GNUNET_REVOCATION_PowP *pow); | 219 | struct GNUNET_REVOCATION_PowP *pow); |
222 | 220 | ||
223 | 221 | ||
@@ -256,6 +254,10 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc); | |||
256 | void | 254 | void |
257 | GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc); | 255 | GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc); |
258 | 256 | ||
257 | size_t | ||
258 | GNUNET_REVOCATION_proof_get_size (const struct GNUNET_REVOCATION_PowP *pow); | ||
259 | |||
260 | |||
259 | #if 0 /* keep Emacsens' auto-indent happy */ | 261 | #if 0 /* keep Emacsens' auto-indent happy */ |
260 | { | 262 | { |
261 | #endif | 263 | #endif |