Skip to content

Commit

Permalink
Updates for review, working MNT6 miller loop #355
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed Apr 29, 2024
1 parent 56221db commit ea0388c
Show file tree
Hide file tree
Showing 6 changed files with 979 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define CRYPTO3_BLUEPRINT_COMPONENTS_PLONK_ABSTRACT_FP3_HPP

#include <array>
#include <nil/crypto3/algebra/fields/fp3.hpp>

namespace nil {
namespace blueprint {
Expand All @@ -37,6 +38,7 @@ namespace nil {
template<typename T, typename UnderlyingFieldType>
class abstract_fp3_element {
public:
using policy_type_fp3 = crypto3::algebra::fields::fp3<UnderlyingFieldType>;
std::array<T,3> data;

T& operator[](std::size_t idx) {
Expand All @@ -47,7 +49,7 @@ namespace nil {
}

constexpr abstract_fp3_element operator*(abstract_fp3_element const& other) {
auto s = UnderlyingFieldType::non_residue;
auto s = policy_type_fp3::extension_policy::non_residue;
return {
data[0]*other[0] + s*(data[1]*other[2] + data[2]*other[1]),
data[0]*other[1] + data[1]*other[0] + s*data[2]*other[2],
Expand Down
Loading

0 comments on commit ea0388c

Please sign in to comment.