Cryptography Reference
In-Depth Information
RSAkey::RSAkey() for RSA key generation;
RSAkey::export() for exporting public keys;
RSAkey::decrypt() for decryption;
RSAkey::sign() for digital signing using the hash function RIPEMD-160;
as well as a class RSApub for the storage and application of public keys only with
the functions
RSApub::RSApub() for importing a public key from an object of the class
RSAkey ;
RSApub::crypt() for encrypting a text;
RSApub::authenticate() for authenticating a digital signature.
The idea is not merely to look at cryptographic keys as numbers with
particular cryptographic properties, but to consider them as objects that bring
with themselves the methods for their application and make them available to
the outside world but that nonetheless restrictively prevent unmediated access
to private key data. Objects of the class RSAkey thus contain, after the generation
of a key, a public and a private RSA key component as private elements, as well
as the public functions for encryption and signing. Alternatively, the constructor
functions enable the generation of keys
with fixed length and internal initialization of the BBS random number
generator;
with adjustable length and internal initialization of the BBS random
number generator;
with adjustable length and passing of a LINT initialization value for the BBS
random number generator via the calling program.
Objects of the class RSApub contain only the public key, which they must
import from an RSAkey object, and the public functions for encryption and
verification of a signature. To generate an object of the RSApub class, then, an
initialized RSAkey object must already exist. In contrast to objects of type RSAkey ,
RSApub objects are considered unreliable and can be more freely handled than
RSAkey objects, which in serious applications may be transmitted or stored in data
media only in encrypted form or protected by special hardware measures.
Before we realize these example classes we would like to set ourselves
some boundary conditions that will limit the implementation cost at something
appropriate for what is merely an example: For the sake of simplicity, input values
for RSA encryption will be accepted only if they are smaller than the modulus;
a subdivision of longer texts into blocks will not occur. Furthermore, we shall
leave aside the more costly functional and security-related features that would be
 
Search WWH ::




Custom Search