SDK overview

更新时间:
复制 MD 格式

Trusted Computing Cloud Service (C3S) is a trusted computing service that enables off-chain, multi-party data privacy computation. After you activate C3S, you can download the SDK and follow this guide to explore the features of the Trusted Computing Cloud Service.

SDK version guide

Name

Version number

Download link

MYTF Alicloud SDK

0.2.2.2

Download

Maven dependencies

<dependency>
  <groupId>com.alipay.mytf</groupId>
  <artifactId>mytf-sdk</artifactId>
  <version>0.2.2.2</version>
</dependency>

<dependency>
  <groupId>com.alipay.mytf</groupId>
  <artifactId>mytf-sdk-alicloud</artifactId>
  <version>0.2.2.2</version>
</dependency>

<!-- maven: github.com/aliyun -->
<dependency>
     <groupId>com.aliyun</groupId>
     <artifactId>aliyun-java-sdk-baas-c3s</artifactId>
     <version>1.8-SNAPSHOT</version>
</dependency>

SDK description

The SDK architecture has four main parts: client, core, model, and common.

com.alipay.mytf.sdk
├── core
│   ├── TrustRoot
│   ├── KeyStore
│   ├── ParamsValidator
│
├── model
│   ├── MYTFProfile
│   ├── MYTFInfo
│   ├── TappInfo
│   ├── TappInstallRequest
│   ├── TappInstallResponse
│   ├── TappExecuteRequest
│   ├── TappExecuteResponse
│   │...
│
├── common
│   ├── crypto
│   ├── codec
│   ├── exceptions
│   ├── errorcode
│   ├── utils

com.alipay.mytf.sdk.alicloud.client
├── AliCloudClientConfig
├── AliCloudClientConfig

Client module

The client module includes AliCloudClientConfig and interacts with the Trusted Computing Service. The client calls C3S services to load configurations, retrieve MYTF identity information, install and delete user-created TEE applications (TAPPs), and retrieve details for all or specific TAPPs. The client also authorizes other users to use a TAPP and executes TAPPs synchronously or asynchronously.

Core module

The core module includes TrustRoot, KeyStore, and ParamsValidator. TrustRoot defines the trust root for the validation module. The user injects this trust root during client initialization. This trust root verifies the integrity of the entire trusted computing flow. KeyStore manages user keys and performs operations such as signing, signature verification, encryption, and decryption. ParamsValidator validates that the inputs and outputs for each interface are correctly formatted.

Model module

The model module defines all data models. These models include MYTFProfile for verifiable MYTF identity information, MYTFInfo for MYTF identity information, TAPPProfile for verifiable TAPP identity information, and TAPPInfo for TAPP identity information. It also includes request and response models such as TappInstallRequest, TappExecuteRequest, TappInstallResponse, and TappExecuteResponse.

Common module

The common module contains utility libraries, such as libraries for cryptography and encoding. You can use the cryptography library to generate keys, encrypt data, and sign data.

For more information about how to use the SDK to call a TAPP, see SDK usage guide. For more information about how to write a TAPP, see Trusted computing application development.