GNUnet  0.10.x
gnunet_revocation_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
21 #ifndef GNUNET_REVOCATION_SERVICE_H_
22 #define GNUNET_REVOCATION_SERVICE_H_
23 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #if 0 /* keep Emacsens' auto-indent happy */
42 }
43 #endif
44 #endif
45 
46 #include "gnunet_util_lib.h"
47 
51 #define GNUNET_REVOCATION_VERSION 0x00000000
52 
57 
67 typedef void (*GNUNET_REVOCATION_Callback) (void *cls,
68  int is_valid);
69 
70 
82  const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
84 
85 
91 void
93 
94 
99 
100 
118  const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
119  const struct GNUNET_CRYPTO_EcdsaSignature *sig,
120  uint64_t pow,
122 
123 
129 void
131 
132 
142 int
144  uint64_t pow,
145  unsigned int matching_bits);
146 
147 
154 void
156  struct GNUNET_CRYPTO_EcdsaSignature *sig);
157 
158 
159 #if 0 /* keep Emacsens' auto-indent happy */
160 {
161 #endif
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* GNUNET_REVOCATION_SERVICE_H_ */
167  /* end of group revocation */
void GNUNET_REVOCATION_query_cancel(struct GNUNET_REVOCATION_Query *q)
Cancel key revocation check.
struct GNUNET_REVOCATION_Handle * GNUNET_REVOCATION_revoke(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_CRYPTO_EcdsaPublicKey *key, const struct GNUNET_CRYPTO_EcdsaSignature *sig, uint64_t pow, GNUNET_REVOCATION_Callback func, void *func_cls)
Perform key revocation.
void GNUNET_REVOCATION_sign_revocation(const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, struct GNUNET_CRYPTO_EcdsaSignature *sig)
Create a revocation signature.
Private ECC key encoded for transmission.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
void * func_cls
Closure for func.
an ECC signature using ECDSA
void * func_cls
Closure for func.
static struct GNUNET_REVOCATION_Query * q
Handle for revocation query.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
struct GNUNET_HashCode key
The key used in the DHT.
void(* GNUNET_REVOCATION_Callback)(void *cls, int is_valid)
Callback to call with the result of a key revocation query.
Handle for the key revocation query.
configuration data
Definition: configuration.c:85
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
struct GNUNET_REVOCATION_Query * GNUNET_REVOCATION_query(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_CRYPTO_EcdsaPublicKey *key, GNUNET_REVOCATION_Callback func, void *func_cls)
Check if a key was revoked.
Handle for the key revocation operation.
GNUNET_REVOCATION_Callback func
Function to call with the result.
GNUNET_REVOCATION_Callback func
Function to call once we are done.
void GNUNET_REVOCATION_revoke_cancel(struct GNUNET_REVOCATION_Handle *h)
Cancel key revocation.
static unsigned long long matching_bits
Number of matching bits required for revocation.
int GNUNET_REVOCATION_check_pow(const struct GNUNET_CRYPTO_EcdsaPublicKey *key, uint64_t pow, unsigned int matching_bits)
Check if the given proof-of-work value would be acceptable for revoking the given key...