xref: /aosp_15_r20/external/tink/java_src/proto/common.proto (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1// Copyright 2017 Google Inc.
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////////////////////////////////////////////////////////////////////////////////
16
17// Definitions for common cryptographic enum types.
18syntax = "proto3";
19
20package google.crypto.tink;
21
22option java_package = "com.google.crypto.tink.proto";
23option java_multiple_files = true;
24option go_package = "github.com/google/tink/go/proto/common_go_proto";
25
26enum EllipticCurveType {
27  UNKNOWN_CURVE = 0;
28  NIST_P256 = 2;
29  NIST_P384 = 3;
30  NIST_P521 = 4;
31  CURVE25519 = 5;
32}
33
34enum EcPointFormat {
35  UNKNOWN_FORMAT = 0;
36  UNCOMPRESSED = 1;
37  COMPRESSED = 2;
38  // Like UNCOMPRESSED but without the \x04 prefix. Crunchy uses this format.
39  // DO NOT USE unless you are a Crunchy user moving to Tink.
40  DO_NOT_USE_CRUNCHY_UNCOMPRESSED = 3;
41}
42
43enum HashType {
44  UNKNOWN_HASH = 0;
45  SHA1 = 1;  // Using SHA1 for digital signature is deprecated but HMAC-SHA1 is
46             // fine.
47  SHA384 = 2;
48  SHA256 = 3;
49  SHA512 = 4;
50  SHA224 = 5;
51}
52