123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef __BGN_HPP
- #define __BGN_HPP
- #include "Bipoint.hpp"
- #include "Quadripoint.hpp"
- #include "Scalar.hpp"
- #include "PublicKey.hpp"
- #include "PrivateKey.hpp"
- class BGN
- {
- public:
- BGN();
- void encrypt(CurveBipoint& G_element, const Scalar& cleartext) const;
- void encrypt(TwistBipoint& H_element, const Scalar& cleartext) const;
- void encrypt(CurveBipoint& G_element, TwistBipoint& H_element, const Scalar& cleartext) const;
- CurveBipoint homomorphic_addition(const CurveBipoint& a, const CurveBipoint& b) const;
- TwistBipoint homomorphic_addition(const TwistBipoint& a, const TwistBipoint& b) const;
- Quadripoint homomorphic_addition(const Quadripoint& a, const Quadripoint& b) const;
- Quadripoint homomorphic_multiplication(const CurveBipoint& a, const TwistBipoint& b) const;
- Scalar decrypt(const CurveBipoint& ciphertext) const;
- Scalar decrypt(const TwistBipoint& ciphertext) const;
- Scalar decrypt(const Quadripoint & ciphertext) const;
- const PublicKey& get_public_key() const;
- const PrivateKey& get_private_key() const;
- private:
- PublicKey public_key;
- PrivateKey private_key;
- };
- #endif /* __BGN_HPP */
|