Debian Codegraph @

plugin/algorithm.go

raw symbols SCIP
1 // Copyright The Notary Project Authors.
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 // http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13
14 package plugin
15
16 // KeySpec is type of the signing algorithm, including algorithm and size.
17 type KeySpec string
18
19 // KeySpec supported by notation.
20 //
21 // https://github.com/notaryproject/notaryproject/blob/main/specs/signature-specification.md#algorithm-selection
22 const (
23 KeySpecRSA2048 KeySpec = "RSA-2048"
24 KeySpecRSA3072 KeySpec = "RSA-3072"
25 KeySpecRSA4096 KeySpec = "RSA-4096"
26 KeySpecEC256 KeySpec = "EC-256"
27 KeySpecEC384 KeySpec = "EC-384"
28 KeySpecEC521 KeySpec = "EC-521"
29 )
30
31 // HashAlgorithm supported by notation.
32 type HashAlgorithm string
33
34 // one of the following supported hash algorithm names.
35 //
36 // https://github.com/notaryproject/notaryproject/blob/main/specs/signature-specification.md#algorithm-selection
37 const (
38 HashAlgorithmSHA256 HashAlgorithm = "SHA-256"
39 HashAlgorithmSHA384 HashAlgorithm = "SHA-384"
40 HashAlgorithmSHA512 HashAlgorithm = "SHA-512"
41 )
42
43 // SignatureAlgorithm supported by notation
44 type SignatureAlgorithm string
45
46 // one of the following supported signing algorithm names.
47 //
48 // https://github.com/notaryproject/notaryproject/blob/main/specs/signature-specification.md#algorithm-selection
49 const (
50 SignatureAlgorithmECDSA_SHA256 SignatureAlgorithm = "ECDSA-SHA-256"
51 SignatureAlgorithmECDSA_SHA384 SignatureAlgorithm = "ECDSA-SHA-384"
52 SignatureAlgorithmECDSA_SHA512 SignatureAlgorithm = "ECDSA-SHA-512"
53 SignatureAlgorithmRSASSA_PSS_SHA256 SignatureAlgorithm = "RSASSA-PSS-SHA-256"
54 SignatureAlgorithmRSASSA_PSS_SHA384 SignatureAlgorithm = "RSASSA-PSS-SHA-384"
55 SignatureAlgorithmRSASSA_PSS_SHA512 SignatureAlgorithm = "RSASSA-PSS-SHA-512"
56 )