A {@code MakwaPrivateKey} instance encapsulates a Makwa privatekey, i.e. the two prime factors whose product is the Makwa modulus.
A new private key can be generated with {@link #generate}. The target modulus size (in bits) is provided; it must be at least 1273 bits (the normal modulus size is 2048 bits).
Private and public keys can be encoded into array of bytes; the {@link #exportPrivate} and {@link #exportPublic} methods implementthis serialization. Decoding can be done in several ways:
The encoded format for a modulus consists in the concatenation, in that order, of the following:
The encoded format for a private consists in the concatenation, in that order, of the following:
When encoding a private key, the greatest of the two prime factors is supposed to come first.
Instances of {@code MakwaPrivateKey} are immutable andthread-safe.
@version $Revision$ @author Thomas Pornin
|
|
|
|
|
|