github.com/mre-fog/trillianxx@v1.1.2-0.20180615153820-ae375a99d36a/crypto/sigpb/sigpb.proto (about)

     1  // Copyright 2016 Google Inc. All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  option go_package = "github.com/google/trillian/crypto/sigpb";
    18  
    19  package sigpb;
    20  
    21  // Protocol buffer encoding of the TLS DigitallySigned type, from RFC 5246 ยง4.7.
    22  message DigitallySigned {
    23    // HashAlgorithm defines the approved methods for object hashing.
    24    //
    25    // Supported hash algorithms. The numbering space is the same as for TLS,
    26    // given in RFC 5246 s7.4.1.4.1 and at:
    27    // http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
    28    enum HashAlgorithm {
    29      // No hash algorithm is used.
    30      NONE = 0;
    31      // SHA256 is used.
    32      SHA256 = 4;
    33    }
    34  
    35    // SignatureAlgorithm defines the algorithm used to sign the object.
    36    //
    37    // Supported signature algorithms. The numbering space is the same as for TLS,
    38    // given in RFC 5246 s7.4.1.4.1 and at:
    39    // http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
    40    enum SignatureAlgorithm {
    41      // Anonymous signature scheme.
    42      ANONYMOUS = 0;
    43      // RSA signature scheme.
    44      RSA = 1;
    45      // ECDSA signature scheme.
    46      ECDSA = 3;
    47    }
    48  
    49    // hash_algorithm contains the hash algorithm used.
    50    HashAlgorithm hash_algorithm = 1;
    51    // sig_algorithm contains the signing algorithm used.
    52    SignatureAlgorithm signature_algorithm = 2;
    53    // signature contains the object signature.
    54    bytes signature = 3;
    55  }