Skip to content

Commit

Permalink
fixme: subgroups are not checked
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Aug 16, 2024
1 parent 1f75663 commit 0009550
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/evmone_precompiles/kzg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "sha256.hpp"
#include <blst.hpp>
#include <bit>
#include <cassert>

namespace evmone::crypto
{
Expand Down Expand Up @@ -63,11 +64,15 @@ bool kzg_proof(const std::byte versioned_hash[32], const std::byte z[32], const
blst::blst_p1_uncompress(&affine_C, reinterpret_cast<const blst::byte*>(commitment));
if (ret != blst::BLST_SUCCESS)
return false;
// FIXME:
// assert(blst::blst_p1_affine_in_g1(&affine_C));

blst::blst_p1_affine Q;
const auto r2 = blst::blst_p1_uncompress(&Q, reinterpret_cast<const blst::byte*>(proof));
if (r2 != blst::BLST_SUCCESS)
return false;
// FIXME:
// assert(blst::blst_p1_affine_in_g1(&Q));

blst::blst_p1 P_minus_y;
// FIXME: add_or_double?
Expand Down

0 comments on commit 0009550

Please sign in to comment.