@@ -37,7 +37,7 @@ service DstackGuest {
3737 // Returns the derived key along with its TLS certificate chain.
3838 rpc GetTlsKey (GetTlsKeyArgs ) returns (GetTlsKeyResponse ) {}
3939
40- // Derives a new ECDSA key with k256 EC curve .
40+ // Derives a new key.
4141 rpc GetKey (GetKeyArgs ) returns (GetKeyResponse ) {}
4242
4343 // Generates a TDX quote with given report data.
@@ -48,6 +48,12 @@ service DstackGuest {
4848
4949 // Get app info
5050 rpc Info (google.protobuf.Empty ) returns (AppInfo ) {}
51+
52+ // Sign a payload
53+ rpc Sign (SignRequest ) returns (SignResponse ) {}
54+
55+ // Verify a signature
56+ rpc Verify (VerifyRequest ) returns (VerifyResponse ) {}
5157}
5258
5359// The request to derive a key
@@ -91,12 +97,14 @@ message GetTlsKeyResponse {
9197 repeated string certificate_chain = 2 ;
9298}
9399
94- // The request to derive a new ECDSA key with k256 EC curve
100+ // The request to derive a new key
95101message GetKeyArgs {
96102 // Path to the key to derive
97103 string path = 1 ;
98104 // Purpose of the key
99105 string purpose = 2 ;
106+ // Algorithm of the key. Either `secp256k1` or `ed25519`. Defaults to `secp256k1`
107+ string algorithm = 3 ;
100108}
101109
102110// The response to a DeriveK256Key request
@@ -109,9 +117,11 @@ message DeriveK256KeyResponse {
109117
110118// The response to a GetEthKey request
111119message GetKeyResponse {
112- // Derived k256 key
120+ // Derived key
113121 bytes key = 1 ;
114- // Derived k256 signature chain
122+ // The signature chain consists of the following signatures:
123+ // [0] - the k256 signature of the derived pK signed by the app root key
124+ // [1] - the k256 signature of the app root pK signed by the KMS root key
115125 repeated bytes signature_chain = 2 ;
116126}
117127
@@ -216,4 +226,38 @@ service Worker {
216226 rpc Info (google.protobuf.Empty ) returns (AppInfo ) {}
217227 // Get the guest agent version
218228 rpc Version (google.protobuf.Empty ) returns (WorkerVersion ) {}
229+ // Get attestation
230+ rpc GetAttestationForAppKey (GetAttestationForAppKeyRequest ) returns (GetQuoteResponse ) {}
231+ }
232+
233+ message SignRequest {
234+ string algorithm = 1 ;
235+ bytes data = 2 ;
236+ }
237+
238+ message SignResponse {
239+ // the signature of the data
240+ bytes signature = 1 ;
241+ // The signature chain consists of the following signatures:
242+ // [0] - the signature of the data
243+ // [1] - the k256 signature of the message signing pubkey signed by the app root key
244+ // [2] - the k256 signature of the app root pubkey signed by the KMS root key
245+ repeated bytes signature_chain = 2 ;
246+ // The public key signing the data
247+ bytes public_key = 3 ;
248+ }
249+
250+ message VerifyRequest {
251+ string algorithm = 1 ;
252+ bytes data = 2 ;
253+ bytes signature = 3 ;
254+ bytes public_key = 4 ;
255+ }
256+
257+ message VerifyResponse {
258+ bool valid = 1 ;
259+ }
260+
261+ message GetAttestationForAppKeyRequest {
262+ string algorithm = 1 ;
219263}
0 commit comments