aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 11:57:30 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:23 +0200
commit5d498b8e1b50373636126956d1c6addfd11ade5e (patch)
treef7b7f140838ed52668ad3d02eadbc94cc9936318 /src/include
parent5680378974db794d67b75473435a0651fad0cd24 (diff)
downloadgnunet-5d498b8e1b50373636126956d1c6addfd11ade5e.tar.gz
gnunet-5d498b8e1b50373636126956d1c6addfd11ade5e.zip
- fix revocation
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_revocation_service.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h
index 479cc61d7..18c1f2674 100644
--- a/src/include/gnunet_revocation_service.h
+++ b/src/include/gnunet_revocation_service.h
@@ -53,6 +53,13 @@ extern "C"
53#define GNUNET_REVOCATION_VERSION 0x00000001 53#define GNUNET_REVOCATION_VERSION 0x00000001
54 54
55/** 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/**
56 * The proof-of-work narrowing factor. 63 * The proof-of-work narrowing factor.
57 * The number of PoWs that are calculates as part of revocation. 64 * The number of PoWs that are calculates as part of revocation.
58 */ 65 */
@@ -81,24 +88,14 @@ struct GNUNET_REVOCATION_PowP
81 */ 88 */
82 uint64_t pow[POW_COUNT] GNUNET_PACKED; 89 uint64_t pow[POW_COUNT] GNUNET_PACKED;
83 90
84 /** 91 /** followed by the public key type, the key and a signature **/
85 * The revoked public key
86 */
87 struct GNUNET_IDENTITY_PublicKey key;
88
89 /**
90 * Length of the signature
91 */
92 uint32_t sig_len;
93
94 /** followed by a signature **/
95}; 92};
96 93
97 94
98/** 95/**
99 * The signature object we use for the PoW 96 * The signature object we use for the PoW
100 */ 97 */
101struct GNUNET_REVOCATION_SignaturePurposePS 98struct GNUNET_REVOCATION_EcdsaSignaturePurposePS
102{ 99{
103 /** 100 /**
104 * The signature purpose 101 * The signature purpose
@@ -106,9 +103,14 @@ struct GNUNET_REVOCATION_SignaturePurposePS
106 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 103 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
107 104
108 /** 105 /**
106 * Type of the key
107 */
108 uint32_t ktype;
109
110 /**
109 * The revoked public key 111 * The revoked public key
110 */ 112 */
111 struct GNUNET_IDENTITY_PublicKey key; 113 struct GNUNET_CRYPTO_EcdsaPublicKey key;
112 114
113 /** 115 /**
114 * The timestamp of the revocation 116 * The timestamp of the revocation
@@ -260,6 +262,10 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc);
260void 262void
261GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc); 263GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc);
262 264
265size_t
266GNUNET_REVOCATION_proof_get_size (const struct GNUNET_REVOCATION_PowP *pow);
267
268
263#if 0 /* keep Emacsens' auto-indent happy */ 269#if 0 /* keep Emacsens' auto-indent happy */
264{ 270{
265#endif 271#endif