21 #ifndef GNUNET_REVOCATION_SERVICE_H_
22 #define GNUNET_REVOCATION_SERVICE_H_
57 #define GNUNET_REVOCATION_VERSION 0x00000001
62 #define GNUNET_REVOCATION_MAX_PROOF_SIZE sizeof(struct GNUNET_REVOCATION_PowP) +\
63 sizeof(struct GNUNET_IDENTITY_PublicKey) +\
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_FS_PublishContext * pc
Handle to FS-publishing operation.
static struct GNUNET_REVOCATION_Query * q
Handle for revocation query.
static struct GNUNET_TIME_Relative epoch_duration
Epoch length.
static unsigned long long matching_bits
Number of matching bits required for revocation.
static unsigned int epochs
-e option.
Identity service; implements identity management for GNUnet.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
GNUNET_GenericReturnValue
Named constants for return values.
#define GNUNET_PACKED
gcc-ism to get packed structs.
void GNUNET_REVOCATION_pow_stop(struct GNUNET_REVOCATION_PowCalculationHandle *pc)
Stop a PoW calculation.
size_t GNUNET_REVOCATION_proof_get_size(const struct GNUNET_REVOCATION_PowP *pow)
struct GNUNET_REVOCATION_Query * GNUNET_REVOCATION_query(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_IDENTITY_PublicKey *key, GNUNET_REVOCATION_Callback func, void *func_cls)
Check if a key was revoked.
void GNUNET_REVOCATION_pow_init(const struct GNUNET_IDENTITY_PrivateKey *key, struct GNUNET_REVOCATION_PowP *pow)
Initializes a fresh PoW computation.
void GNUNET_REVOCATION_query_cancel(struct GNUNET_REVOCATION_Query *q)
Cancel key revocation check.
enum GNUNET_GenericReturnValue GNUNET_REVOCATION_pow_round(struct GNUNET_REVOCATION_PowCalculationHandle *pc)
Calculate a single round in the key revocation PoW.
void GNUNET_REVOCATION_revoke_cancel(struct GNUNET_REVOCATION_Handle *h)
Cancel key revocation.
#define POW_COUNT
The proof-of-work narrowing factor.
enum GNUNET_GenericReturnValue GNUNET_REVOCATION_check_pow(const struct GNUNET_REVOCATION_PowP *pow, unsigned int matching_bits, struct GNUNET_TIME_Relative epoch_duration)
Check if the given proof-of-work is valid.
struct GNUNET_REVOCATION_PowCalculationHandle * GNUNET_REVOCATION_pow_start(struct GNUNET_REVOCATION_PowP *pow, int epochs, unsigned int difficulty)
Starts a proof-of-work calculation given the pow object as well as target epochs and difficulty.
struct GNUNET_REVOCATION_Handle * GNUNET_REVOCATION_revoke(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_REVOCATION_PowP *pow, GNUNET_REVOCATION_Callback func, void *func_cls)
Perform key revocation.
void(* GNUNET_REVOCATION_Callback)(void *cls, enum GNUNET_GenericReturnValue is_valid)
Callback to call with the result of a key revocation query.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Handle for the key revocation operation.
GNUNET_REVOCATION_Callback func
Function to call once we are done.
void * func_cls
Closure for func.
The handle to a PoW calculation.
unsigned int difficulty
The difficulty (leading zeros) to achieve.
struct GNUNET_REVOCATION_PowP * pow
The final PoW result data structure.
Struct for a proof of work as part of the revocation.
struct GNUNET_TIME_RelativeNBO ttl
The TTL of this revocation (purely informational)
uint64_t pow[32]
The PoWs.
struct GNUNET_TIME_AbsoluteNBO timestamp
The timestamp of the revocation.
Handle for the key revocation query.
void * func_cls
Closure for func.
GNUNET_REVOCATION_Callback func
Function to call with the result.
The signature object we use for the PoW.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
The signature purpose.
struct GNUNET_TIME_AbsoluteNBO timestamp
The timestamp of the revocation.
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for relative time used by GNUnet, in microseconds and in network byte order.
Time for relative time used by GNUnet, in microseconds.