heimdal  7.7.0
About: Heimdal is a free implementation of Kerberos 5 (a system for authenticating users and services on a network).
  Fossies Dox: heimdal-7.7.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

RSA functions

See the RSA - public-key cryptography for description and examples. More...

Functions

RSARSA_new (void)
 
RSARSA_new_method (ENGINE *engine)
 
void RSA_free (RSA *rsa)
 
int RSA_up_ref (RSA *rsa)
 
const RSA_METHODRSA_get_method (const RSA *rsa)
 
int RSA_set_method (RSA *rsa, const RSA_METHOD *method)
 
int RSA_set_app_data (RSA *rsa, void *arg)
 
voidRSA_get_app_data (const RSA *rsa)
 

Detailed Description

See the RSA - public-key cryptography for description and examples.

Function Documentation

◆ RSA_free()

void RSA_free ( RSA rsa)

Free an allocation RSA object.

Parameters
rsathe RSA object to free.

Definition at line 139 of file rsa.c.

References ENGINE_finish(), and free_if.

Referenced by _hx509_public_encrypt(), d2i_RSAPrivateKey(), d2i_RSAPublicKey(), get_key(), hx509_private_key_assign_rsa(), hx509_private_key_free(), main(), match_keys_rsa(), and rsa_verify_signature().

◆ RSA_get_app_data()

void* RSA_get_app_data ( const RSA rsa)

Get the application data for the RSA object.

Parameters
rsathe rsa object to get the parameter for
Returns
the data object

Definition at line 256 of file rsa.c.

◆ RSA_get_method()

const RSA_METHOD* RSA_get_method ( const RSA rsa)

Return the RSA_METHOD used for this RSA object.

Parameters
rsathe object to get the method from.
Returns
the method used for this RSA object.

Definition at line 196 of file rsa.c.

◆ RSA_new()

RSA* RSA_new ( void  )

Same as RSA_new_method() using NULL as engine.

Returns
a newly allocated RSA object. Free with RSA_free().

Definition at line 79 of file rsa.c.

References RSA_new_method().

Referenced by d2i_RSAPrivateKey(), d2i_RSAPublicKey(), get_key(), match_keys_rsa(), and rsa_generate_private_key().

◆ RSA_new_method()

RSA* RSA_new_method ( ENGINE engine)

Allocate a new RSA object using the engine, if NULL is specified as the engine, use the default RSA engine as returned by ENGINE_get_default_RSA().

Parameters
engineSpecific what ENGINE RSA provider should be used.
Returns
a newly allocated RSA object. Free with RSA_free().

Definition at line 97 of file rsa.c.

References ENGINE_finish(), ENGINE_get_default_RSA(), ENGINE_get_RSA(), ENGINE_up_ref(), RSA, and RSA_get_default_method().

Referenced by main(), and RSA_new().

◆ RSA_set_app_data()

int RSA_set_app_data ( RSA rsa,
void arg 
)

Set the application data for the RSA object.

Parameters
rsathe rsa object to set the parameter for
argthe data object to store
Returns
1 on success.

Definition at line 239 of file rsa.c.

◆ RSA_set_method()

int RSA_set_method ( RSA rsa,
const RSA_METHOD method 
)

Set a new method for the RSA keypair.

Parameters
rsarsa parameter.
methodthe new method for the RSA parameter.
Returns
1 on success.

Definition at line 213 of file rsa.c.

References ENGINE_finish().

Referenced by main(), and read_key().

◆ RSA_up_ref()

int RSA_up_ref ( RSA rsa)

Add an extra reference to the RSA object. The object should be free with RSA_free() to drop the reference.

Parameters
rsathe object to add reference counting too.
Returns
the current reference count, can't safely be used except for debug printing.

Definition at line 180 of file rsa.c.