Types for wire messages HAL <-> TA

Define types for everything that needs to be communicated between
the HAL service and the TA.  These are mostly equivalent to various
types defined by the HAL specification, but here they are true Rust
types that don't require binder as a dependency.

The generated.cddl file is the output of the cddl-dump.rs program,
which dumps the entire CDDL schema for communication between HAL and TA.

Bug: 195310053
Test: build
Change-Id: Ia1163d8c06708e8af9c02133a8cf86424ced4a08
15 files changed
tree: 59ed8eb217a4c68c78cfdd740c16df22f1cc264d
  1. common/
  2. derive/
  3. .gitignore
  4. Android.bp
  5. Cargo.toml
  6. NOTICE
  7. OWNERS
  8. README.md
  9. rustfmt.toml
README.md

KeyMint/Rust

This repo holds work in progress for a Rust implementation of Android's KeyMint HAL.

Repo Structure

The codebase is divided as follows. Only the crates in bold are expected to be used in Android; the remainder are conveniences to allow development outside of Android.

SubdirCrate Namestd?Description
derivekmr-deriveYes (build-only)Proc macros for deriving the AsCborValue trait
commonkmr-commonNoCommon code used throughout KeyMint/Rust
halkmr-halYesHAL service implementation
boringsslkmr-boringsslYesBoring/OpenSSL-based implementations of crypto traits
testskmr-testsTests and test infrastructure
takmr-taNoTA implementation
ta-mainkmr-taYesTA implementation using TCP