@CHIP-RTOS C Library - TCP/IP API
Crypt_AES_Decrypt
Decrypt one cipher block of an AES encrypted message. int Crypt_AES_Decrypt ( const Crypt_AES_Context *aescontext,
const void far * in,
void far * out ); Parameters
aescontext
- Pointer to
AES context structure
(key data)
in
- Pointer to 16 bytes (one cipher block)
of encrypted input data
out
- Pointer to a 16 byte
output buffer to receive the recovered "plain text" data. (This may optionally
be the same buffer as 'in' references.)
Return Value
- 0: Success
-1: failed
Comments
- The AES (Advanced Encryption Standard) is a block cipher method. This
API decrypts one block of a message. The cipher block size is 16 bytes.
Prior to calling for the first block of the message, the
Crypt_AES_MakeDecryptKey()
must be used to initialize the decryption key.
This API may be used repeatedly until your entire message has been
recovered. When your message is not an integral number of
16 byte blocks in length, then you will obtain on the final call the
pad bytes that were appended to the original message at the
encryption step.
Go here for a summary of
cipher method execution times.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
On SC1x3/SC2x (RTOS version >= 1.35, CLIB version >= 2.19) there
is also a version of this function available which uses dynamic
linking instead of the software interrupt. This reduces the
function's overhead and thus speeds up your application. This
function's name is Crypt_AES_Decrypt_Dyn, however you
should not use this function directly. Instead you should add
the define TCPIP_DYN_LINK to your program before
including the CLIB's header file(s), as follows:
#define TCPIP_DYN_LINK
#include <clib.h>
This compilation switch will map the original function's name
to the dynamic link version. In this manner, you can easily
switch existing programs over to the
dynamic link API.
Supported since or modified in @CHIP-RTOS version-
| SC12 | SC13 | SC11 | SC1x3 | SC2x |
-
| n/a | n/a | n/a | V1.11 | V1.00 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|