ltc_des

Overview

This project is a demonstration program that uses the KSDK software for encryption/decryption some data using DES-cbc and DES3-cbc method.

Prepare the Demo

Connect a serial cable from the debug UART port of the board to the PC. Start Tera Term (http://ttssh2.osdn.jp) and make a connection to the virtual serial port.

  1. Start Tera Term

  2. New connection -> Serial

  3. Set apropriate COMx port (x is port number) in Port context menu. Number is provided by operation system and could be different from computer to computer. Select COM number related to virtual serial port. Confirm selected port by OK button.

  4. Set following connection parameters in menu Setup->Serial port… Baud rate: 115200 Data: 8 Parity: none Stop: 1 Flow control: one

  5. Confirm selected parameters by OK button.

Running the demo

When the demo runs successfully, from the terminal you can see:

……………………….. LTC (DES) 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.

———————————– DES-CBC method ————————————– DES CBC Encryption of 320 bytes. DES CBC encryption finished.

DES CBC Decryption of 320 bytes. DES 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.

———————————– DES3-CBC method ————————————– DES3 CBC Encryption of 320 bytes. DES3 CBC encryption finished.

DES3 CBC decryption of 320 bytes. DES3 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.

………….. THE END OF THE LTC (DES) DRIVER EXAMPLE …………………………..