2019-10-15 20:28:02 +02:00
|
|
|
/*
|
2020-04-23 13:55:52 +01:00
|
|
|
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
|
2019-10-15 20:28:02 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSSL_INTERNAL_RSA_H
|
|
|
|
# define OSSL_INTERNAL_RSA_H
|
|
|
|
|
2020-03-23 05:40:47 +01:00
|
|
|
#include <openssl/core.h>
|
2019-10-15 20:28:02 +02:00
|
|
|
#include <openssl/rsa.h>
|
|
|
|
|
2020-01-17 14:47:18 +00:00
|
|
|
RSA *rsa_new_with_ctx(OPENSSL_CTX *libctx);
|
|
|
|
|
2019-10-15 20:28:02 +02:00
|
|
|
int rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
|
|
|
|
const STACK_OF(BIGNUM) *exps,
|
|
|
|
const STACK_OF(BIGNUM) *coeffs);
|
|
|
|
int rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
|
|
|
|
STACK_OF(BIGNUM_const) *exps,
|
|
|
|
STACK_OF(BIGNUM_const) *coeffs);
|
2020-03-23 05:40:47 +01:00
|
|
|
int rsa_fromdata(RSA *rsa, const OSSL_PARAM params[]);
|
2019-11-11 14:37:02 +00:00
|
|
|
|
2020-03-12 14:41:45 +00:00
|
|
|
int rsa_padding_check_PKCS1_type_2_TLS(OPENSSL_CTX *ctx, unsigned char *to,
|
|
|
|
size_t tlen, const unsigned char *from,
|
|
|
|
size_t flen, int client_version,
|
|
|
|
int alt_version);
|
2020-01-29 20:32:32 +10:00
|
|
|
|
|
|
|
int rsa_validate_public(const RSA *key);
|
|
|
|
int rsa_validate_private(const RSA *key);
|
|
|
|
int rsa_validate_pairwise(const RSA *key);
|
|
|
|
|
2019-12-01 15:01:50 +01:00
|
|
|
int int_rsa_verify(int dtype, const unsigned char *m,
|
|
|
|
unsigned int m_len, unsigned char *rm,
|
|
|
|
size_t *prm_len, const unsigned char *sigbuf,
|
|
|
|
size_t siglen, RSA *rsa);
|
|
|
|
|
|
|
|
const unsigned char *rsa_digestinfo_encoding(int md_nid, size_t *len);
|
|
|
|
const unsigned char *rsa_algorithmidentifier_encoding(int md_nid, size_t *len);
|
|
|
|
|
2020-04-01 15:51:18 +10:00
|
|
|
extern const char *rsa_mp_factor_names[];
|
|
|
|
extern const char *rsa_mp_exp_names[];
|
|
|
|
extern const char *rsa_mp_coeff_names[];
|
|
|
|
|
2019-10-15 20:28:02 +02:00
|
|
|
#endif
|