| 654 | } |
| 655 | |
| 656 | bool ValidateDLIES() |
| 657 | { |
| 658 | cout << "\nDLIES validation suite running...\n\n"; |
| 659 | bool pass = true; |
| 660 | { |
| 661 | FileSource fc(CRYPTOPP_DATA_DIR "TestData/dlie1024.dat", true, new HexDecoder); |
| 662 | DLIES<>::Decryptor privC(fc); |
| 663 | DLIES<>::Encryptor pubC(privC); |
| 664 | pass = CryptoSystemValidate(privC, pubC) && pass; |
| 665 | } |
| 666 | { |
| 667 | cout << "Generating new encryption key..." << endl; |
| 668 | DLIES<>::GroupParameters gp; |
| 669 | gp.GenerateRandomWithKeySize(GlobalRNG(), 128); |
| 670 | DLIES<>::Decryptor decryptor; |
| 671 | decryptor.AccessKey().GenerateRandom(GlobalRNG(), gp); |
| 672 | DLIES<>::Encryptor encryptor(decryptor); |
| 673 | |
| 674 | pass = CryptoSystemValidate(decryptor, encryptor) && pass; |
| 675 | } |
| 676 | return pass; |
| 677 | } |
| 678 | |
| 679 | bool ValidateNR() |
| 680 | { |