Git Product home page Git Product logo

core-samples's Introduction

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.

Notes

  • The current apps are built with RivetzJ version 1.0.13. This is specified by setting the rivetzJversion variable in the gradle.properties 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 https://rivetz.com/compatibility 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.

core-samples's People

Contributors

cryptopapi997 avatar kitfitz avatar realbitdancer avatar jdbgit avatar slawless avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.