Skip to content
Miscellaneous sample applications demonstrating working with Rivetz Technology
Branch: develop
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.
EncryptDecryptSample Moved samples to RivetJ 1.0.13, Updated README Apr 18, 2019

Rivetz Samples

This repository contains miscellaneous sample applications that demonstrate some of the various ways Rivetz Toolkit API's are used to access Rivetz Technology. Each sample is a buildable and runnable app, with a very simple UI. It is assumed that Android Studio is being used to build and run them.

All of the apps use the same basic pattern, and demonstrate things such as:

  • Check for existence of the Rivet, demonstrate how to handle if it is not installed.
  • Pair the device to the Rivetz Network.
  • See if the device is Dual Root of Trust (DRT) capable.
  • Manage asynchronous calls into the Rivet.
  • Basic error / exception handling
  • Managing the UI components, managing UI and background threads
  • Using the current RivetzJ API's.


  • The current apps are built with RivetzJ version 1.0.13. This is specified by setting the rivetzJversion variable in the project file to the version you are using before building these apps.
  • You cannot use an emulator in the Android Studio AVD to run these samples, as each use the Trusted Execution Environment (TEE), which is not supported in any of the device emulations. You must attach a supported physical device to your development environment in order to run these apps. See to check if your device is supported.

Sample App Descriptions

  1. RivetzBoilerPlate: This is the simplest of the sample apps, demonstrating how to pair your app / device with the Rivetz network. It may be copied and used as the starting point for a Rivetz enabled application, as it is for most of the samples in this repository.

  2. HashSample: Apply the SHA-256 hashing algorithm to a text string entered by the user.

  3. EncryptDecryptSample: Demonstrates creating an AES256 symmetric key within the TEE to be used for encryption and decryption. The app will then encrypt the user entered data string and show the results, which can then be decrypted to the original text string.

  4. SigningSample: Creates a NIST256 signing key in the TEE, and uses the concept of real and fake messages to demonstrate both the signing and verification of user configurable text strings.

  5. AsyncKeyManipulationSample: Creates a NIST256 key and uses it to demonstrate various key management functions, such as fetching and displaying properties of the key, deleting a key, etc.

  6. UsageRuleTUISample: Building on the EncryptDecryptSample described above, this app demonstrates the use of a couple of other SDK capabilities;

  • Key Usage Rules - the encryption key is created with usage rules requiring a TUI confirmation for use, as well as a requirement to use Dual Roots of Trust (DRT) if DRT is supported on this device.
  • TUI Confirm - uses the TUIConfirm API to send a message to the Trusted User Interface, and interprets returned results based on the users positive or negative response to that message.
  1. SingletonRivet: This is another simple hashing example, however it demonstrates accessing Rivetz functions via the Singleton class pattern.
You can’t perform that action at this time.