RSA is a major cryptosystem in the public key cryptography. It is wildly used nowadays. But why are we interested in elliptic
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.
1. Open the porject file at folder kecc/build/cw/KECC/kl26_ecc/test
2. Build the image and flush it with OpenSDA.
3. Open the Tera Term and start running image on KL26Z
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
2. Connect USB cable to KL26Z Freedom and install the CDC driver with
3. Open the application folder and run the usbkey.py.
4. If USB admits PC certification message, then PC can put encrypted data to USB.
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
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.