Flux Reference Manual |
---|
flux-elgamal —
#define FLUX_ELGAMAL_KEY (key) #define FLUX_ELGAMAL_PUBLIC_KEY (key) #define FLUX_ELGAMAL_SECRET_KEY (key) struct FluxElgamalKey; struct FluxElgamalPublicKey; struct FluxElgamalSecretKey; gboolean flux_elgamal_generate_keypair (guint key_length, FluxElgamalPublicKey **public_key, FluxElgamalSecretKey **secret_key); FluxElgamalKey* flux_elgamal_dup_key (FluxElgamalKey *key); void flux_elgamal_finalize_secret_key (FluxElgamalSecretKey *skey); void flux_elgamal_finalize_public_key (FluxElgamalPublicKey *pkey); FluxElgamalPublicKey* flux_elgamal_import_public_key (const guchar *in, guint in_len); FluxElgamalSecretKey* flux_elgamal_import_secret_key (const guchar *in, guint in_len); void flux_elgamal_export_public_key (FluxElgamalPublicKey *public_key, guchar **out, guint *out_len); void flux_elgamal_export_secret_key (FluxElgamalSecretKey *secret_key, guchar **out, guint *out_len); guint flux_elgamal_get_key_length (FluxElgamalKey *key); guint flux_elgamal_get_block_size (FluxElgamalKey *key); void flux_elgamal_encrypt (FluxElgamalPublicKey *pkey, guchar **ciphertext, guint *ciphertext_len, const guchar *plaintext, guint plaintext_len); void flux_elgamal_decrypt (FluxElgamalSecretKey *skey, guchar **plaintext, guint *plaintext_len, const guchar *ciphertext, guint ciphertext_len); void flux_elgamal_sign (FluxElgamalSecretKey *skey, guchar **signature, guint *signature_len, const guchar *hash, guint hash_len); gboolean flux_elgamal_verify (FluxElgamalPublicKey *pkey, const guchar *signature, guint signature_len, const guchar *hash, guint hash_len);
gboolean flux_elgamal_generate_keypair (guint key_length, FluxElgamalPublicKey **public_key, FluxElgamalSecretKey **secret_key);
key_length : | |
public_key : | |
secret_key : | |
Returns : |
void flux_elgamal_finalize_secret_key (FluxElgamalSecretKey *skey);
skey : |
void flux_elgamal_finalize_public_key (FluxElgamalPublicKey *pkey);
pkey : |
FluxElgamalPublicKey* flux_elgamal_import_public_key (const guchar *in, guint in_len);
in : | |
in_len : | |
Returns : |
FluxElgamalSecretKey* flux_elgamal_import_secret_key (const guchar *in, guint in_len);
in : | |
in_len : | |
Returns : |
void flux_elgamal_export_public_key (FluxElgamalPublicKey *public_key, guchar **out, guint *out_len);
public_key : | |
out : | |
out_len : |
void flux_elgamal_export_secret_key (FluxElgamalSecretKey *secret_key, guchar **out, guint *out_len);
secret_key : | |
out : | |
out_len : |
guint flux_elgamal_get_key_length (FluxElgamalKey *key);
key : | |
Returns : |
guint flux_elgamal_get_block_size (FluxElgamalKey *key);
key : | |
Returns : |
void flux_elgamal_encrypt (FluxElgamalPublicKey *pkey, guchar **ciphertext, guint *ciphertext_len, const guchar *plaintext, guint plaintext_len);
pkey : | |
ciphertext : | |
ciphertext_len : | |
plaintext : | |
plaintext_len : |
void flux_elgamal_decrypt (FluxElgamalSecretKey *skey, guchar **plaintext, guint *plaintext_len, const guchar *ciphertext, guint ciphertext_len);
skey : | |
plaintext : | |
plaintext_len : | |
ciphertext : | |
ciphertext_len : |
void flux_elgamal_sign (FluxElgamalSecretKey *skey, guchar **signature, guint *signature_len, const guchar *hash, guint hash_len);
skey : | |
signature : | |
signature_len : | |
hash : | |
hash_len : |
gboolean flux_elgamal_verify (FluxElgamalPublicKey *pkey, const guchar *signature, guint signature_len, const guchar *hash, guint hash_len);
pkey : | |
signature : | |
signature_len : | |
hash : | |
hash_len : | |
Returns : |
<< flux-twofish | flux-rsa >> |