1// Copyright 2018 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 RSA SSA (Signature Schemes with Appendix) using PSS 18// (Probabilistic Signature Scheme ) encoding 19// (https://tools.ietf.org/html/rfc8017#section-8.1). 20syntax = "proto3"; 21 22package google.crypto.tink; 23 24import "proto/common.proto"; 25 26option java_package = "com.google.crypto.tink.proto"; 27option java_multiple_files = true; 28option go_package = "github.com/google/tink/go/proto/rsa_ssa_pss_go_proto"; 29 30message RsaSsaPssParams { 31 // Hash function used in computing hash of the signing message 32 // (see https://tools.ietf.org/html/rfc8017#section-9.1.1). 33 // Required. 34 HashType sig_hash = 1; 35 // Hash function used in MGF1 (a mask generation function based on a 36 // hash function) (see https://tools.ietf.org/html/rfc8017#appendix-B.2.1). 37 // Required. 38 HashType mgf1_hash = 2; 39 // Salt length (see https://tools.ietf.org/html/rfc8017#section-9.1.1) 40 // Required. 41 int32 salt_length = 3; 42} 43 44// key_type: type.googleapis.com/google.crypto.tink.RsaSsaPssPublicKey 45message RsaSsaPssPublicKey { 46 // Required. 47 uint32 version = 1; 48 // Required. 49 RsaSsaPssParams params = 2; 50 // Modulus. 51 // Unsigned big integer in bigendian representation. 52 bytes n = 3; 53 // Public exponent. 54 // Unsigned big integer in bigendian representation. 55 bytes e = 4; 56} 57 58// key_type: type.googleapis.com/google.crypto.tink.RsaSsaPssPrivateKey 59message RsaSsaPssPrivateKey { 60 // Required. 61 uint32 version = 1; 62 // Required. 63 RsaSsaPssPublicKey public_key = 2; 64 // Private exponent. 65 // Unsigned big integer in bigendian representation. 66 // Required. 67 bytes d = 3; 68 69 // The following parameters are used to optimize RSA signature computation. 70 // The prime factor p of n. 71 // Unsigned big integer in bigendian representation. 72 // Required. 73 bytes p = 4; 74 // The prime factor q of n. 75 // Unsigned big integer in bigendian representation. 76 // Required. 77 bytes q = 5; 78 // d mod (p - 1). 79 // Unsigned big integer in bigendian representation. 80 // Required. 81 bytes dp = 6; 82 // d mod (q - 1). 83 // Unsigned big integer in bigendian representation. 84 // Required. 85 bytes dq = 7; 86 // Chinese Remainder Theorem coefficient q^(-1) mod p. 87 // Unsigned big integer in bigendian representation. 88 // Required. 89 bytes crt = 8; 90} 91 92message RsaSsaPssKeyFormat { 93 // Required. 94 RsaSsaPssParams params = 1; 95 // Required. 96 uint32 modulus_size_in_bits = 2; 97 // Required. 98 bytes public_exponent = 3; 99} 100