# rsa_context Struct Reference

`#include <rsa.h>`

## Detailed Description

RSA context structure.

Definition at line 123 of file rsa.h.

## Data Fields
mpi | D
mpi | DP
mpi | DQ
mpi | E
int(* | f_rng )(void *)
int | hash_id
int | len
mpi | N
mpi | P
void * | p_rng
int | padding
mpi | Q
mpi | QP
mpi | RN
mpi | RP
mpi | RQ
int | ver

## Field Documentation

mpi rsa_context::D

private exponent

Definition at line 131 of file rsa.h.

mpi rsa_context::DP

D % (P - 1)

Definition at line 134 of file rsa.h.

mpi rsa_context::DQ

D % (Q - 1)

Definition at line 135 of file rsa.h.

mpi rsa_context::E

public exponent

Definition at line 129 of file rsa.h.

Referenced by d2i_RSA_PUBKEY().

int(* rsa_context::f_rng)(void *)

RNG function

int rsa_context::hash_id

hash identifier

Definition at line 143 of file rsa.h.

int rsa_context::len

size(N) in chars

Definition at line 126 of file rsa.h.

Referenced by d2i_RSA_PUBKEY().

mpi rsa_context::N

public modulus

Definition at line 128 of file rsa.h.

Referenced by d2i_RSA_PUBKEY().

mpi rsa_context::P

1st prime factor

Definition at line 132 of file rsa.h.

void* rsa_context::p_rng

RNG parameter

Definition at line 145 of file rsa.h.

int rsa_context::padding

1.5 or OAEP/PSS

Definition at line 142 of file rsa.h.

mpi rsa_context::Q

2nd prime factor

Definition at line 133 of file rsa.h.

mpi rsa_context::QP

1 / (Q % P)

Definition at line 136 of file rsa.h.

mpi rsa_context::RN

cached R^2 mod N

Definition at line 138 of file rsa.h.

mpi rsa_context::RP

cached R^2 mod P

Definition at line 139 of file rsa.h.

mpi rsa_context::RQ

cached R^2 mod Q

Definition at line 140 of file rsa.h.

int rsa_context::ver

always 0

Definition at line 125 of file rsa.h.