GNUnet 0.21.1
gnunet_secretsharing_service.h File Reference
#include "gnunet_common.h"
#include "gnunet_time_lib.h"
#include "gnunet_configuration_lib.h"
#include <gcrypt.h>
Include dependency graph for gnunet_secretsharing_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_SECRETSHARING_PublicKey
 Public key of a group sharing a secret. More...
 
struct  GNUNET_SECRETSHARING_Ciphertext
 Encrypted field element. More...
 
struct  GNUNET_SECRETSHARING_Plaintext
 Plain, unencrypted message that can be encrypted with a group public key. More...
 

Macros

#define GNUNET_SECRETSHARING_ELGAMAL_BITS   1024
 Number of bits for secretsharing elements. More...
 
#define GNUNET_SECRETSHARING_ELGAMAL_P_HEX
 The q-parameter for ElGamal encryption, a 1024-bit safe prime. More...
 
#define GNUNET_SECRETSHARING_ELGAMAL_Q_HEX
 The q-parameter for ElGamal encryption, a 1023-bit Sophie Germain prime, q = (p-1)/2. More...
 
#define GNUNET_SECRETSHARING_ELGAMAL_G_HEX
 The g-parameter for ElGamal encryption, a generator of the unique size q subgroup of Z_p^*. More...
 

Typedefs

typedef void(* GNUNET_SECRETSHARING_SecretReadyCallback) (void *cls, struct GNUNET_SECRETSHARING_Share *my_share, struct GNUNET_SECRETSHARING_PublicKey *public_key, unsigned int num_ready_peers, const struct GNUNET_PeerIdentity *ready_peers)
 Called once the secret has been established with all peers, or the deadline is due. More...
 
typedef void(* GNUNET_SECRETSHARING_DecryptCallback) (void *cls, const struct GNUNET_SECRETSHARING_Plaintext *plaintext)
 Called when a decryption has succeeded. More...
 

Functions

struct GNUNET_SECRETSHARING_SessionGNUNET_SECRETSHARING_create_session (const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int num_peers, const struct GNUNET_PeerIdentity *peers, const struct GNUNET_HashCode *session_id, struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Absolute deadline, unsigned int threshold, GNUNET_SECRETSHARING_SecretReadyCallback cb, void *cls)
 Create a session that will eventually establish a shared secret with the other peers. More...
 
void GNUNET_SECRETSHARING_session_destroy (struct GNUNET_SECRETSHARING_Session *s)
 Destroy a secret sharing session. More...
 
int GNUNET_SECRETSHARING_encrypt (const struct GNUNET_SECRETSHARING_PublicKey *public_key, const struct GNUNET_SECRETSHARING_Plaintext *plaintext, struct GNUNET_SECRETSHARING_Ciphertext *result_ciphertext)
 Encrypt a value. More...
 
struct GNUNET_SECRETSHARING_DecryptionHandleGNUNET_SECRETSHARING_decrypt (const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_SECRETSHARING_Share *share, const struct GNUNET_SECRETSHARING_Ciphertext *ciphertext, struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Absolute deadline, GNUNET_SECRETSHARING_DecryptCallback decrypt_cb, void *decrypt_cb_cls)
 Publish the given ciphertext for decryption. More...
 
void GNUNET_SECRETSHARING_decrypt_cancel (struct GNUNET_SECRETSHARING_DecryptionHandle *dh)
 Cancel a decryption. More...
 
struct GNUNET_SECRETSHARING_ShareGNUNET_SECRETSHARING_share_read (const void *data, size_t len, size_t *readlen)
 Read a share from its binary representation. More...
 
int GNUNET_SECRETSHARING_share_write (const struct GNUNET_SECRETSHARING_Share *share, void *buf, size_t buflen, size_t *writelen)
 Convert a share to its binary representation. More...
 
void GNUNET_SECRETSHARING_share_destroy (struct GNUNET_SECRETSHARING_Share *share)
 
int GNUNET_SECRETSHARING_plaintext_generate (struct GNUNET_SECRETSHARING_Plaintext *plaintext, gcry_mpi_t exponent)
 
int GNUNET_SECRETSHARING_plaintext_generate_i (struct GNUNET_SECRETSHARING_Plaintext *plaintext, int64_t exponent)
 

Detailed Description

Author
Florian Dold

Verifiable additive secret sharing and cooperative decryption

Definition in file gnunet_secretsharing_service.h.