Classes | Functions | Variables
p_rsa.c File Reference
#include <openssl/evp.h>
#include <limits.h>
#include <string.h>
#include <openssl/bn.h>
#include <openssl/bytestring.h>
#include <openssl/digest.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include <openssl/nid.h>
#include <openssl/rsa.h>
#include "../internal.h"
#include "../fipsmodule/rsa/internal.h"
#include "internal.h"
Include dependency graph for p_rsa.c:

Go to the source code of this file.

Classes

struct  RSA_OAEP_LABEL_PARAMS
 
struct  RSA_PKEY_CTX
 

Functions

static int check_padding_md (const EVP_MD *md, int padding)
 
int EVP_PKEY_CTX_get0_rsa_oaep_label (EVP_PKEY_CTX *ctx, const uint8_t **out_label)
 
int EVP_PKEY_CTX_get_rsa_mgf1_md (EVP_PKEY_CTX *ctx, const EVP_MD **out_md)
 
int EVP_PKEY_CTX_get_rsa_oaep_md (EVP_PKEY_CTX *ctx, const EVP_MD **out_md)
 
int EVP_PKEY_CTX_get_rsa_padding (EVP_PKEY_CTX *ctx, int *out_padding)
 
int EVP_PKEY_CTX_get_rsa_pss_saltlen (EVP_PKEY_CTX *ctx, int *out_salt_len)
 
int EVP_PKEY_CTX_set0_rsa_oaep_label (EVP_PKEY_CTX *ctx, uint8_t *label, size_t label_len)
 
int EVP_PKEY_CTX_set_rsa_keygen_bits (EVP_PKEY_CTX *ctx, int bits)
 
int EVP_PKEY_CTX_set_rsa_keygen_pubexp (EVP_PKEY_CTX *ctx, BIGNUM *e)
 
int EVP_PKEY_CTX_set_rsa_mgf1_md (EVP_PKEY_CTX *ctx, const EVP_MD *md)
 
int EVP_PKEY_CTX_set_rsa_oaep_md (EVP_PKEY_CTX *ctx, const EVP_MD *md)
 
int EVP_PKEY_CTX_set_rsa_padding (EVP_PKEY_CTX *ctx, int padding)
 
int EVP_PKEY_CTX_set_rsa_pss_keygen_md (EVP_PKEY_CTX *ctx, const EVP_MD *md)
 
int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md (EVP_PKEY_CTX *ctx, const EVP_MD *md)
 
int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen (EVP_PKEY_CTX *ctx, int salt_len)
 
int EVP_PKEY_CTX_set_rsa_pss_saltlen (EVP_PKEY_CTX *ctx, int salt_len)
 
static int is_known_padding (int padding_mode)
 
static void pkey_rsa_cleanup (EVP_PKEY_CTX *ctx)
 
static int pkey_rsa_copy (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
 
static int pkey_rsa_ctrl (EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
 
static int pkey_rsa_decrypt (EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen, const uint8_t *in, size_t inlen)
 
static int pkey_rsa_encrypt (EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen, const uint8_t *in, size_t inlen)
 
static int pkey_rsa_init (EVP_PKEY_CTX *ctx)
 
static int pkey_rsa_keygen (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
 
static int pkey_rsa_sign (EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen, const uint8_t *tbs, size_t tbslen)
 
static int pkey_rsa_verify (EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t siglen, const uint8_t *tbs, size_t tbslen)
 
static int pkey_rsa_verify_recover (EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out_len, const uint8_t *sig, size_t sig_len)
 
static int setup_tbuf (RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk)
 

Variables

const EVP_PKEY_METHOD rsa_pkey_meth
 

Function Documentation

◆ check_padding_md()

static int check_padding_md ( const EVP_MD md,
int  padding 
)
static

Definition at line 371 of file p_rsa.c.

◆ EVP_PKEY_CTX_get0_rsa_oaep_label()

int EVP_PKEY_CTX_get0_rsa_oaep_label ( EVP_PKEY_CTX ctx,
const uint8_t **  out_label 
)

Definition at line 635 of file p_rsa.c.

◆ EVP_PKEY_CTX_get_rsa_mgf1_md()

int EVP_PKEY_CTX_get_rsa_mgf1_md ( EVP_PKEY_CTX ctx,
const EVP_MD **  out_md 
)

Definition at line 622 of file p_rsa.c.

◆ EVP_PKEY_CTX_get_rsa_oaep_md()

int EVP_PKEY_CTX_get_rsa_oaep_md ( EVP_PKEY_CTX ctx,
const EVP_MD **  out_md 
)

Definition at line 611 of file p_rsa.c.

◆ EVP_PKEY_CTX_get_rsa_padding()

int EVP_PKEY_CTX_get_rsa_padding ( EVP_PKEY_CTX ctx,
int out_padding 
)

Definition at line 566 of file p_rsa.c.

◆ EVP_PKEY_CTX_get_rsa_pss_saltlen()

int EVP_PKEY_CTX_get_rsa_pss_saltlen ( EVP_PKEY_CTX ctx,
int out_salt_len 
)

Definition at line 590 of file p_rsa.c.

◆ EVP_PKEY_CTX_set0_rsa_oaep_label()

int EVP_PKEY_CTX_set0_rsa_oaep_label ( EVP_PKEY_CTX ctx,
uint8_t label,
size_t  label_len 
)

Definition at line 628 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_keygen_bits()

int EVP_PKEY_CTX_set_rsa_keygen_bits ( EVP_PKEY_CTX ctx,
int  bits 
)

Definition at line 596 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_keygen_pubexp()

int EVP_PKEY_CTX_set_rsa_keygen_pubexp ( EVP_PKEY_CTX ctx,
BIGNUM e 
)

Definition at line 601 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_mgf1_md()

int EVP_PKEY_CTX_set_rsa_mgf1_md ( EVP_PKEY_CTX ctx,
const EVP_MD md 
)

Definition at line 616 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_oaep_md()

int EVP_PKEY_CTX_set_rsa_oaep_md ( EVP_PKEY_CTX ctx,
const EVP_MD md 
)

Definition at line 606 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_padding()

int EVP_PKEY_CTX_set_rsa_padding ( EVP_PKEY_CTX ctx,
int  padding 
)

Definition at line 561 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_pss_keygen_md()

int EVP_PKEY_CTX_set_rsa_pss_keygen_md ( EVP_PKEY_CTX ctx,
const EVP_MD md 
)

Definition at line 571 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md()

int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md ( EVP_PKEY_CTX ctx,
const EVP_MD md 
)

Definition at line 579 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen()

int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen ( EVP_PKEY_CTX ctx,
int  salt_len 
)

Definition at line 575 of file p_rsa.c.

◆ EVP_PKEY_CTX_set_rsa_pss_saltlen()

int EVP_PKEY_CTX_set_rsa_pss_saltlen ( EVP_PKEY_CTX ctx,
int  salt_len 
)

Definition at line 584 of file p_rsa.c.

◆ is_known_padding()

static int is_known_padding ( int  padding_mode)
static

Definition at line 384 of file p_rsa.c.

◆ pkey_rsa_cleanup()

static void pkey_rsa_cleanup ( EVP_PKEY_CTX ctx)
static

Definition at line 147 of file p_rsa.c.

◆ pkey_rsa_copy()

static int pkey_rsa_copy ( EVP_PKEY_CTX dst,
EVP_PKEY_CTX src 
)
static

Definition at line 116 of file p_rsa.c.

◆ pkey_rsa_ctrl()

static int pkey_rsa_ctrl ( EVP_PKEY_CTX ctx,
int  type,
int  p1,
void *  p2 
)
static

Definition at line 396 of file p_rsa.c.

◆ pkey_rsa_decrypt()

static int pkey_rsa_decrypt ( EVP_PKEY_CTX ctx,
uint8_t out,
size_t *  outlen,
const uint8_t in,
size_t  inlen 
)
static

Definition at line 338 of file p_rsa.c.

◆ pkey_rsa_encrypt()

static int pkey_rsa_encrypt ( EVP_PKEY_CTX ctx,
uint8_t out,
size_t *  outlen,
const uint8_t in,
size_t  inlen 
)
static

Definition at line 307 of file p_rsa.c.

◆ pkey_rsa_init()

static int pkey_rsa_init ( EVP_PKEY_CTX ctx)
static

Definition at line 99 of file p_rsa.c.

◆ pkey_rsa_keygen()

static int pkey_rsa_keygen ( EVP_PKEY_CTX ctx,
EVP_PKEY pkey 
)
static

Definition at line 519 of file p_rsa.c.

◆ pkey_rsa_sign()

static int pkey_rsa_sign ( EVP_PKEY_CTX ctx,
uint8_t sig,
size_t *  siglen,
const uint8_t tbs,
size_t  tbslen 
)
static

Definition at line 171 of file p_rsa.c.

◆ pkey_rsa_verify()

static int pkey_rsa_verify ( EVP_PKEY_CTX ctx,
const uint8_t sig,
size_t  siglen,
const uint8_t tbs,
size_t  tbslen 
)
static

Definition at line 209 of file p_rsa.c.

◆ pkey_rsa_verify_recover()

static int pkey_rsa_verify_recover ( EVP_PKEY_CTX ctx,
uint8_t out,
size_t *  out_len,
const uint8_t sig,
size_t  sig_len 
)
static

Definition at line 242 of file p_rsa.c.

◆ setup_tbuf()

static int setup_tbuf ( RSA_PKEY_CTX ctx,
EVP_PKEY_CTX pk 
)
static

Definition at line 160 of file p_rsa.c.

Variable Documentation

◆ rsa_pkey_meth

const EVP_PKEY_METHOD rsa_pkey_meth
pkey_rsa_encrypt
static int pkey_rsa_encrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen, const uint8_t *in, size_t inlen)
Definition: p_rsa.c:307
pkey_rsa_decrypt
static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen, const uint8_t *in, size_t inlen)
Definition: p_rsa.c:338
pkey_rsa_keygen
static int pkey_rsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
Definition: p_rsa.c:519
pkey_rsa_verify_recover
static int pkey_rsa_verify_recover(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out_len, const uint8_t *sig, size_t sig_len)
Definition: p_rsa.c:242
EVP_PKEY_RSA
#define EVP_PKEY_RSA
Definition: evp.h:175
pkey_rsa_sign
static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen, const uint8_t *tbs, size_t tbslen)
Definition: p_rsa.c:171
pkey_rsa_verify
static int pkey_rsa_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t siglen, const uint8_t *tbs, size_t tbslen)
Definition: p_rsa.c:209
pkey_rsa_copy
static int pkey_rsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
Definition: p_rsa.c:116
pkey_rsa_cleanup
static void pkey_rsa_cleanup(EVP_PKEY_CTX *ctx)
Definition: p_rsa.c:147
pkey_rsa_init
static int pkey_rsa_init(EVP_PKEY_CTX *ctx)
Definition: p_rsa.c:99
pkey_rsa_ctrl
static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
Definition: p_rsa.c:396


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:25