#include <ec_public_key.h>
Inherits ccf::crypto::ECPublicKey, and ccf::crypto::PublicKey_OpenSSL.
Inherited by ccf::crypto::ECKeyPair_OpenSSL.
|
| | ECPublicKey_OpenSSL (EVP_PKEY *key) |
| |
| | ECPublicKey_OpenSSL (const Pem &pem) |
| |
| | ECPublicKey_OpenSSL (ECPublicKey_OpenSSL &&key)=default |
| |
| | ECPublicKey_OpenSSL (std::span< const uint8_t > der) |
| |
| | ECPublicKey_OpenSSL (const JsonWebKeyECPublic &jwk) |
| |
| | ~ECPublicKey_OpenSSL () override |
| |
| bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type, HashBytes &bytes) override |
| |
| bool | verify_hash (const uint8_t *hash, size_t hash_size, const uint8_t *sig, size_t sig_size, MDType md_type) override |
| |
| Pem | public_key_pem () const override |
| |
| std::vector< uint8_t > | public_key_der () const override |
| |
| std::vector< uint8_t > | public_key_raw () const override |
| |
| CurveID | get_curve_id () const override |
| |
| int | get_openssl_group_id () const |
| |
| Coordinates | coordinates () const override |
| |
| JsonWebKeyECPublic | public_key_jwk (const std::optional< std::string > &kid=std::nullopt) const override |
| |
| virtual bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type, HashBytes &bytes)=0 |
| |
| bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type=MDType::NONE) |
| |
| virtual bool | verify (const std::vector< uint8_t > &contents, const std::vector< uint8_t > &signature) |
| |
| virtual bool | verify_hash (const std::vector< uint8_t > &hash, const std::vector< uint8_t > &signature, MDType md_type) |
| |
| virtual bool | verify_hash (const uint8_t *hash, size_t hash_size, const uint8_t *sig, size_t sig_size, MDType md_type)=0 |
| |
| virtual | ~ECPublicKey ()=default |
| |
| bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type=MDType::NONE) |
| |
| | PublicKey_OpenSSL ()=default |
| |
| | PublicKey_OpenSSL (EVP_PKEY *key) |
| |
| | PublicKey_OpenSSL (const Pem &pem) |
| |
| void | check_is_cose_compatible (int cose_alg) |
| |
| | operator EVP_PKEY * () const |
| |
| virtual | ~PublicKey_OpenSSL () |
| |
◆ ECPublicKey_OpenSSL() [1/6]
| ccf::crypto::ECPublicKey_OpenSSL::ECPublicKey_OpenSSL |
( |
| ) |
|
|
protecteddefault |
◆ ECPublicKey_OpenSSL() [2/6]
| ccf::crypto::ECPublicKey_OpenSSL::ECPublicKey_OpenSSL |
( |
EVP_PKEY * |
key | ) |
|
◆ ECPublicKey_OpenSSL() [3/6]
| ccf::crypto::ECPublicKey_OpenSSL::ECPublicKey_OpenSSL |
( |
const Pem & |
pem | ) |
|
◆ ECPublicKey_OpenSSL() [4/6]
◆ ECPublicKey_OpenSSL() [5/6]
| ccf::crypto::ECPublicKey_OpenSSL::ECPublicKey_OpenSSL |
( |
std::span< const uint8_t > |
der | ) |
|
◆ ECPublicKey_OpenSSL() [6/6]
◆ ~ECPublicKey_OpenSSL()
| ccf::crypto::ECPublicKey_OpenSSL::~ECPublicKey_OpenSSL |
( |
| ) |
|
|
overridedefault |
◆ coordinates()
| ECPublicKey::Coordinates ccf::crypto::ECPublicKey_OpenSSL::coordinates |
( |
| ) |
const |
|
overridevirtual |
◆ ec_point_public_from_jwk()
| std::vector< uint8_t > ccf::crypto::ECPublicKey_OpenSSL::ec_point_public_from_jwk |
( |
const JsonWebKeyECPublic & |
jwk | ) |
|
|
staticprotected |
◆ get_curve_id()
| CurveID ccf::crypto::ECPublicKey_OpenSSL::get_curve_id |
( |
| ) |
const |
|
overridevirtual |
◆ get_openssl_group_id() [1/2]
| int ccf::crypto::ECPublicKey_OpenSSL::get_openssl_group_id |
( |
| ) |
const |
◆ get_openssl_group_id() [2/2]
| int ccf::crypto::ECPublicKey_OpenSSL::get_openssl_group_id |
( |
CurveID |
gid | ) |
|
|
static |
◆ public_key_der()
| std::vector< uint8_t > ccf::crypto::ECPublicKey_OpenSSL::public_key_der |
( |
| ) |
const |
|
overridevirtual |
◆ public_key_jwk()
| JsonWebKeyECPublic ccf::crypto::ECPublicKey_OpenSSL::public_key_jwk |
( |
const std::optional< std::string > & |
kid = std::nullopt | ) |
const |
|
overridevirtual |
◆ public_key_pem()
| Pem ccf::crypto::ECPublicKey_OpenSSL::public_key_pem |
( |
| ) |
const |
|
overridevirtual |
◆ public_key_raw()
| std::vector< uint8_t > ccf::crypto::ECPublicKey_OpenSSL::public_key_raw |
( |
| ) |
const |
|
overridevirtual |
◆ verify() [1/4]
| virtual bool ccf::crypto::ECPublicKey::verify |
( |
const std::vector< uint8_t > & |
contents, |
|
|
const std::vector< uint8_t > & |
signature |
|
) |
| |
|
inlinevirtual |
Verify that a signature was produced on contents with the private key associated with the public key held by the object.
- Parameters
-
| contents | Sequence of bytes that was signed |
| signature | Signature as a sequence of bytes |
- Returns
- Whether the signature matches the contents and the key
Reimplemented from ccf::crypto::ECPublicKey.
◆ verify() [2/4]
| bool ccf::crypto::ECPublicKey_OpenSSL::verify |
( |
const uint8_t * |
contents, |
|
|
size_t |
contents_size, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sig_size, |
|
|
MDType |
md_type, |
|
|
HashBytes & |
bytes |
|
) |
| |
|
overridevirtual |
Verify that a signature was produced on contents with the private key associated with the public key held by the object.
- Parameters
-
| contents | address of contents |
| contents_size | size of contents |
| sig | address of signature |
| sig_size | size of signature |
| md_type | Digest algorithm to use |
| bytes | Buffer to write the hash to |
- Returns
- Whether the signature matches the contents and the key
Implements ccf::crypto::ECPublicKey.
◆ verify() [3/4]
| virtual bool ccf::crypto::ECPublicKey::verify |
( |
const uint8_t * |
contents, |
|
|
size_t |
contents_size, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sig_size, |
|
|
MDType |
md_type, |
|
|
HashBytes & |
bytes |
|
) |
| |
|
virtual |
Verify that a signature was produced on contents with the private key associated with the public key held by the object.
- Parameters
-
| contents | address of contents |
| contents_size | size of contents |
| sig | address of signature |
| sig_size | size of signature |
| md_type | Digest algorithm to use |
| bytes | Buffer to write the hash to |
- Returns
- Whether the signature matches the contents and the key
Implements ccf::crypto::ECPublicKey.
◆ verify() [4/4]
| bool ccf::crypto::ECPublicKey::verify |
( |
const uint8_t * |
contents, |
|
|
size_t |
contents_size, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sig_size, |
|
|
MDType |
md_type = MDType::NONE |
|
) |
| |
|
inline |
Verify that a signature was produced on contents with the private key associated with the public key held by the object.
- Parameters
-
| contents | address of contents |
| contents_size | size of contents |
| sig | address of signature |
| sig_size | size of signature |
| md_type | Digest algorithm to use (derived from the public key if md_type == MDType::None). |
- Returns
- Whether the signature matches the contents and the key
◆ verify_hash() [1/3]
| virtual bool ccf::crypto::ECPublicKey::verify_hash |
( |
const std::vector< uint8_t > & |
hash, |
|
|
const std::vector< uint8_t > & |
signature, |
|
|
MDType |
md_type |
|
) |
| |
|
inlinevirtual |
Verify that a signature was produced on the hash of some contents with the private key associated with the public key held by the object.
- Parameters
-
| hash | Hash of some content |
| signature | Signature as a sequence of bytes |
| md_type | Type of hash |
- Returns
- Whether the signature matches the hash and the key
Reimplemented from ccf::crypto::ECPublicKey.
◆ verify_hash() [2/3]
| bool ccf::crypto::ECPublicKey_OpenSSL::verify_hash |
( |
const uint8_t * |
hash, |
|
|
size_t |
hash_size, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sig_size, |
|
|
MDType |
md_type |
|
) |
| |
|
overridevirtual |
Verify that a signature was produced on the hash of some contents with the private key associated with the public key held by the object.
- Parameters
-
| hash | Hash of some content |
| hash_size | length of hash |
| sig | Signature as a sequence of bytes |
| sig_size | Length of sig |
| md_type | Digest algorithm |
- Returns
- Whether the signature matches the hash and the key
Implements ccf::crypto::ECPublicKey.
◆ verify_hash() [3/3]
| virtual bool ccf::crypto::ECPublicKey::verify_hash |
( |
const uint8_t * |
hash, |
|
|
size_t |
hash_size, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sig_size, |
|
|
MDType |
md_type |
|
) |
| |
|
virtual |
Verify that a signature was produced on the hash of some contents with the private key associated with the public key held by the object.
- Parameters
-
| hash | Hash of some content |
| hash_size | length of hash |
| sig | Signature as a sequence of bytes |
| sig_size | Length of sig |
| md_type | Digest algorithm |
- Returns
- Whether the signature matches the hash and the key
Implements ccf::crypto::ECPublicKey.
The documentation for this class was generated from the following files: