keygen.hpp 732 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __KEYGEN_HPP
  2. #define __KEYGEN_HPP
  3. #include <iostream>
  4. #include "zout.hpp"
  5. #include "Fp.hpp"
  6. #include "PrivateKey.hpp"
  7. #include "PublicKey.hpp"
  8. #include "representation.hpp"
  9. #include "fpe2scalar.hpp"
  10. #include <array>
  11. using namespace std;
  12. void keygen(PublicKey& public_key, PrivateKey& private_key);
  13. extern const scalar_t bn_n;
  14. extern const curvepoint_fp_t bn_curvegen;
  15. extern const twistpoint_fp2_t bn_twistgen;
  16. //#ifdef NEW_PARAMETERS
  17. //const scalar_t bn_r={bn_n[0],bn_n[1],bn_n[2],bn_n[3],bn_n[4],bn_n[5],bn_n[6],bn_n[7]}; //copie pour résoudre problème notation
  18. //#else
  19. //const scalar_t bn_r={bn_n[0],bn_n[1],bn_n[2],bn_n[3]};
  20. //#endif
  21. //static const scalar_t &bn_r=bn_n;
  22. extern const scalar_t &bn_r;
  23. #endif