Skip to content
The SDK to connect to the RIDDLE&CODE Secure Element
C C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin now tracking the cryptoauthlib shared object Aug 21, 2018
golang Merge branch 'master' of… Aug 22, 2018
inc initial commit Aug 20, 2018
.gitignore now tracking compiled go code Aug 21, 2018 Update Feb 6, 2019
license.txt initial commit Aug 20, 2018

SDK for I²C communication with the RIDDLE&CODE Secure Element

This SDK includes precompiled cryptoauth libraries, header files, and wrapper code for several languages to connect to the RIDDLE&CODE Secure Element via the I²C protocol on various devices.

A generic overview on how to integrate the Secure Element to various boards can be found here.

The SDK has the following structure

  • inc The include files needed to utilize the library.
  • lib precompiled libraries (for several architectures: e.g. arm raspberry pi).
  • golang The wrapper for the Go Language as well as some golang sample code.

The C library

The C libraries are available as shared objects and can be loaded into several languages. The corresponding header files are within the inc folder.

Go wrapper

Using the go wrapper comes with two installation steps

  • Copy the c library from the lib folder to a path contained in LDPATH of the system or to the golang folder if the command is run from there.
  • Add the pkg to your GOPATH

The golang/ script just executes these two steps as shown below

sudo cp ../bin/ /usr/lib
cp -R src $GOPATH/.
cp -R pkg $GOPATH/.

Thereafter, the library can be utilized as needed. The concept of the provided Go API is shown in the golang/random_example.go example file.


package main

// Example program demonstrating the usage of Random.
import (

	// import the go-cryptoauthlib package into element
	element ""

func main(t *testing.T) {
	// element.Random() returns 32 bytes of random data
	randomBytes := element.Random()
	// print the data to the console
	fmt.Printf("randomBytes:\n%s\n", hex.Dump(randomBytes))
You can’t perform that action at this time.