SWILIB API (SG)    
Loading...
Searching...
No Matches
rsaref.h File Reference
#include "rsa.h"

Go to the source code of this file.

Data Structures

struct  RSArefPublicKey_st
 
struct  RSArefPrivateKey_st
 
struct  RSARandomState_st
 

Macros

#define RSAref_MAX_BITS   1024
 
#define RSAref_MIN_BITS   508
 
#define RSAref_MAX_LEN   ((RSAref_MAX_BITS+7)/8)
 
#define RSAref_MAX_PBITS   (RSAref_MAX_BITS+1)/2
 
#define RSAref_MAX_PLEN   ((RSAref_MAX_PBITS+7)/8)
 
#define RE_CONTENT_ENCODING   0x0400
 
#define RE_DATA   0x0401
 
#define RE_DIGEST_ALGORITHM   0x0402
 
#define RE_ENCODING   0x0403
 
#define RE_KEY   0x0404
 
#define RE_KEY_ENCODING   0x0405
 
#define RE_LEN   0x0406
 
#define RE_MODULUS_LEN   0x0407
 
#define RE_NEED_RANDOM   0x0408
 
#define RE_PRIVATE_KEY   0x0409
 
#define RE_PUBLIC_KEY   0x040a
 
#define RE_SIGNATURE   0x040b
 
#define RE_SIGNATURE_ENCODING   0x040c
 
#define RE_ENCRYPTION_ALGORITHM   0x040d
 
#define RSAREF_F_BN_REF_MOD_EXP   100
 
#define RSAREF_F_RSAREF_BN2BIN   101
 
#define RSAREF_F_RSA_BN2BIN   102
 
#define RSAREF_F_RSA_PRIVATE_DECRYPT   103
 
#define RSAREF_F_RSA_PRIVATE_ENCRYPT   104
 
#define RSAREF_F_RSA_PUBLIC_DECRYPT   105
 
#define RSAREF_F_RSA_PUBLIC_ENCRYPT   106
 
#define RSAREF_F_RSA_REF_BN2BIN   107
 
#define RSAREF_F_RSA_REF_MOD_EXP   108
 
#define RSAREF_F_RSA_REF_PRIVATE_DECRYPT   109
 
#define RSAREF_F_RSA_REF_PRIVATE_ENCRYPT   110
 
#define RSAREF_F_RSA_REF_PUBLIC_DECRYPT   111
 
#define RSAREF_F_RSA_REF_PUBLIC_ENCRYPT   112
 
#define RSAREF_R_CONTENT_ENCODING   0x0400
 
#define RSAREF_R_DATA   0x0401
 
#define RSAREF_R_DIGEST_ALGORITHM   0x0402
 
#define RSAREF_R_ENCODING   0x0403
 
#define RSAREF_R_ENCRYPTION_ALGORITHM   0x040d
 
#define RSAREF_R_KEY   0x0404
 
#define RSAREF_R_KEY_ENCODING   0x0405
 
#define RSAREF_R_LEN   0x0406
 
#define RSAREF_R_MODULUS_LEN   0x0407
 
#define RSAREF_R_NEED_RANDOM   0x0408
 
#define RSAREF_R_PRIVATE_KEY   0x0409
 
#define RSAREF_R_PUBLIC_KEY   0x040a
 
#define RSAREF_R_SIGNATURE   0x040b
 
#define RSAREF_R_SIGNATURE_ENCODING   0x040c
 

Typedefs

typedef struct RSArefPublicKey_st RSArefPublicKey
 
typedef struct RSArefPrivateKey_st RSArefPrivateKey
 
typedef struct RSARandomState_st RSARandomState
 

Functions

int RSAPrivateDecrypt (unsigned char *to, int *outlen, unsigned char *from, int len, RSArefPrivateKey *RSAkey)
 
int RSAPrivateEncrypt (unsigned char *to, int *outlen, unsigned char *from, int len, RSArefPrivateKey *RSAkey)
 
int RSAPublicDecrypt (unsigned char *to, int *outlen, unsigned char *from, int len, RSArefPublicKey *RSAkey)
 
int RSAPublicEncrypt (unsigned char *to, int *outlen, unsigned char *from, int len, RSArefPublicKey *RSAkey, RSARandomState *rnd)
 
int R_RandomInit (RSARandomState *rnd)
 
int R_GetRandomBytesNeeded (unsigned int *, RSARandomState *rnd)
 
int R_RandomUpdate (RSARandomState *rnd, unsigned char *data, unsigned int n)
 
int R_RandomFinal (RSARandomState *rnd)
 
void ERR_load_RSAREF_strings (void)
 
RSA_METHOD * RSA_PKCS1_RSAref (void)
 

Data Structure Documentation

◆ RSArefPublicKey_st

struct RSArefPublicKey_st

◆ RSArefPrivateKey_st

struct RSArefPrivateKey_st

◆ RSARandomState_st

struct RSARandomState_st

Macro Definition Documentation

◆ RSAref_MAX_BITS

#define RSAref_MAX_BITS   1024

Definition at line 73 of file rsaref.h.

◆ RSAref_MIN_BITS

#define RSAref_MIN_BITS   508

Definition at line 75 of file rsaref.h.

◆ RSAref_MAX_LEN

#define RSAref_MAX_LEN   ((RSAref_MAX_BITS+7)/8)

Definition at line 76 of file rsaref.h.

◆ RSAref_MAX_PBITS

#define RSAref_MAX_PBITS   (RSAref_MAX_BITS+1)/2

Definition at line 77 of file rsaref.h.

◆ RSAref_MAX_PLEN

#define RSAref_MAX_PLEN   ((RSAref_MAX_PBITS+7)/8)

Definition at line 78 of file rsaref.h.

◆ RE_CONTENT_ENCODING

#define RE_CONTENT_ENCODING   0x0400

Definition at line 106 of file rsaref.h.

◆ RE_DATA

#define RE_DATA   0x0401

Definition at line 107 of file rsaref.h.

◆ RE_DIGEST_ALGORITHM

#define RE_DIGEST_ALGORITHM   0x0402

Definition at line 108 of file rsaref.h.

◆ RE_ENCODING

#define RE_ENCODING   0x0403

Definition at line 109 of file rsaref.h.

◆ RE_KEY

#define RE_KEY   0x0404

Definition at line 110 of file rsaref.h.

◆ RE_KEY_ENCODING

#define RE_KEY_ENCODING   0x0405

Definition at line 111 of file rsaref.h.

◆ RE_LEN

#define RE_LEN   0x0406

Definition at line 112 of file rsaref.h.

◆ RE_MODULUS_LEN

#define RE_MODULUS_LEN   0x0407

Definition at line 113 of file rsaref.h.

◆ RE_NEED_RANDOM

#define RE_NEED_RANDOM   0x0408

Definition at line 114 of file rsaref.h.

◆ RE_PRIVATE_KEY

#define RE_PRIVATE_KEY   0x0409

Definition at line 115 of file rsaref.h.

◆ RE_PUBLIC_KEY

#define RE_PUBLIC_KEY   0x040a

Definition at line 116 of file rsaref.h.

◆ RE_SIGNATURE

#define RE_SIGNATURE   0x040b

Definition at line 117 of file rsaref.h.

◆ RE_SIGNATURE_ENCODING

#define RE_SIGNATURE_ENCODING   0x040c

Definition at line 118 of file rsaref.h.

◆ RE_ENCRYPTION_ALGORITHM

#define RE_ENCRYPTION_ALGORITHM   0x040d

Definition at line 119 of file rsaref.h.

◆ RSAREF_F_BN_REF_MOD_EXP

#define RSAREF_F_BN_REF_MOD_EXP   100

Definition at line 146 of file rsaref.h.

◆ RSAREF_F_RSAREF_BN2BIN

#define RSAREF_F_RSAREF_BN2BIN   101

Definition at line 147 of file rsaref.h.

◆ RSAREF_F_RSA_BN2BIN

#define RSAREF_F_RSA_BN2BIN   102

Definition at line 148 of file rsaref.h.

◆ RSAREF_F_RSA_PRIVATE_DECRYPT

#define RSAREF_F_RSA_PRIVATE_DECRYPT   103

Definition at line 149 of file rsaref.h.

◆ RSAREF_F_RSA_PRIVATE_ENCRYPT

#define RSAREF_F_RSA_PRIVATE_ENCRYPT   104

Definition at line 150 of file rsaref.h.

◆ RSAREF_F_RSA_PUBLIC_DECRYPT

#define RSAREF_F_RSA_PUBLIC_DECRYPT   105

Definition at line 151 of file rsaref.h.

◆ RSAREF_F_RSA_PUBLIC_ENCRYPT

#define RSAREF_F_RSA_PUBLIC_ENCRYPT   106

Definition at line 152 of file rsaref.h.

◆ RSAREF_F_RSA_REF_BN2BIN

#define RSAREF_F_RSA_REF_BN2BIN   107

Definition at line 153 of file rsaref.h.

◆ RSAREF_F_RSA_REF_MOD_EXP

#define RSAREF_F_RSA_REF_MOD_EXP   108

Definition at line 154 of file rsaref.h.

◆ RSAREF_F_RSA_REF_PRIVATE_DECRYPT

#define RSAREF_F_RSA_REF_PRIVATE_DECRYPT   109

Definition at line 155 of file rsaref.h.

◆ RSAREF_F_RSA_REF_PRIVATE_ENCRYPT

#define RSAREF_F_RSA_REF_PRIVATE_ENCRYPT   110

Definition at line 156 of file rsaref.h.

◆ RSAREF_F_RSA_REF_PUBLIC_DECRYPT

#define RSAREF_F_RSA_REF_PUBLIC_DECRYPT   111

Definition at line 157 of file rsaref.h.

◆ RSAREF_F_RSA_REF_PUBLIC_ENCRYPT

#define RSAREF_F_RSA_REF_PUBLIC_ENCRYPT   112

Definition at line 158 of file rsaref.h.

◆ RSAREF_R_CONTENT_ENCODING

#define RSAREF_R_CONTENT_ENCODING   0x0400

Definition at line 161 of file rsaref.h.

◆ RSAREF_R_DATA

#define RSAREF_R_DATA   0x0401

Definition at line 162 of file rsaref.h.

◆ RSAREF_R_DIGEST_ALGORITHM

#define RSAREF_R_DIGEST_ALGORITHM   0x0402

Definition at line 163 of file rsaref.h.

◆ RSAREF_R_ENCODING

#define RSAREF_R_ENCODING   0x0403

Definition at line 164 of file rsaref.h.

◆ RSAREF_R_ENCRYPTION_ALGORITHM

#define RSAREF_R_ENCRYPTION_ALGORITHM   0x040d

Definition at line 165 of file rsaref.h.

◆ RSAREF_R_KEY

#define RSAREF_R_KEY   0x0404

Definition at line 166 of file rsaref.h.

◆ RSAREF_R_KEY_ENCODING

#define RSAREF_R_KEY_ENCODING   0x0405

Definition at line 167 of file rsaref.h.

◆ RSAREF_R_LEN

#define RSAREF_R_LEN   0x0406

Definition at line 168 of file rsaref.h.

◆ RSAREF_R_MODULUS_LEN

#define RSAREF_R_MODULUS_LEN   0x0407

Definition at line 169 of file rsaref.h.

◆ RSAREF_R_NEED_RANDOM

#define RSAREF_R_NEED_RANDOM   0x0408

Definition at line 170 of file rsaref.h.

◆ RSAREF_R_PRIVATE_KEY

#define RSAREF_R_PRIVATE_KEY   0x0409

Definition at line 171 of file rsaref.h.

◆ RSAREF_R_PUBLIC_KEY

#define RSAREF_R_PUBLIC_KEY   0x040a

Definition at line 172 of file rsaref.h.

◆ RSAREF_R_SIGNATURE

#define RSAREF_R_SIGNATURE   0x040b

Definition at line 173 of file rsaref.h.

◆ RSAREF_R_SIGNATURE_ENCODING

#define RSAREF_R_SIGNATURE_ENCODING   0x040c

Definition at line 174 of file rsaref.h.

Typedef Documentation

◆ RSArefPublicKey

◆ RSArefPrivateKey

◆ RSARandomState

Function Documentation

◆ RSAPrivateDecrypt()

int RSAPrivateDecrypt ( unsigned char * to,
int * outlen,
unsigned char * from,
int len,
RSArefPrivateKey * RSAkey )

◆ RSAPrivateEncrypt()

int RSAPrivateEncrypt ( unsigned char * to,
int * outlen,
unsigned char * from,
int len,
RSArefPrivateKey * RSAkey )

◆ RSAPublicDecrypt()

int RSAPublicDecrypt ( unsigned char * to,
int * outlen,
unsigned char * from,
int len,
RSArefPublicKey * RSAkey )

◆ RSAPublicEncrypt()

int RSAPublicEncrypt ( unsigned char * to,
int * outlen,
unsigned char * from,
int len,
RSArefPublicKey * RSAkey,
RSARandomState * rnd )

◆ R_RandomInit()

int R_RandomInit ( RSARandomState * rnd)

◆ R_GetRandomBytesNeeded()

int R_GetRandomBytesNeeded ( unsigned int * ,
RSARandomState * rnd )

◆ R_RandomUpdate()

int R_RandomUpdate ( RSARandomState * rnd,
unsigned char * data,
unsigned int n )

◆ R_RandomFinal()

int R_RandomFinal ( RSARandomState * rnd)

◆ ERR_load_RSAREF_strings()

void ERR_load_RSAREF_strings ( void )

◆ RSA_PKCS1_RSAref()

RSA_METHOD * RSA_PKCS1_RSAref ( void )