PublicKey.cpp 983 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "PublicKey.hpp"
  2. PublicKey(const Bipoint<curvepoint_fp_t>& a, const Bipoint<twistpoint_fp2_t>& b, const Bipoint<curvepoint_fp_t>& c, const Bipoint<twistpoint_fp2_t>& d)
  3. {
  4. set(a, b, c, d);
  5. }
  6. void set(const Bipoint<curvepoint_fp_t>& a, const Bipoint<twistpoint_fp2_t>& b, const Bipoint<curvepoint_fp_t>& c, const Bipoint<twistpoint_fp2_t>& d)
  7. {
  8. a.makeaffine();
  9. b.makeaffine();
  10. c.makeaffine();
  11. d.makeaffine();
  12. bipoint_curvegen = a;
  13. bipoint_twistgen = b;
  14. bipoint_curve_groupelt = c;
  15. bipoint_twist_groupelt = d;
  16. }
  17. Bipoint<curvepoint_fp_t> PublicKey::get_bipoint_curvegen() const
  18. {
  19. return bipoint_curvegen;
  20. }
  21. Bipoint<twistpoint_fp2_t> PublicKey::get_bipoint_twistgen() const
  22. {
  23. return bipoint_twistgen;
  24. }
  25. Bipoint<curvepoint_fp_t> PublicKey::get_bipoint_curve_groupelt() const
  26. {
  27. return bipoint_curve_groupelt;
  28. }
  29. Bipoint<twistpoint_fp2_t> PublicKey::get_bipoint_twist_groupelt() const
  30. {
  31. return bipoint_twist_groupelt;
  32. }