Macros | Functions | Variables
padding.c File Reference
#include <openssl/rsa.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <openssl/bn.h>
#include <openssl/digest.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include "internal.h"
#include "../../internal.h"
Include dependency graph for padding.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RSA_PKCS1_PADDING_SIZE   11
 

Functions

static int PKCS1_MGF1 (uint8_t *out, size_t len, const uint8_t *seed, size_t seed_len, const EVP_MD *md)
 
static int rand_nonzero (uint8_t *out, size_t len)
 
int RSA_padding_add_none (uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len)
 
int RSA_padding_add_PKCS1_OAEP_mgf1 (uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len, const uint8_t *param, size_t param_len, const EVP_MD *md, const EVP_MD *mgf1md)
 
int RSA_padding_add_PKCS1_PSS_mgf1 (const RSA *rsa, unsigned char *EM, const unsigned char *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, int sLenRequested)
 
int RSA_padding_add_PKCS1_type_1 (uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len)
 
int RSA_padding_add_PKCS1_type_2 (uint8_t *to, size_t to_len, const uint8_t *from, size_t from_len)
 
int RSA_padding_check_PKCS1_OAEP_mgf1 (uint8_t *out, size_t *out_len, size_t max_out, const uint8_t *from, size_t from_len, const uint8_t *param, size_t param_len, const EVP_MD *md, const EVP_MD *mgf1md)
 
int RSA_padding_check_PKCS1_type_1 (uint8_t *out, size_t *out_len, size_t max_out, const uint8_t *from, size_t from_len)
 
int RSA_padding_check_PKCS1_type_2 (uint8_t *out, size_t *out_len, size_t max_out, const uint8_t *from, size_t from_len)
 
int RSA_verify_PKCS1_PSS_mgf1 (const RSA *rsa, const uint8_t *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, const uint8_t *EM, int sLen)
 

Variables

static const uint8_t kPSSZeroes [] = {0, 0, 0, 0, 0, 0, 0, 0}
 

Macro Definition Documentation

◆ RSA_PKCS1_PADDING_SIZE

#define RSA_PKCS1_PADDING_SIZE   11

Definition at line 73 of file padding.c.

Function Documentation

◆ PKCS1_MGF1()

static int PKCS1_MGF1 ( uint8_t out,
size_t  len,
const uint8_t seed,
size_t  seed_len,
const EVP_MD md 
)
static

Definition at line 273 of file padding.c.

◆ rand_nonzero()

static int rand_nonzero ( uint8_t out,
size_t  len 
)
static

Definition at line 148 of file padding.c.

◆ RSA_padding_add_none()

int RSA_padding_add_none ( uint8_t to,
size_t  to_len,
const uint8_t from,
size_t  from_len 
)

Definition at line 257 of file padding.c.

◆ RSA_padding_add_PKCS1_OAEP_mgf1()

int RSA_padding_add_PKCS1_OAEP_mgf1 ( uint8_t to,
size_t  to_len,
const uint8_t from,
size_t  from_len,
const uint8_t param,
size_t  param_len,
const EVP_MD md,
const EVP_MD mgf1md 
)

Definition at line 316 of file padding.c.

◆ RSA_padding_add_PKCS1_PSS_mgf1()

int RSA_padding_add_PKCS1_PSS_mgf1 ( const RSA rsa,
unsigned char *  EM,
const unsigned char *  mHash,
const EVP_MD Hash,
const EVP_MD mgf1Hash,
int  sLenRequested 
)

Definition at line 585 of file padding.c.

◆ RSA_padding_add_PKCS1_type_1()

int RSA_padding_add_PKCS1_type_1 ( uint8_t to,
size_t  to_len,
const uint8_t from,
size_t  from_len 
)

Definition at line 75 of file padding.c.

◆ RSA_padding_add_PKCS1_type_2()

int RSA_padding_add_PKCS1_type_2 ( uint8_t to,
size_t  to_len,
const uint8_t from,
size_t  from_len 
)

Definition at line 164 of file padding.c.

◆ RSA_padding_check_PKCS1_OAEP_mgf1()

int RSA_padding_check_PKCS1_OAEP_mgf1 ( uint8_t out,
size_t *  out_len,
size_t  max_out,
const uint8_t from,
size_t  from_len,
const uint8_t param,
size_t  param_len,
const EVP_MD md,
const EVP_MD mgf1md 
)

Definition at line 387 of file padding.c.

◆ RSA_padding_check_PKCS1_type_1()

int RSA_padding_check_PKCS1_type_1 ( uint8_t out,
size_t *  out_len,
size_t  max_out,
const uint8_t from,
size_t  from_len 
)

Definition at line 96 of file padding.c.

◆ RSA_padding_check_PKCS1_type_2()

int RSA_padding_check_PKCS1_type_2 ( uint8_t out,
size_t *  out_len,
size_t  max_out,
const uint8_t from,
size_t  from_len 
)

Definition at line 190 of file padding.c.

◆ RSA_verify_PKCS1_PSS_mgf1()

int RSA_verify_PKCS1_PSS_mgf1 ( const RSA rsa,
const uint8_t mHash,
const EVP_MD Hash,
const EVP_MD mgf1Hash,
const uint8_t EM,
int  sLen 
)

Definition at line 486 of file padding.c.

Variable Documentation

◆ kPSSZeroes

const uint8_t kPSSZeroes[] = {0, 0, 0, 0, 0, 0, 0, 0}
static

Definition at line 484 of file padding.c.



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