Re: Re: cryptest fails, but only when redirecting output to a file
Jeffrey Walton <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptopp |
|---|---|
| Message-ID | <CAH8yC8nZx-y09O3G-B9+6fa2rzeJX6oT0Kr1Om-zsb2CErGsUQ@mail.gmail.com> |
On Thu, Mar 18, 2021 at 12:24 PM Bart Vandewoestyne <[email protected]> wrote: > > OK... and it seems like MASM_RDSEED_GenerateBlock is a function written in assembler in rdrand.asm. > > Since my assembler knowledge is very limited, I'm lost here. So it looks like the fact that I'm running this using VS2019 causes that assembler code to throw an exception or something? > > Will try again with VS2015 and see if I have the same problem there... Throwing an exception is expected if RDRAND or RDSEED is not available. It is the reason for the try/catch block at https://github.com/weidai11/cryptopp/blob/master/validat3.cpp#L827. bool TestRDRAND() { std::cout << "\nTesting RDRAND generator...\n\n"; bool pass = true; member_ptr<RandomNumberGenerator> rng; try {rng.reset(new RDRAND);} catch (const RDRAND_Err &) {} if (rng.get()) { // Test generator } return pass; } TestRDSEED() does the same thing. The RDRAND exception is raised at https://github.com/weidai11/cryptopp/blob/master/rdrand.cpp#L102. The RDSEED exception is raised at https://github.com/weidai11/cryptopp/blob/master/rdrand.cpp#L212. Jeff -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8nZx-y09O3G-B9%2B6fa2rzeJX6oT0Kr1Om-zsb2CErGsUQ%40mail.gmail.com.