Sha256: e22fe24733e107d7f9038701934d01ae1e030a66e20c3f74f7cb9be2a2db8076
Contents?: true
Size: 1.57 KB
Versions: 2
Compression:
Stored size: 1.57 KB
Contents
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package secret_service; // ----------------------------------------------------------------------------- // ---------------- Service definition // ----------------------------------------------------------------------------- service SecretService { // API to request key generation rpc GenerateKey (GenerateKeyRequest) returns (GenerateKeyResponse) {} // API to request a public key rpc GetPublicKey (PublicKeyRequest) returns (PublicKeyResponse) {} // API to request a signature rpc Sign (SignRequest) returns (SignResponse) {} } message GenerateKeyRequest { // Spec gives a way to generate the key (potentially BIP32 private derivation path here) KeyType spec = 1; } message GenerateKeyResponse { bytes key_id = 1; ErrorCode code = 2; } message PublicKeyRequest { bytes key_id = 1; } message PublicKeyResponse { bytes public_key = 1; ErrorCode code = 2; } message SignRequest { bytes key_id = 1; // message_hash should be a prehashed message of length crypto::HashValue::LENGTH = 32 bytes bytes message_hash = 2; } message SignResponse { bytes signature = 1; ErrorCode code = 2; } enum ErrorCode { Success = 0; KeyIdNotFound = 1; WrongLength = 2; InvalidParameters = 3; AuthenticationFailed = 4; Unspecified = 5; // Good examples of more error codes: https://developers.yubico.com/YubiHSM2/Component_Reference/KSP/Status_codes.html } enum KeyType { Ed25519 = 0; BLS12381 = 1; }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
libra_client-0.2.1 | protos/secret_service.proto |
libra_client-0.1.7 | protos/secret_service.proto |