Run an ECC demo on Freedom-KL26Z

Document created by W.p. Liu Employee on Mar 29, 2015Last modified by ebiz_ws_prod on Dec 13, 2017
Version 4Show Document
  • View in full screen mode

       RSA is a major cryptosystem in the public key cryptography. It is wildly used nowadays.  But why are we interested in elliptic

   curve cryptography?

  1. The smaller parameters can be used in elliptic curve cryptography (ECC) than with  RSA systems at a given security level.

 

 

  2. In particular, private-key operations (such as signature generation and decryption) for ECC are many times more efficient 

      than RSA private-key operations.

 

  3. Public-key operations (such as signature verification and encryption) for ECC are more efficient than RSA if a  bigger
      encryption exponent e is selected for RSA.

 

        The advantages offered by ECC can be important in environments where processing
    power, storage, bandwidth, or power consumption is constrained.

 

 

         KL26Z MCU is 48 MHz ARM Cortex-M0+ core, there are only 128K ROM and 16K RAM on chip. When you want to use the

   public key cryptography, the elliptic curve cryptography may be a good choice for this low cost MCU.

 

     This example implements a simple ECC certification from PC to USB.  After certification,
    USB can get encrypted data from PC and decrypt these data to plain text.

 

KL26-Freedom :

1.   Open the porject file at folder kecc/build/cw/KECC/kl26_ecc/test

project_dir.PNG.png

 

2.  Build the image and flush it with OpenSDA.

KECC_PJT.PNG.png

 

3. Open the Tera Term and start running image on KL26Z

Tera_Term_start.PNG.png

 

 

PC running environment:

 

  1. Install  these packets on PC:

        python-2.7.3.msi, pycrypto-2.6.win32-py2.7.exe, pyserial-2.7.win32.exe and pywin32-219.win32-py2.7

 

  setup.PNG.png

 

  2. Connect USB cable to KL26Z Freedom and install the CDC driver with
      Freescale_CDC_Driver_Kinetis.inf driver

cdc.PNG.png

 

 

3. Open the application folder and run the usbkey.py.

 

usbkey.PNG.png

 

usbkey_run.PNG.png

 

 

 

 

    4. If USB admits  PC certification message, then PC can put encrypted data to USB.  

 

test.PNG.png

 

 

 

    This  demo only tested on WIN7 64bit. IF you can't
open the CDC port, you need reset the KL26Z freedom board and restart the
usbkey.py.

 

 

This ECC demo uses a library including some security toolkits for ECC certification.

    1. Signature and verify : ECDSA

    2. Key exchanging         :ECCRYPT

   3.  Digest                         : SHA1

   4. Symmetric   cipher     : AES and base64

 

   All tools and codes are in following KECC.zip.

Original Attachment has been moved to: kecc.zip

Attachments

    Outcomes