diff options
author | Erwin Nindl <nine@wirdorange.org> | 2007-06-22 13:59:20 +0000 |
---|---|---|
committer | Erwin Nindl <nine@wirdorange.org> | 2007-06-22 13:59:20 +0000 |
commit | 0275479cb56c7f562f3513fef66c83fc44d1d8c9 (patch) | |
tree | f6fbb703cebf62d18b05e2a5e7591ac08c5b6702 /srtp/doc/crypto_kernel.txt | |
parent | satp internet draft 00 final ietf version (diff) |
added libsrtp to svn
Diffstat (limited to 'srtp/doc/crypto_kernel.txt')
-rw-r--r-- | srtp/doc/crypto_kernel.txt | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/srtp/doc/crypto_kernel.txt b/srtp/doc/crypto_kernel.txt new file mode 100644 index 0000000..b0d033f --- /dev/null +++ b/srtp/doc/crypto_kernel.txt @@ -0,0 +1,76 @@ +/** + +@defgroup CryptoKernel Cryptographic Kernel + +All of the cryptographic functions are contained in a kernel. + +*/ + +/** + +@defgroup CipherImplementations Ciphers +@ingroup CryptoKernel + +@brief A generic cipher type enables cipher agility, that is, the +ability to write code that runs with multiple cipher types. +Ciphers can be used through the crypto kernel, or can be accessed +directly, if need be. + +@{ + +*/ + +/** + * @brief Allocates a cipher of a particular type. + * @warning May be implemented as a macro. + */ +err_status_t +cipher_type_alloc(cipher_type_t *ctype, cipher_t **cipher, + unsigned key_len); + +/** + * @brief Initialized a cipher to use a particular key. May + * be invoked more than once on the same cipher. + * @warning May be implemented as a macro. + */ + +err_status_t +cipher_init(cipher_t *cipher, const uint8_t *key); + +/** + * @brief Sets the initialization vector of a given cipher. + * @warning May be implemented as a macro. + */ + +err_status_t +cipher_set_iv(cipher_t *cipher, void *iv); + +/** + * @brief Encrypts a buffer with a given cipher. + * @warning May be implemented as a macro. + */ + +err_status_t +cipher_encrypt(cipher_t *cipher, void *buf, unsigned int *len); + +/** + * @brief Sets a buffer to the keystream generated by the cipher. + * @warning May be implemented as a macro. + */ +err_status_t +cipher_output(cipher_t *c, uint8_t *buffer, int num_octets_to_output); + +/** + * @brief Deallocates a cipher. + * @warning May be implemented as a macro. + */ +err_status_t +cipher_dealloc(cipher_t *cipher); + + + +/** + * @} + */ + + */
\ No newline at end of file |