Next: Hashing and MACing Subsystem Architecture, Previous: Public-Key Subsystem Architecture, Up: 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:
gcry_cipher_opengcry_cipher_closegcry_cipher_setkeygcry_cipher_setivgcry_cipher_encryptgcry_cipher_decryptThere are also functions to query properties of algorithms or context, like block length, key length, map names or to enable features like padding methods.