flux-twofish

flux-twofish —

Synopsis




#define     FLUX_TWOFISH_KEY                (key)
struct      FluxTwofishKey;
#define     flux_twofish_bits               (key)
#define     flux_twofish_len                (key)
FluxTwofishKey* flux_twofish_generate_key   (guint nbits);
FluxTwofishKey* flux_twofish_dup_key        (FluxTwofishKey *key);
void        flux_twofish_finalize_key       (FluxTwofishKey *key);
FluxTwofishKey* flux_twofish_import_key     (const guchar *key,
                                             guint keylen);
void        flux_twofish_export_key         (FluxTwofishKey *key,
                                             guchar **out,
                                             guint *len);
void        flux_twofish_import_iv          (FluxTwofishKey *key,
                                             const guchar *iv);
void        flux_twofish_export_iv          (FluxTwofishKey *key,
                                             guchar **out,
                                             guint *len);
void        flux_twofish_permute_iv         (FluxTwofishKey *key);
void        flux_twofish_encrypt_ecb        (FluxTwofishKey *ctx,
                                             guchar *out,
                                             const guchar *in);
void        flux_twofish_decrypt_ecb        (FluxTwofishKey *ctx,
                                             guchar *out,
                                             const guchar *in);
void        flux_twofish_encrypt_cbc        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in);
void        flux_twofish_decrypt_cbc        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in);
void        flux_twofish_encrypt_cfb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);
void        flux_twofish_decrypt_cfb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);
void        flux_twofish_encrypt_ofb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);
void        flux_twofish_decrypt_ofb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

Description

Details

FLUX_TWOFISH_KEY()

#define FLUX_TWOFISH_KEY(key) ((FluxTwofishKey *) key)

key :

struct FluxTwofishKey

struct FluxTwofishKey {

  FluxObject object;

  guint key_len;       /* Key length in bytes */
  guint v_pos;

  union
  {
    guchar key [32];   /* Unexpanded key */
    unsigned long __align;
  }
  key;


flux_twofish_bits()

#define flux_twofish_bits(key) ((key)->key_len << 3)  /* Returns bits */

key :

flux_twofish_len()

#define flux_twofish_len(key)  ((key)->key_len)       /* Returns bytes */

key :

flux_twofish_generate_key ()

FluxTwofishKey* flux_twofish_generate_key   (guint nbits);

nbits :
Returns :

flux_twofish_dup_key ()

FluxTwofishKey* flux_twofish_dup_key        (FluxTwofishKey *key);

key :
Returns :

flux_twofish_finalize_key ()

void        flux_twofish_finalize_key       (FluxTwofishKey *key);

key :

flux_twofish_import_key ()

FluxTwofishKey* flux_twofish_import_key     (const guchar *key,
                                             guint keylen);

key :
keylen :
Returns :

flux_twofish_export_key ()

void        flux_twofish_export_key         (FluxTwofishKey *key,
                                             guchar **out,
                                             guint *len);

key :
out :
len :

flux_twofish_import_iv ()

void        flux_twofish_import_iv          (FluxTwofishKey *key,
                                             const guchar *iv);

key :
iv :

flux_twofish_export_iv ()

void        flux_twofish_export_iv          (FluxTwofishKey *key,
                                             guchar **out,
                                             guint *len);

key :
out :
len :

flux_twofish_permute_iv ()

void        flux_twofish_permute_iv         (FluxTwofishKey *key);

key :

flux_twofish_encrypt_ecb ()

void        flux_twofish_encrypt_ecb        (FluxTwofishKey *ctx,
                                             guchar *out,
                                             const guchar *in);

ctx :
out :
in :

flux_twofish_decrypt_ecb ()

void        flux_twofish_decrypt_ecb        (FluxTwofishKey *ctx,
                                             guchar *out,
                                             const guchar *in);

ctx :
out :
in :

flux_twofish_encrypt_cbc ()

void        flux_twofish_encrypt_cbc        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in);

key :
out :
in :

flux_twofish_decrypt_cbc ()

void        flux_twofish_decrypt_cbc        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in);

key :
out :
in :

flux_twofish_encrypt_cfb ()

void        flux_twofish_encrypt_cfb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

key :
out :
in :
len :

flux_twofish_decrypt_cfb ()

void        flux_twofish_decrypt_cfb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

key :
out :
in :
len :

flux_twofish_encrypt_ofb ()

void        flux_twofish_encrypt_ofb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

key :
out :
in :
len :

flux_twofish_decrypt_ofb ()

void        flux_twofish_decrypt_ofb        (FluxTwofishKey *key,
                                             guchar *out,
                                             const guchar *in,
                                             guint len);

key :
out :
in :
len :