Skip to content

Modified AES-128 CCM code for working with Cypress PSOC 4 encoding functions. Based on OpenSSL

Notifications You must be signed in to change notification settings

ImanHz/aes-ccm-psoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AES128 CCM code compatible with PSOC 4

Modified AES-128 CCM code for working with Cypress PSOC 4 encoding functions. Based on OpenSSL

Some Notes

  • PSOC4 uses AES-CCM 128 bits which is popular in BLE standard.
  • IV (=Initial Vector) is named "nonce" in PSOC terminology and is 13 bytes.
  • Tag is named MIC and is 4 bytes.
  • According to PSOC docs a {1} array should be used for AAD
  • Plaintext is the raw data. Its size is limited to 27 bytes in PSOC functions.

Here I use OpenSSL library. To install it on linux do the followings:

  1. Install the library:
  • sudo apt install libss-dev
  1. Find the location of installed library. On Ubuntu 18 and 20 {OPENSSL_LOCATION} = /usr/lib/x86_64-linux-gnu/
  • dpkg-query -L libssl-dev
  1. Add this parameters to GCC for compiling. You can use MakeFile as well:
  • gcc XXX.c XXXXX.c -L{OPENSSL_LOCATION} -lcrypto -lssl

About

Modified AES-128 CCM code for working with Cypress PSOC 4 encoding functions. Based on OpenSSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages