| 636 | } |
| 637 | |
| 638 | bool ValidateElGamal() |
| 639 | { |
| 640 | cout << "\nElGamal validation suite running...\n\n"; |
| 641 | bool pass = true; |
| 642 | { |
| 643 | FileSource fc(CRYPTOPP_DATA_DIR "TestData/elgc1024.dat", true, new HexDecoder); |
| 644 | ElGamalDecryptor privC(fc); |
| 645 | ElGamalEncryptor pubC(privC); |
| 646 | privC.AccessKey().Precompute(); |
| 647 | ByteQueue queue; |
| 648 | privC.AccessKey().SavePrecomputation(queue); |
| 649 | privC.AccessKey().LoadPrecomputation(queue); |
| 650 | |
| 651 | pass = CryptoSystemValidate(privC, pubC) && pass; |
| 652 | } |
| 653 | return pass; |
| 654 | } |
| 655 | |
| 656 | bool ValidateDLIES() |
| 657 | { |