Flux Reference Manual |
---|
flux-rsa —
#define FLUX_RSA_KEY (key) #define FLUX_RSA_PUBLIC_KEY (key) #define FLUX_RSA_SECRET_KEY (key) struct FluxRSAKey; struct FluxRSAPublicKey; struct FluxRSASecretKey; gboolean flux_rsa_generate_keypair (guint key_size, FluxRSAPublicKey **public_key, FluxRSASecretKey **secret_key); FluxRSAKey* flux_rsa_dup_key (FluxRSAKey *key); void flux_rsa_finalize_public_key (FluxRSAPublicKey *pkey); void flux_rsa_finalize_secret_key (FluxRSASecretKey *skey); FluxRSAPublicKey* flux_rsa_import_public_key (const guchar *in, guint in_len); FluxRSASecretKey* flux_rsa_import_secret_key (const guchar *in, guint in_len); void flux_rsa_export_public_key (FluxRSAPublicKey *public_key, guchar **out, guint *out_len); void flux_rsa_export_secret_key (FluxRSASecretKey *secret_key, guchar **out, guint *out_len); guint flux_rsa_get_key_length (FluxRSAKey *key); guint flux_rsa_get_block_size (FluxRSAKey *key); void flux_rsa_encrypt (FluxRSAPublicKey *pkey, guchar **ciphertext, guint *ciphertext_len, const guchar *plaintext, guint plaintext_len); void flux_rsa_decrypt (FluxRSASecretKey *skey, guchar **plaintext, guint *plaintext_len, const guchar *ciphertext, guint ciphertext_len); void flux_rsa_sign (FluxRSASecretKey *skey, guchar **signature, guint *signature_len, const guchar *hash, guint hash_len); gboolean flux_rsa_verify (FluxRSAPublicKey *pkey, const guchar *signature, guint signature_len, const guchar *hash, guint hash_len);
gboolean flux_rsa_generate_keypair (guint key_size, FluxRSAPublicKey **public_key, FluxRSASecretKey **secret_key);
key_size : | |
public_key : | |
secret_key : | |
Returns : |
FluxRSAPublicKey* flux_rsa_import_public_key (const guchar *in, guint in_len);
in : | |
in_len : | |
Returns : |
FluxRSASecretKey* flux_rsa_import_secret_key (const guchar *in, guint in_len);
in : | |
in_len : | |
Returns : |
void flux_rsa_export_public_key (FluxRSAPublicKey *public_key, guchar **out, guint *out_len);
public_key : | |
out : | |
out_len : |
void flux_rsa_export_secret_key (FluxRSASecretKey *secret_key, guchar **out, guint *out_len);
secret_key : | |
out : | |
out_len : |
void flux_rsa_encrypt (FluxRSAPublicKey *pkey, guchar **ciphertext, guint *ciphertext_len, const guchar *plaintext, guint plaintext_len);
pkey : | |
ciphertext : | |
ciphertext_len : | |
plaintext : | |
plaintext_len : |
void flux_rsa_decrypt (FluxRSASecretKey *skey, guchar **plaintext, guint *plaintext_len, const guchar *ciphertext, guint ciphertext_len);
skey : | |
plaintext : | |
plaintext_len : | |
ciphertext : | |
ciphertext_len : |
void flux_rsa_sign (FluxRSASecretKey *skey, guchar **signature, guint *signature_len, const guchar *hash, guint hash_len);
skey : | |
signature : | |
signature_len : | |
hash : | |
hash_len : |
gboolean flux_rsa_verify (FluxRSAPublicKey *pkey, const guchar *signature, guint signature_len, const guchar *hash, guint hash_len);
pkey : | |
signature : | |
signature_len : | |
hash : | |
hash_len : | |
Returns : |
<< flux-elgamal | flux-cipher >> |