iPXE
Data Structures | Macros | Functions | Variables
rsa.h File Reference

RSA public-key cryptography. More...

#include <stdarg.h>
#include <ipxe/crypto.h>
#include <ipxe/bigint.h>
#include <ipxe/asn1.h>
#include <ipxe/tables.h>

Go to the source code of this file.

Data Structures

struct  rsa_digestinfo_prefix
 An RSA digestInfo prefix. More...
 
struct  rsa_context
 An RSA context. More...
 

Macros

#define RSA_DIGESTALGORITHM_CONTENTS(...)
 RSA digestAlgorithm sequence contents. More...
 
#define RSA_DIGESTALGORITHM(...)
 RSA digestAlgorithm sequence. More...
 
#define RSA_DIGEST_PREFIX(digest_size)   ASN1_OCTET_STRING, digest_size
 RSA digest prefix. More...
 
#define RSA_DIGESTINFO_PREFIX(digest_size, ...)
 RSA digestInfo prefix. More...
 
#define RSA_DIGESTINFO_PREFIXES   __table ( struct rsa_digestinfo_prefix, "rsa_digestinfo_prefixes" )
 RSA digestInfo prefix table. More...
 
#define __rsa_digestinfo_prefix   __table_entry ( RSA_DIGESTINFO_PREFIXES, 01 )
 Declare an RSA digestInfo prefix. More...
 
#define RSA_CTX_SIZE   sizeof ( struct rsa_context )
 RSA context size. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Variables

struct pubkey_algorithm rsa_algorithm
 RSA public-key algorithm. More...
 

Detailed Description

RSA public-key cryptography.

Definition in file rsa.h.

Macro Definition Documentation

◆ RSA_DIGESTALGORITHM_CONTENTS

#define RSA_DIGESTALGORITHM_CONTENTS (   ...)
Value:
ASN1_OID, VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__, \
ASN1_NULL, 0x00
#define VA_ARG_COUNT(...)
Definition: stdarg.h:27
#define ASN1_OID
ASN.1 object identifier.
Definition: asn1.h:73

RSA digestAlgorithm sequence contents.

Definition at line 18 of file rsa.h.

◆ RSA_DIGESTALGORITHM

#define RSA_DIGESTALGORITHM (   ...)
Value:
VA_ARG_COUNT ( RSA_DIGESTALGORITHM_CONTENTS ( __VA_ARGS__ ) ), \
RSA_DIGESTALGORITHM_CONTENTS ( __VA_ARGS__ )
#define RSA_DIGESTALGORITHM_CONTENTS(...)
RSA digestAlgorithm sequence contents.
Definition: rsa.h:18
#define ASN1_SEQUENCE
ASN.1 sequence.
Definition: asn1.h:85

RSA digestAlgorithm sequence.

Definition at line 23 of file rsa.h.

◆ RSA_DIGEST_PREFIX

#define RSA_DIGEST_PREFIX (   digest_size)    ASN1_OCTET_STRING, digest_size

RSA digest prefix.

Definition at line 29 of file rsa.h.

◆ RSA_DIGESTINFO_PREFIX

#define RSA_DIGESTINFO_PREFIX (   digest_size,
  ... 
)
Value:
( VA_ARG_COUNT ( RSA_DIGESTALGORITHM ( __VA_ARGS__ ) ) + \
VA_ARG_COUNT ( RSA_DIGEST_PREFIX ( digest_size ) ) + \
digest_size ), \
RSA_DIGESTALGORITHM ( __VA_ARGS__ ), \
RSA_DIGEST_PREFIX ( digest_size )
#define VA_ARG_COUNT(...)
Definition: stdarg.h:27
#define RSA_DIGESTALGORITHM(...)
RSA digestAlgorithm sequence.
Definition: rsa.h:23
#define ASN1_SEQUENCE
ASN.1 sequence.
Definition: asn1.h:85
#define RSA_DIGEST_PREFIX(digest_size)
RSA digest prefix.
Definition: rsa.h:29

RSA digestInfo prefix.

Definition at line 33 of file rsa.h.

◆ RSA_DIGESTINFO_PREFIXES

#define RSA_DIGESTINFO_PREFIXES   __table ( struct rsa_digestinfo_prefix, "rsa_digestinfo_prefixes" )

RSA digestInfo prefix table.

Definition at line 52 of file rsa.h.

◆ __rsa_digestinfo_prefix

#define __rsa_digestinfo_prefix   __table_entry ( RSA_DIGESTINFO_PREFIXES, 01 )

Declare an RSA digestInfo prefix.

Definition at line 56 of file rsa.h.

◆ RSA_CTX_SIZE

#define RSA_CTX_SIZE   sizeof ( struct rsa_context )

RSA context size.

Definition at line 81 of file rsa.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

Variable Documentation

◆ rsa_algorithm

struct pubkey_algorithm rsa_algorithm

RSA public-key algorithm.

Definition at line 626 of file rsa.c.