Encrypted Read/Write: Passing Encrypted Data to Your Authenticated Cartridge
This blog post reviews how a host-to-client data bus can be encrypted to enhance the trustworthiness of a given cartridge.
How a Host-To-Client Data Bus Can Be Encrypted to Enhance the Trustworthiness of a Given Cartridge
Many consumer applications utilize disposable or otherwise interchangeable modules that must be trusted. Refrigerators, water filtration systems and many medical devices all have parts that need to be swapped out as they age. So how can we be sure that these parts haven’t been replaced with counterfeits, tampered with or compromised in any way? Here, we explore how a host-to-client data bus can be encrypted to enhance the trustworthiness of a given cartridge.
This type of solution leverages both symmetric and asymmetric encryption techniques using two ATECC608 devices, one in the host device and one in the client (cartridge or disposable). Specifically, we use Elliptic-Curve Diffie-Hellman (ECDH) curves. To learn more about the basics of cryptography, take this Microchip University course on Cryptography Primer.
As an example, we’ll use a fridge and a water filter that needs to be authenticated as from the manufacturer. With both the fridge and a given filter each having their own ATECC608 devices as secure key storage, the first step is to establish a chain of trust. The filter sends its manufacturer certificate to the host, where its signature is verified using the host’s key. A similar step is then followed to verify the filter’s device certificate. Finally, we send a challenge (NONCE) to the filter which will sign it using the host’s private key. If the filter can verify the signature, the fridge can consider the filter trusted.
Now, despite the trustworthiness of the filter, we have another problem to address. How can the product owner send a set of data into the client ATECC608 over an encrypted bus to keep the data confidential and permanently stored in the client ATECC608? Scenarios such as pushing manufacturing data or public keys into the secure authentication IC could benefit from such implementation. For this use case, we use another feature of the ATECC608 to generate keys which encrypt the bus traffic.
This process starts with the host and client ATECC608 devices running an ECDH command on their unique public keys to output ephemeral keys. These are then written to their own internal “TempKey” registers. The ATECC608 devices then send these ephemeral public keys to each other on the bus. Both host and client can then derive an identical ephemeral symmetric key from these ephemeral public keys using ECDH.
Finally, we create a unique ephemeral symmetric key by running a Key Derivation Function (KDF) on the ephemeral symmetric key.
Now, the host can send data such as manufacturing IDs and public keys across the bus which is encrypted using its unique ephemeral symmetric key. This data is then decrypted by the filter ATECC608.
To recap, we’ve used certificates to establish trust between devices and created new unique ephemeral symmetric keys used to encrypt any traffic on the data bus. With each symmetric key being unique to a system, we mitigate the proliferation of physical attacks. See the transaction diagram below which details the steps of setting up the encrypted read/write.
This solution and others can be configured through Microchip’s Trust Platform Design Suite (TPDS) as a TrustCUSTOM configuration.
The TrustCUSTOM configurator is available under NDA. To get started, request the Trust Platform Design Suite private extension for ATECC608 Encrypted Read/Write.
For more information about secure authentication, check out our secure authentication web page.