PublicKey.hpp 984 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __PUBLICKEY_HPP
  2. #define __PUBLICKEY_HPP
  3. #include "Bipoint.hpp"
  4. #include "zout.hpp"
  5. #include <type_traits>
  6. class PublicKey
  7. {
  8. public:
  9. PublicKey() = default;
  10. PublicKey(Bipoint<curvepoint_fp_t> a,Bipoint<twistpoint_fp2_t> b, Bipoint<curvepoint_fp_t> c,Bipoint<twistpoint_fp2_t> d);
  11. void set(Bipoint<curvepoint_fp_t> a,Bipoint<twistpoint_fp2_t> b, Bipoint<curvepoint_fp_t> c,Bipoint<twistpoint_fp2_t> d);
  12. void print() const;
  13. Bipoint<curvepoint_fp_t> get_bipoint_curvegen() const;
  14. Bipoint<twistpoint_fp2_t> get_bipoint_twistgen() const;
  15. Bipoint<curvepoint_fp_t> get_bipoint_curve_groupelt() const;
  16. Bipoint<twistpoint_fp2_t> get_bipoint_twist_groupelt() const;
  17. private :
  18. Bipoint<curvepoint_fp_t> bipoint_curvegen; //subgroup_gen (i1g,j1,g)
  19. Bipoint<twistpoint_fp2_t> bipoint_twistgen; //subgroup_gen (i2h, j2h)
  20. Bipoint<curvepoint_fp_t> bipoint_curve_groupelt; // u
  21. Bipoint<twistpoint_fp2_t> bipoint_twist_groupelt; // v
  22. };
  23. extern PublicKey public_key;
  24. #endif