ltc_aes#
Overview#
This project is a demonstration program that uses the KSDK software for encryption/decryption sample data using AES-CBC, AES-CCM, and XCBC-MAC algorithm.
Running the demo#
When the demo runs successfully, from the terminal you can see:
……………………….. LTC (AES) DRIVER EXAMPLE ………………………..
Testing input string: Once upon a midnight dreary, while I pondered weak and weary, Over many a quaint and curious volume of forgotten lore, While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door Its some visitor, I muttered, tapping at my chamber door Only this, and nothing more.
———————————– AES-CBC method ————————————– AES CBC Encryption of 320 bytes. AES CBC encryption finished.
AES CBC Decryption of 320 bytes. AES CBC decryption finished. Decrypted string : Once upon a midnight dreary, while I pondered weak and weary, Over many a quaint and curious volume of forgotten lore, While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door Its some visitor, I muttered, tapping at my chamber door Only this, and nothing more.
———————————– AES-CCM method ————————————– AES CCM Encryption of 320 bytes. using iv length : 12 bytes using aad length : 20 bytes using key length : 16 bytes using tag length : 8 bytes AES CCM encryption finished.
AES CCM decryption of 320 bytes. AES CCM decryption finished. Decrypted string: Once upon a midnight dreary, while I pondered weak and weary, Over many a quaint and curious volume of forgotten lore, While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door Its some visitor, I muttered, tapping at my chamber door Only this, and nothing more.
———————————– AES-CMAC —————————————— AES CMAC Computing hash of 320 bytes Computed hash: ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
………….. THE END OF THE LTC (AES) DRIVER EXAMPLE …………………………..
Supported Boards#
EVK-MCIMX7ULP
Hardware requirements
Micro USB cable
MCIMX7ULP-EVK board
J-Link Debug Probe
5V power supply
Personal Computer
Board settings
No special settings are required.
Please note this application can’t support running with Linux BSP!
Prepare the Demo
Connect 5V power supply and J-Link Debug Probe to the board, switch SW1 to power on the board.
Connect a micro USB cable between the host PC and the J6 USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the example.
FRDM-MCXW71
Hardware requirements
Type-C USB cable
FRDM-MCXW71 Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-XCBC-MAC --------------------------------------
AES XCBC-MAC Computing hash of 320 bytes
Error: hash compare
Computed hash:
51 e6 f 4e dc 74 42 76 a2 8a e4 d8 3 81 2f 37
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
MCX-W71-EVK
Hardware requirements
Type-C USB cable
MCX-W71-EVK Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-XCBC-MAC --------------------------------------
AES XCBC-MAC Computing hash of 320 bytes
Error: hash compare
Computed hash:
51 e6 f 4e dc 74 42 76 a2 8a e4 d8 3 81 2f 37
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
KW45B41Z-EVK
Hardware requirements
Mini/micro USB cable
KW45B41Z-EVK Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary,
while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded,
nearly napping,
suddenly there came a tapping,
As of some one gently rapping,
rapping at my chamber doorIts some visitor,
I muttered,
tapping at my chamber doorOnly this,
and nothing more.
----------------------------------- AES-XCBC-MAC --------------------------------------
AES XCBC-MAC Computing hash of 320 bytes
Error: hash compare
Computed hash:
51 e6 f 4e dc 74 42 76 a2 8a e4 d8 3 81 2f 37
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
KW47-EVK
Hardware requirements
Type-C USB cable
KW47-EVK Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
MCX-W72-EVK
Hardware requirements
Type-C USB cable
MCX-W72-EVK Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
KW47-LOC
Hardware requirements
Type-C USB cable
KW47-LOC Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
MCXW72-LOC
Hardware requirements
Type-C USB cable
MCXW72-LOC Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
FRDM-MCXW72
Hardware requirements
Type-C USB cable
FRDM-MCXW72 Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
FRDM-KW43
Hardware requirements
Type-C USB cable
FRDM-KW43 Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................
FRDM-MCXW70
Hardware requirements
Type-C USB cable
FRDM-MCXW70 Board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
............................. LTC (AES) DRIVER EXAMPLE .............................
Testing input string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CBC method --------------------------------------
AES CBC Encryption of 320 bytes.
AES CBC encryption finished.
AES CBC Decryption of 320 bytes.
AES CBC decryption finished.
Decrypted string :
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CCM method --------------------------------------
AES CCM Encryption of 320 bytes.
using iv length : 12 bytes
using aad length : 20 bytes
using key length : 16 bytes
using tag length : 8 bytes
AES CCM encryption finished.
AES CCM decryption of 320 bytes.
AES CCM decryption finished.
Decrypted string:
Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door
Its some visitor, I muttered, tapping at my chamber door
Only this, and nothing more.
----------------------------------- AES-CMAC ------------------------------------------
AES CMAC Computing hash of 320 bytes
Computed hash:
ba fd 2c 65 a 62 7c 18 a0 df b4 20 bb fb 68 27
.............. THE END OF THE LTC (AES) DRIVER EXAMPLE ................................