![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "config.h"#include "config_unix.h"#include "config_win32.h"#include "debug.h"#include "crypt_aes_impl.h"#include "crypt_aes.h"
Go to the source code of this file.
Functions | |
| int | blockDecrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) |
| int | blockEncrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer) |
| int | cipherInit (cipherInstance *cipher, BYTE mode, char *IV) |
| int | cipherUpdateRounds (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputLen, BYTE *outBuffer, int rounds) |
| int | makeKey (keyInstance *key, BYTE direction, int keyLen, const char *keyMaterial) |
| int | padDecrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputOctets, BYTE *outBuffer) |
| int | padEncrypt (cipherInstance *cipher, keyInstance *key, BYTE *input, int inputOctets, BYTE *outBuffer) |
| int blockDecrypt | ( | cipherInstance * | cipher, |
| keyInstance * | key, | ||
| BYTE * | input, | ||
| int | inputLen, | ||
| BYTE * | outBuffer ) |
Definition at line 287 of file crypt_aes.c.
References BAD_CIPHER_STATE, DIR_ENCRYPT, cipherInstance::IV, key, cipherInstance::mode, MODE_CBC, MODE_CFB1, MODE_ECB, rijndaelDecrypt(), and rijndaelEncrypt().
Referenced by rijndael_decrypt(), rijndaelCBC_MCT(), rijndaelECB_MCT(), rijndaelTKAT(), and rijndaelVKKAT().

| int blockEncrypt | ( | cipherInstance * | cipher, |
| keyInstance * | key, | ||
| BYTE * | input, | ||
| int | inputLen, | ||
| BYTE * | outBuffer ) |
Definition at line 145 of file crypt_aes.c.
References BAD_CIPHER_STATE, DIR_DECRYPT, cipherInstance::IV, key, cipherInstance::mode, MODE_CBC, MODE_CFB1, MODE_ECB, and rijndaelEncrypt().
Referenced by rijndael_encrypt(), rijndaelCBC_MCT(), rijndaelECB_MCT(), rijndaelTKAT(), rijndaelVKKAT(), and rijndaelVTKAT().

| int cipherInit | ( | cipherInstance * | cipher, |
| BYTE | mode, | ||
| char * | IV ) |
Definition at line 105 of file crypt_aes.c.
References BAD_CIPHER_INSTANCE, BAD_CIPHER_MODE, cipherInstance::IV, MAX_IV_SIZE, cipherInstance::mode, mode, MODE_CBC, MODE_CFB1, MODE_ECB, and TRUE.
Referenced by rijndael_initialize(), rijndaelCBC_MCT(), rijndaelECB_MCT(), rijndaelIVKAT(), rijndaelTKAT(), rijndaelVKKAT(), and rijndaelVTKAT().
| int cipherUpdateRounds | ( | cipherInstance * | cipher, |
| keyInstance * | key, | ||
| BYTE * | input, | ||
| int | inputLen, | ||
| BYTE * | outBuffer, | ||
| int | rounds ) |
cipherUpdateRounds:
Encrypts/Decrypts exactly one full block a specified number of rounds. Only used in the Intermediate Value Known Answer Test.
Returns: TRUE - on success BAD_CIPHER_STATE - cipher in bad state (e.g., not initialized)
Definition at line 444 of file crypt_aes.c.
References BAD_CIPHER_STATE, BAD_KEY_DIR, DIR_DECRYPT, DIR_ENCRYPT, key, rijndaelDecryptRound(), rijndaelEncryptRound(), TRUE, and UNUSED.
Referenced by rijndaelIVKAT().

| int makeKey | ( | keyInstance * | key, |
| BYTE | direction, | ||
| int | keyLen, | ||
| const char * | keyMaterial ) |
rijndael-api-fst.c
Optimised ANSI C code for the Rijndael cipher (now AES)
This code is hereby placed in the public domain.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Acknowledgements:
We are deeply indebted to the following people for their bug reports, fixes, and improvement suggestions to this implementation. Though we tried to list all contributions, we apologise in advance for any missing reference.
Andrew Bales Andre.nosp@m.w.Ba.nosp@m.les@H.nosp@m.oney.nosp@m.well..nosp@m.com Markus Friedl marku.nosp@m.s.fr.nosp@m.iedl@.nosp@m.info.nosp@m.rmati.nosp@m.k.un.nosp@m.i-erl.nosp@m.ange.nosp@m.n.de John Skodon skodo.nosp@m.nj@w.nosp@m.ebqui.nosp@m.ll.c.nosp@m.om
Definition at line 45 of file crypt_aes.c.
References BAD_KEY_DIR, BAD_KEY_INSTANCE, BAD_KEY_MAT, DIR_DECRYPT, DIR_ENCRYPT, key, MAXKB, rijndaelKeySetupDec(), rijndaelKeySetupEnc(), and TRUE.
Referenced by rijndael_initialize(), rijndaelCBC_MCT(), rijndaelECB_MCT(), rijndaelIVKAT(), rijndaelTKAT(), rijndaelVKKAT(), and rijndaelVTKAT().

| int padDecrypt | ( | cipherInstance * | cipher, |
| keyInstance * | key, | ||
| BYTE * | input, | ||
| int | inputOctets, | ||
| BYTE * | outBuffer ) |
Definition at line 356 of file crypt_aes.c.
References BAD_CIPHER_STATE, BAD_DATA, DIR_ENCRYPT, cipherInstance::IV, key, cipherInstance::mode, MODE_CBC, MODE_ECB, and rijndaelDecrypt().

| int padEncrypt | ( | cipherInstance * | cipher, |
| keyInstance * | key, | ||
| BYTE * | input, | ||
| int | inputOctets, | ||
| BYTE * | outBuffer ) |
Encrypt data partitioned in octets, using RFC 2040-like padding.
| input | data to be encrypted (octet sequence) |
| inputOctets | input length in octets (not bits) |
| outBuffer | encrypted output data |
Definition at line 224 of file crypt_aes.c.
References BAD_CIPHER_STATE, DIR_DECRYPT, cipherInstance::IV, key, cipherInstance::mode, MODE_CBC, MODE_ECB, and rijndaelEncrypt().
