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"""ECDSA (ES256) verifier and signer that use the ``cryptography`` library."""
16
17from google.auth.crypt.es import EsSigner, EsVerifier
18
19
20class ES256Verifier(EsVerifier):
21 """Verifies ECDSA cryptographic signatures using public keys.
22
23 Args:
24 public_key (cryptography.hazmat.primitives.asymmetric.ec.ECDSAPublicKey): The public key used to verify
25 signatures.
26 """
27
28 pass
29
30
31class ES256Signer(EsSigner):
32 """Signs messages with an ECDSA private key.
33
34 Args:
35 private_key (
36 cryptography.hazmat.primitives.asymmetric.ec.ECDSAPrivateKey):
37 The private key to sign with.
38 key_id (str): Optional key ID used to identify this private key. This
39 can be useful to associate the private key with its associated
40 public key or certificate.
41 """
42
43 pass