Name
rsa_encipher
Synopsis
void rsa_encipher(Hugeplaintext
, Huge *ciphertext
, RsaPubKeypubkey
);
Return Value
None.
Description
Uses RSA to encipher one block of plaintext specified by
plaintext
. Specify the public key
(e, n) in the
RsaPubKey
structure
pubkey
. A block the same size as
plaintext
is returned in
ciphertext
. It is the responsibility of
the caller to manage the storage required in
ciphertext
. To encipher a large buffer
of data, call rsa_encipher in accordance with
a block cipher mode (see the example earlier in this
chapter).
Complexity
O (1)
Get Mastering Algorithms with C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.