manpagez: man pages & more
info gcrypt
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.2 Symmetric Encryption Subsystem Architecture

The interface to work with symmetric encryption algorithms is made up of functions from the gcry_cipher_ name space. The implementation follows the open-use-close paradigm and uses registered algorithm modules for the actual work. Unless a module implements optimized cipher mode implementations, the high level code (‘cipher/cipher.c’) implements the modes and calls the core algorithm functions to process each block.

The most important functions are:


Create a new instance to encrypt or decrypt using a specified algorithm and mode.


Release an instance.


Set a key to be used for encryption or decryption.


Set an initialization vector to be used for encryption or decryption.


Encrypt or decrypt data. These functions may be called with arbitrary amounts of data and as often as needed to encrypt or decrypt all data.

There are also functions to query properties of algorithms or context, like block length, key length, map names or to enable features like padding methods.

This document was generated on February 9, 2014 using texi2html 5.0.

© 2000-2023
Individual documents may contain additional copyright information.