Travel Rule Information Sharing Architecture for Virtual Asset Service Providers (TRISA)

trisacrypto/trisa - github 專案讓錢包或交易所等可符合 Financial Action Task Force (FATF) 的 travel rule 要求。參考報導 CipherTrace Enters Race to Solve Crypto's FATF Compliance Headache - CoinDesk

TOC

WIP 資料可信路徑分享延伸架構

AI「安全性」痛點使用保險轉移風險以及如何精算。

Lloyd’s Of London, Aon And Others Poised To Profit From Cryptocurrency Hacker Insurance

With $300 billion in crypto assets on the planet and less than $1 billion in available insurance coverage, there’s a huge imbalance between supply and demand.

發展 AI + 機械人上,日本也要失敗?(下) - *CUP

儘管技術已經做到頂尖,成本控制也在合理範圍內,但武藏精工卻還是無法完全以 AI 來取代人力。卡在他們眼前的瓶頸,叫做「安全性」。

生成 Google Protocol Buffers 文件

pseudomuto/protoc-gen-doc: Documentation generator plugin for Google Protocol Buffers

git clone https://github.com/trisacrypto/trisa.git /tmp/src/trisa
bash tc.sh --gen-proto-doc /tmp/src/trisa/proto /tmp/output.md

Generated Date:2019-09-11T16:47:55+08:00

Protocol Documentation

Table of Contents

Top

trisa/data/ethereum/v1alpha1/ethereum.proto

Data

FieldTypeLabelDescription
sourcestring
destinationstring
amountint32

Top

trisa/data/bitcoin/v1alpha1/bitcoin.proto

Data

FieldTypeLabelDescription
sourcestring
destinationstring
amountint32

Top

trisa/protocol/v1alpha1/trisa.proto

Transaction

FieldTypeLabelDescription
idstringThe transaction identifier generated by the sender. Any response to a transaction request needs to carry the same identifier.
transactionbytesEncrypted TransactionData
encryption_keybytesEncryption key used to encrypt the transaction blob. This key itself is encrypted using the public key of the receiver.
encryption_algorithmstringThe encryption algorithm used to encrypt the transaction blob.
hmacbytesHMAC signature calculated from encrypted transaction blob.
hmac_secretbytesThe HMAC secret used to calculate the HMAC signature. This secret itself is encrypted using the public key of the receiver.
hmac_algorithmstringThe algorithm used to calculate the HMAC signature.

TransactionData

FieldTypeLabelDescription
identitygoogle.protobuf.AnyIdentity contains any valid identity structure.
datagoogle.protobuf.AnyData contains the network specific data.

TrisaPeer2Peer

Method NameRequest TypeResponse TypeDescription
TransactionStreamTransaction streamTransaction stream

Top

trisa/identity/us/v1alpha1/identity.proto

Identity

FieldTypeLabelDescription
first_namestring
last_namestring
ssnstring
statestring
driver_licensestring

Top

trisa/identity/be/v1alpha1/identity.proto

Identity

FieldTypeLabelDescription
first_namestring
last_namestring
national_numberstring
city_of_birthstring

Top

tvca/discovery/discovery.proto

CRLStore

FieldTypeLabelDescription
revokedstringrepeated

Trisa

FieldTypeLabelDescription
castringURL where the /.well-known/trisa endpoint is located.
x509_root_storestringURL to the root certificate store.
x509_issuer_storestringURL to the intermediate/issuer certificate store.
x509_vasp_storestringURL to the active VASP certificate store.
crl_storestringURL to the CRL store.

X509

FieldTypeLabelDescription
idstring
pemstring

X509Store

FieldTypeLabelDescription
storeX509repeated

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
doubledoubledoublefloat
floatfloatfloatfloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intint
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/long
uint32Uses variable-length encoding.uint32intint/long
uint64Uses variable-length encoding.uint64longint/long
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intint
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/long
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intint
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/long
sfixed32Always four bytes.int32intint
sfixed64Always eight bytes.int64longint/long
boolboolbooleanboolean
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicode
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr

Protos File Tree


.
├── trisa
│   ├── data
│   │   ├── bitcoin
│   │   │   └── v1alpha1
│   │   │       └── bitcoin.proto
│   │   └── ethereum
│   │       └── v1alpha1
│   │           └── ethereum.proto
│   ├── identity
│   │   ├── be
│   │   │   └── v1alpha1
│   │   │       └── identity.proto
│   │   └── us
│   │       └── v1alpha1
│   │           └── identity.proto
│   └── protocol
│       └── v1alpha1
│           └── trisa.proto
└── tvca
    └── discovery
        └── discovery.proto

15 directories, 6 files

Protobuf sources

src:./trisa/data/ethereum/v1alpha1/ethereum.proto


syntax = "proto3";

package trisa.data.ethereum.v1alpha1;

option go_package = "github.com/trisacrypto/trisa/proto/trisa/data/ethereum/v1alpha1";

message Data {
    string source = 1;
    string destination = 2;
    int32 amount = 3;
}

src:./trisa/data/bitcoin/v1alpha1/bitcoin.proto


syntax = "proto3";

package trisa.data.bitcoin.v1alpha1;

option go_package = "github.com/trisacrypto/trisa/proto/trisa/data/bitcoin/v1alpha1";

message Data {
    string source = 1;
    string destination = 2;
    int32 amount = 3;
}

src:./trisa/protocol/v1alpha1/trisa.proto


syntax = "proto3";

package trisa.protocol.v1alpha1;

import "google/protobuf/any.proto";

option go_package = "github.com/trisacrypto/trisa/proto/trisa/protocol/v1alpha1";

service TrisaPeer2Peer {
    rpc TransactionStream(stream Transaction) returns (stream Transaction) {}
}

message Transaction {
    // The transaction identifier generated by the sender. Any response
    // to a transaction request needs to carry the same identifier.
    string id = 1;

    // Encrypted TransactionData
    bytes transaction = 2;

    // Encryption key used to encrypt the transaction blob. This key itself
    // is encrypted using the public key of the receiver.
    bytes encryption_key = 3;

    // The encryption algorithm used to encrypt the transaction blob.
    string encryption_algorithm = 4;

    // HMAC signature calculated from encrypted transaction blob.
    bytes hmac = 5;

    // The HMAC secret used to calculate the HMAC signature. This secret
    // itself is encrypted using the public key of the receiver.
    bytes hmac_secret = 6;

    // The algorithm used to calculate the HMAC signature.
    string hmac_algorithm = 7;
}

message TransactionData {
    // Identity contains any valid identity structure.
    google.protobuf.Any identity = 1;

    // Data contains the network specific data.
    google.protobuf.Any data = 2;
}

src:./trisa/identity/us/v1alpha1/identity.proto


syntax = "proto3";

package trisa.identity.us.v1alpha1;

option go_package = "github.com/trisacrypto/trisa/proto/trisa/identity/us/v1alpha1";

message Identity {
    string first_name = 1;
    string last_name = 2;
    string ssn = 3;
    string state = 4;
    string driver_license = 5;
}

src:./trisa/identity/be/v1alpha1/identity.proto


syntax = "proto3";

package trisa.identity.be.v1alpha1;

option go_package = "github.com/trisacrypto/trisa/proto/trisa/identity/be/v1alpha1";

message Identity {
    string first_name = 1;
    string last_name = 2;
    string national_number = 3;
    string city_of_birth = 4;
}

src:./tvca/discovery/discovery.proto


syntax = "proto3";

package trisa.tvca.discovery;

option go_package = "github.com/trisacrypto/trisa/proto/tvca/discovery";

message Trisa {
    // URL where the /.well-known/trisa endpoint is located.
    string ca = 1;

    // URL to the root certificate store.
    string x509_root_store = 2;

    // URL to the intermediate/issuer certificate store.
    string x509_issuer_store = 3;

    // URL to the active VASP certificate store.
    string x509_vasp_store = 4;

    // URL to the CRL store.
    string crl_store = 5;
}

message X509Store {
    repeated X509 store = 1;
}

message X509 {
    string id = 1;
    string pem = 2;
}

message CRLStore {
    repeated string revoked = 1;
}