iPXE
Data Fields
pubkey_algorithm Struct Reference

A public key algorithm. More...

#include <crypto.h>

Data Fields

const char * name
 Algorithm name. More...
 
int(* encrypt )(const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext)
 Encrypt. More...
 
int(* decrypt )(const struct asn1_cursor *key, const struct asn1_cursor *ciphertext, struct asn1_builder *plaintext)
 Decrypt. More...
 
int(* sign )(const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, struct asn1_builder *builder)
 Sign digest value. More...
 
int(* verify )(const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature)
 Verify signed digest value. More...
 
int(* match )(const struct asn1_cursor *private_key, const struct asn1_cursor *public_key)
 Check that public key matches private key. More...
 

Detailed Description

A public key algorithm.

Definition at line 121 of file crypto.h.

Field Documentation

◆ name

const char* pubkey_algorithm::name

Algorithm name.

Definition at line 123 of file crypto.h.

Referenced by tls_select_cipher(), tls_send_certificate_verify(), and tls_verify_dh_params().

◆ encrypt

int( * pubkey_algorithm::encrypt) (const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext)

Encrypt.

Parameters
keyKey
plaintextPlaintext
ciphertextCiphertext
Return values
rcReturn status code

Definition at line 131 of file crypto.h.

Referenced by pubkey_encrypt().

◆ decrypt

int( * pubkey_algorithm::decrypt) (const struct asn1_cursor *key, const struct asn1_cursor *ciphertext, struct asn1_builder *plaintext)

Decrypt.

Parameters
keyKey
ciphertextCiphertext
plaintextPlaintext
Return values
rcReturn status code

Definition at line 141 of file crypto.h.

Referenced by pubkey_decrypt().

◆ sign

int( * pubkey_algorithm::sign) (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, struct asn1_builder *builder)

Sign digest value.

Parameters
keyKey
digestDigest algorithm
valueDigest value
signatureSignature
Return values
rcReturn status code

Definition at line 152 of file crypto.h.

Referenced by pubkey_sign().

◆ verify

int( * pubkey_algorithm::verify) (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature)

Verify signed digest value.

Parameters
keyKey
digestDigest algorithm
valueDigest value
signatureSignature
Return values
rcReturn status code

Definition at line 163 of file crypto.h.

Referenced by pubkey_verify().

◆ match

int( * pubkey_algorithm::match) (const struct asn1_cursor *private_key, const struct asn1_cursor *public_key)

Check that public key matches private key.

Parameters
private_keyPrivate key
public_keyPublic key
Return values
rcReturn status code

Definition at line 172 of file crypto.h.

Referenced by pubkey_match().


The documentation for this struct was generated from the following file: