iPXE
rsa_sha256.c File Reference
#include <byteswap.h>
#include <ipxe/rsa.h>
#include <ipxe/sha256.h>
#include <ipxe/asn1.h>
#include <ipxe/tls.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)

Variables

static uint8_t oid_sha256_with_rsa_encryption []
 "sha256WithRSAEncryption" object identifier
struct asn1_algorithm sha256_with_rsa_encryption_algorithm __asn1_algorithm
 "sha256WithRSAEncryption" OID-identified algorithm
static const uint8_t rsa_sha256_prefix_data []
 SHA-256 digestInfo prefix.
struct rsa_digestinfo_prefix rsa_sha256_prefix __rsa_digestinfo_prefix
 SHA-256 digestInfo prefix.
struct tls_signature_hash_algorithm tls_rsa_sha256 __tls_sig_hash_algorithm
 RSA with SHA-256 signature hash algorithm.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

Variable Documentation

◆ oid_sha256_with_rsa_encryption

uint8_t oid_sha256_with_rsa_encryption[]
static
Initial value:
=
#define ASN1_OID_SHA256WITHRSAENCRYPTION
ASN.1 OID for sha256WithRSAEncryption (1.2.840.113549.1.1.11).
Definition asn1.h:192

"sha256WithRSAEncryption" object identifier

Definition at line 34 of file rsa_sha256.c.

◆ __asn1_algorithm

struct asn1_algorithm sha256_with_rsa_encryption_algorithm __asn1_algorithm
Initial value:
= {
.name = "sha256WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha256_algorithm,
}
#define ASN1_CURSOR(value)
Define an ASN.1 cursor for a static value.
Definition asn1.h:408
struct pubkey_algorithm rsa_algorithm
RSA public-key algorithm.
Definition rsa.c:833
static uint8_t oid_sha256_with_rsa_encryption[]
"sha256WithRSAEncryption" object identifier
Definition rsa_sha256.c:34
struct digest_algorithm sha256_algorithm

"sha256WithRSAEncryption" OID-identified algorithm

Generic elliptic curve container algorithm.

Definition at line 38 of file rsa_sha256.c.

38 {
39 .name = "sha256WithRSAEncryption",
40 .pubkey = &rsa_algorithm,
41 .digest = &sha256_algorithm,
43};

◆ rsa_sha256_prefix_data

const uint8_t rsa_sha256_prefix_data[]
static
Initial value:
=
#define SHA256_DIGEST_SIZE
Definition Tpm20.h:29
#define ASN1_OID_SHA256
ASN.1 OID for id-sha256 (2.16.840.1.101.3.4.2.1).
Definition asn1.h:286
#define RSA_DIGESTINFO_PREFIX(digest_size,...)
RSA digestInfo prefix.
Definition rsa.h:34

SHA-256 digestInfo prefix.

Definition at line 46 of file rsa_sha256.c.

◆ __rsa_digestinfo_prefix

struct rsa_digestinfo_prefix rsa_sha256_prefix __rsa_digestinfo_prefix
Initial value:
= {
.digest = &sha256_algorithm,
.len = sizeof ( rsa_sha256_prefix_data ),
}
static const uint8_t rsa_sha256_prefix_data[]
SHA-256 digestInfo prefix.
Definition rsa_sha256.c:46

SHA-256 digestInfo prefix.

Definition at line 50 of file rsa_sha256.c.

50 {
51 .digest = &sha256_algorithm,
53 .len = sizeof ( rsa_sha256_prefix_data ),
54};

◆ __tls_sig_hash_algorithm

struct tls_signature_hash_algorithm tls_rsa_pss_pss_sha256 __tls_sig_hash_algorithm
Initial value:
= {
.algorithm = &rsa_encryption_algorithm,
.pubkey = &rsa_algorithm,
.digest = &sha256_algorithm,
}
#define htons(value)
Definition byteswap.h:136
#define TLS_RSA_SHA256_ALGORITHM
Definition tls.h:118

RSA with SHA-256 signature hash algorithm.

RSA-PSS with RSASSA-PSS OID and SHA-256 signature hash algorithm.

RSA-PSS with rsaEncryption OID and SHA-256 signature hash algorithm.

Definition at line 57 of file rsa_sha256.c.

57 {
59 .algorithm = &rsa_encryption_algorithm,
60 .pubkey = &rsa_algorithm,
61 .digest = &sha256_algorithm,
62};