corrected copyright notices
[gnutls.git] / doc / cha-crypto.texi
blob157d66079bec5cac66d6f60dabe5b92efedf45c0
1 @node Using GnuTLS as a cryptographic library
2 @chapter Using GnuTLS as a cryptographic library
4 @acronym{GnuTLS} is not a low-level cryptographic library, i.e., 
5 it does not provide access to basic cryptographic primitives. However
6 it abstracts the internal cryptographic back-end (see @ref{Cryptographic Backend}),
7 providing symmetric crypto, hash and HMAC algorithms, as well access
8 to the random number generation.
10 @menu
11 * Encryption algorithms::
12 * Hash and HMAC functions::
13 * Random number generation::
14 @end menu
16 @node Encryption algorithms
17 @section Encryption algorithms
18 @cindex encryption algorithms
19 @cindex symmetric cryptography
21 The available functions to access symmetric crypto algorithms operations
22 are shown below. The supported algorithms are the algorithms required by the TLS protocol.
23 They are listed in @ref{tab:ciphers}.
25 @showfuncE{gnutls_cipher_init,gnutls_cipher_encrypt2,gnutls_cipher_decrypt2,gnutls_cipher_set_iv,gnutls_cipher_deinit}
27 In order to support authenticated encryption with associated data (AEAD) algorithms the following
28 functions are provided to set the associated data and retrieve the authentication tag.
30 @showfuncB{gnutls_cipher_add_auth,gnutls_cipher_tag}
32 @node Hash and HMAC functions
33 @section Hash and HMAC functions
34 @cindex hash functions
35 @cindex HMAC functions
37 The available operations to access hash functions and hash-MAC (HMAC) algorithms
38 are shown below. HMAC algorithms provided keyed hash functionality. They supported HMAC algorithms are listed in @ref{tab:macs}.
40 @showfuncF{gnutls_hmac_init,gnutls_hmac,gnutls_hmac_output,gnutls_hmac_deinit,gnutls_hmac_get_len,gnutls_hmac_fast}
42 The available functions to access hash functions are shown below. The supported hash functions
43 are the same as the HMAC algorithms.
45 @showfuncF{gnutls_hash_init,gnutls_hash,gnutls_hash_output,gnutls_hash_deinit,gnutls_hash_get_len,gnutls_hash_fast}
46 @showfuncA{gnutls_fingerprint}
48 @node Random number generation
49 @section Random number generation
50 @cindex random numbers
52 Access to the random number generator is provided using the @funcref{gnutls_rnd}
53 function. It allows obtaining random data of various levels.
55 @showenumdesc{gnutls_rnd_level_t,The random number levels.}
56 @showfuncdesc{gnutls_rnd}