|
Data Structures |
| struct | mwCipher |
| | A cipher. More...
|
| struct | mwCipherInstance |
| | An instance of a cipher. More...
|
| void | mwDecrypt (const guchar *key, gsize keylen, guchar *iv, struct mwOpaque *in, struct mwOpaque *out) |
| | Decrypt data using an expanded form of the given key.
|
| void | mwDecryptExpanded (const int *ekey, guchar *iv, struct mwOpaque *in, struct mwOpaque *out) |
| | Decrypt data using an already expanded key.
|
| void | mwEncrypt (const guchar *key, gsize keylen, guchar *iv, struct mwOpaque *in, struct mwOpaque *out) |
| | Encrypt data using an expanded form of the given key.
|
| void | mwEncryptExpanded (const int *ekey, guchar *iv, struct mwOpaque *in, struct mwOpaque *out) |
| | Encrypt data using an already-expanded key.
|
| void | mwIV_init (guchar *iv) |
| | Setup an Initialization Vector.
|
| void | mwKeyExpand (int *ekey, const guchar *key, gsize keylen) |
| | Expand a variable-length key into a 128-byte key (represented as an an array of 64 ints).
|
| void | mwKeyRandom (guchar *key, gsize keylen) |
| | generate some pseudo-random bytes
|
| void | mwMpi_calculateDHShared (struct mwMpi *shared_key, struct mwMpi *remote_key, struct mwMpi *private_key) |
| | sets the shared key value based on the remote and private keys, using the Sametime Prime and Base
|
| void | mwMpi_export (struct mwMpi *i, struct mwOpaque *o) |
| | Export a value into an opaque.
|
| void | mwMpi_free (struct mwMpi *i) |
| | destroy an mpi value
|
| void | mwMpi_import (struct mwMpi *i, struct mwOpaque *o) |
| | Import a value from an opaque.
|
| mwMpi * | mwMpi_new () |
| | prepare a new mpi value
|
| void | mwMpi_randDHKeypair (struct mwMpi *private_key, struct mwMpi *public_key) |
| | sets private to a randomly generated value, and calculates public using the Sametime Prime and Base
|
| void | mwMpi_setDHBase (struct mwMpi *i) |
| | set a big integer to the Sametime Base value
|
| void | mwMpi_setDHPrime (struct mwMpi *i) |
| | set a big integer to the Sametime Prime value
|
Typedefs |
| typedef mwCipherInstance *(* | mwCipherInstantiator )(struct mwCipher *cipher, struct mwChannel *chan) |
| | Obtain an instance of a given cipher, which can be used for the processing of a single channel.
|
| typedef int(* | mwCipherProcessor )(struct mwCipherInstance *ci, struct mwOpaque *data) |
| | Process (encrypt or decrypt, depending) the given data.
|
Enumerations |
| enum | mwCipherType {
mwCipher_RC2_40 = 0x0000,
mwCipher_RC2_128 = 0x0001
} |
| | Common cipher types. More...
|
Functions |
| void | mwCipher_free (struct mwCipher *cipher) |
| | destroy a cipher
|
| const char * | mwCipher_getDesc (struct mwCipher *cipher) |
| const char * | mwCipher_getName (struct mwCipher *cipher) |
| mwSession * | mwCipher_getSession (struct mwCipher *cipher) |
| guint16 | mwCipher_getType (struct mwCipher *cipher) |
| mwCipher * | mwCipher_new_RC2_128 (struct mwSession *s) |
| mwCipher * | mwCipher_new_RC2_40 (struct mwSession *s) |
| mwCipherInstance * | mwCipher_newInstance (struct mwCipher *cipher, struct mwChannel *channel) |
| mwEncryptItem * | mwCipherInstance_accept (struct mwCipherInstance *ci) |
| | Accept a cipher offered to our channel.
|
| void | mwCipherInstance_accepted (struct mwCipherInstance *ci, struct mwEncryptItem *item) |
| | Indicates an offered cipher has been accepted.
|
| int | mwCipherInstance_decrypt (struct mwCipherInstance *ci, struct mwOpaque *data) |
| | decrypt data
|
| int | mwCipherInstance_encrypt (struct mwCipherInstance *ci, struct mwOpaque *data) |
| | encrypt data
|
| void | mwCipherInstance_free (struct mwCipherInstance *ci) |
| | destroy a cipher instance
|
| mwChannel * | mwCipherInstance_getChannel (struct mwCipherInstance *ci) |
| | reference the channel a cipher instance is attached to
|
| mwCipher * | mwCipherInstance_getCipher (struct mwCipherInstance *ci) |
| | reference the parent cipher of an instance
|
| mwEncryptItem * | mwCipherInstance_offer (struct mwCipherInstance *ci) |
| | Offer a cipher.
|
| void | mwCipherInstance_offered (struct mwCipherInstance *ci, struct mwEncryptItem *item) |
| | Indicates a cipher has been offered to our channel.
|