Skip to content

Getting Started

Every single Zerynth hardware comes equipped with a secure element, an ATECC608 by Microchip. A secure element is a hardware component with enhanced security features: - It stores one or more immutable and unreadable secret keys that are randomly generated by Microchip - It stores one or more immutable device certificates signed by Microchip root CA and used to identify the physical device with the cloud - It provides cryptographically secure random number generation - It hardens the TLS stack by providing hardware accelerated ECDSA and SHA256 algorithms

All the above functionalities are managed under the hood by Zerynth OS, however some of them are accessible from a dedicated Python library.

from crypto import element

# Element UID
print(element.uid())

# Public Key
print(element.pubkey())

# Certificate
print(element.get_device_certificate())

# Sign with private key: Sign(SHA256(msg))
print(element.sign("Hello Zerynth!"))

Secure Element

function uid

uid(hex=True)

Return the secure element unique identifier. It can be returned in hexadecimal format or in binary depending on the value of the parameter hex.

function sha256

sha256(msg,hex=True)

Return the SHA256 of the msg. It can be returned in hexadecimal format or in binary depending on the value of the parameter hex.

function pubkey

pubkey(hex=True)

Return the secure element public key. It can be returned in hexadecimal format or in binary depending on the value of the parameter hex.

function sign

sign(msg, hex=True)

Return the signature of msg performed by applying SHA256 to msg and then signing the result with the element's private key. It can be returned in hexadecimal format or in binary depending on the value of the parameter hex.

function common_name

common_name()

Return the common name of the device as written in the device certificate. This corresponds to the physical identity of the device.