iPXE
Data Structures | Defines | 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...

Defines

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

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)

Variables

struct pubkey_algorithm rsa_algorithm
 RSA public-key algorithm.

Detailed Description

RSA public-key cryptography.

Definition in file rsa.h.


Define Documentation

#define RSA_DIGESTALGORITHM_CONTENTS (   ...)
Value:
ASN1_OID, VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__,            \
        ASN1_NULL, 0x00

RSA digestAlgorithm sequence contents.

Definition at line 18 of file rsa.h.

#define RSA_DIGESTALGORITHM (   ...)
Value:
ASN1_SEQUENCE,                                                  \
        VA_ARG_COUNT ( RSA_DIGESTALGORITHM_CONTENTS ( __VA_ARGS__ ) ),  \
        RSA_DIGESTALGORITHM_CONTENTS ( __VA_ARGS__ )

RSA digestAlgorithm sequence.

Definition at line 23 of file rsa.h.

#define RSA_DIGEST_PREFIX (   digest_size)    ASN1_OCTET_STRING, digest_size

RSA digest prefix.

Definition at line 29 of file rsa.h.

#define RSA_DIGESTINFO_PREFIX (   digest_size,
  ... 
)
Value:
ASN1_SEQUENCE,                                                  \
        ( 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 )

RSA digestInfo prefix.

Definition at line 33 of file rsa.h.

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

RSA digestInfo prefix table.

Definition at line 52 of file rsa.h.

Referenced by rsa_find_prefix().

Declare an RSA digestInfo prefix.

Definition at line 56 of file rsa.h.

#define RSA_CTX_SIZE   sizeof ( struct rsa_context )

RSA context size.

Definition at line 81 of file rsa.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

Variable Documentation

RSA public-key algorithm.

Definition at line 626 of file rsa.c.