nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 > Struct Template Reference

#include <knowledge_commitment.hpp>

+ Collaboration diagram for nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >:

Public Types

typedef Type1 type1
 
typedef Type2 type2
 
typedef detail::element_kc< Type1, Type2 > value_type
 

Static Public Attributes

constexpr static const std::size_t value_bits = Type1::value_bits + Type2::value_bits
 

Detailed Description

template<typename Type1, typename Type2>
struct nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >

A knowledge commitment element is a pair (g,h) where g is in Type1 and h in Type2, and Type1 and Type2 are groups (written additively).

Such pairs form a group by defining:

  • "zero" = (0,0)
  • "one" = (1,1)
  • a * (g,h) + b * (g',h') := ( a * g + b * g', a * h + b * h').

Member Typedef Documentation

◆ type1

template<typename Type1 , typename Type2 >
typedef Type1 nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >::type1

◆ type2

template<typename Type1 , typename Type2 >
typedef Type2 nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >::type2

◆ value_type

template<typename Type1 , typename Type2 >
typedef detail::element_kc<Type1, Type2> nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >::value_type

Member Data Documentation

◆ value_bits

template<typename Type1 , typename Type2 >
constexpr static const std::size_t nil::crypto3::zk::snark::knowledge_commitment< Type1, Type2 >::value_bits = Type1::value_bits + Type2::value_bits
staticconstexpr

The documentation for this struct was generated from the following file: