cryptix.test
Class TestElGamal
public
class
TestElGamal
extends BaseTest
This object tests the RawElGamal* and *_ElGamal_PKCS1 classes, by
generating 6 keypairs with varying strength (384- to 1024-bit in 128-bit
increments). It then tests each newly created keypair by:
- signing a fixed string with the private key and verifying the
obtained signature with the public one.
- checking that a slightly-modified signature will not pass verification.
- encrypting a random string, decrypting it, and checking that the
result matches the original.
Note: we should really test against fixed conformance data, to ensure
interoperability with other implementations. Randomised tests are useful but
not sufficient.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.8 $
Since: Cryptix 2.2.2
Author: David Hopwood Raif S. Naffah
protected void engineTest()
public static void main(String[] args)