From 22342f345b29bdb4566af2eb83269b29fae5c6f0 Mon Sep 17 00:00:00 2001 From: salrashid123 Date: Thu, 29 Aug 2024 17:56:23 -0400 Subject: [PATCH] Update README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1758ff6..d1bcc16 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,6 @@ $ go run hmac/nopassword/verify/main.go \ ### Signature: RSA-SSA-PKCS1 - Internally, this generates an RSA inside the tpm and uses the tpm itself to create the signature. The public key is also written to a tink keyset and it can be used without a TPM to verify @@ -485,6 +484,43 @@ AEAD: } ``` +Signing + +```json +{ + "primaryKeyId": 623370012, + "key": [ + { + "keyData": { + "typeUrl": "type.googleapis.com/github.salrashid123.tink-go-tpm.RsaSsaPkcs1PublicTpmKey", + "value": "EgIIAxqA...", + "keyMaterialType": "ASYMMETRIC_PUBLIC" + }, + "status": "ENABLED", + "keyId": 623370012, + "outputPrefixType": "TINK" + } + ] +} + +{ + "primaryKeyId": 623370012, + "key": [ + { + "keyData": { + "typeUrl": "type.googleapis.com/github.salrashid123.tink-go-tpm.RsaSsaPkcs1PrivateTpmKey", + "value": "EAIy1ggSjA...", + "keyMaterialType": "ASYMMETRIC_PRIVATE" + }, + "status": "ENABLED", + "keyId": 623370012, + "outputPrefixType": "TINK" + } + ] +} +``` + + Where the "Value" field is the proto keys shown in `proto/tinktpm.proto` #### Parent Key @@ -545,4 +581,4 @@ go test -v ./aead -run ^TestAeadOwnerPasswordFail$ go test -v ./signature -run ^TestSignVerify$ go test -v ./signature -run ^TestSignVerifyFail$ -``` \ No newline at end of file +```