Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

getRandomBN error when using OpenMP, if using RDSEED #57

@zfscgy

Description

@zfscgy

I use OpenMP for parallel encrypting multiple plaintexts. However, after running for some time, the program crashes with
"getRandomBN: generate random big number error." This error is very weird since:

  • It happens with OpenMP and does not happen when OpenMP is disabled.
  • The error mysteriously disappears when I add some std::cout codes in the function ippGenRandomBN for debugging. I don't know why the error could be related to std::cout.
  • The error happens somewhat randomly, and before the error occurs, all computation is correct.

Finally, I was able to locate the error in the ippsTRNGenRDSEED function of the ipp-crypto lib. After I change the utils.hpp to force RNGenType kRNGenType = RNGenType::PSEUDO, the error seems to be resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions