elgamal_verifiable.hpp
Go to the documentation of this file.
205 static inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) {
308 static inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) {
373 return internal_accumulator_type {std::vector<typename g1_type::value_type> {}, init_params.privkey,
380 static inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) {
459 static inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) {
583 return internal_accumulator_type {init_params.pubkey, init_params.gg_keypair, init_params.proof,
Definition: elgamal_verifiable.hpp:53
std::tuple< public_key_type, private_key_type, verification_key_type > keypair_type
Definition: elgamal_verifiable.hpp:64
std::pair< std::vector< typename Curve::scalar_field_type::value_type >, typename Curve::template g1_type<>::value_type > decipher_type
Definition: elgamal_verifiable.hpp:79
private_key< self_type > private_key_type
Definition: elgamal_verifiable.hpp:62
verification_key< self_type > verification_key_type
Definition: elgamal_verifiable.hpp:63
zk::snark::r1cs_gg_ppzksnark< Curve, zk::snark::r1cs_gg_ppzksnark_generator< Curve, zk::snark::ProvingMode::EncryptedInput >, zk::snark::r1cs_gg_ppzksnark_prover< Curve, zk::snark::ProvingMode::EncryptedInput >, zk::snark::r1cs_gg_ppzksnark_verifier_strong_input_consistency< Curve, zk::snark::ProvingMode::EncryptedInput >, zk::snark::ProvingMode::EncryptedInput > proof_system_type
Definition: elgamal_verifiable.hpp:72
std::pair< std::vector< typename Curve::template g1_type<>::value_type >, typename proof_system_type::proof_type > cipher_type
Definition: elgamal_verifiable.hpp:76
Curve curve_type
Definition: elgamal_verifiable.hpp:55
public_key< self_type > public_key_type
Definition: elgamal_verifiable.hpp:61
static constexpr std::size_t block_bits
Definition: elgamal_verifiable.hpp:59
Definition: r1cs_gg_ppzksnark/generator.hpp:49
Definition: r1cs_gg_ppzksnark/prover.hpp:47
Definition: zk/include/nil/crypto3/zk/snark/systems/ppzksnark/r1cs_gg_ppzksnark/verifier.hpp:75
ppzkSNARK for R1CS with a security proof in the generic group (GG) model
Definition: r1cs_gg_ppzksnark.hpp:109
OutputIterator move(const SinglePassRange &rng, OutputIterator result)
Definition: move.hpp:45
boost::mpl::apply< AccumulatorSet, tag::pubkey< ProcessingMode > >::type::result_type pubkey(const AccumulatorSet &acc)
Definition: accumulators/pubkey.hpp:106
@ EncryptedInput
Definition: pair.hpp:31
const private_key_type & privkey
Definition: elgamal_verifiable.hpp:360
const verification_key_type & vk
Definition: elgamal_verifiable.hpp:361
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:362
const verification_key_type & vk
Definition: elgamal_verifiable.hpp:367
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:368
std::vector< typename g1_type::value_type > cipher_text
Definition: elgamal_verifiable.hpp:365
const private_key_type & privkey
Definition: elgamal_verifiable.hpp:366
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:389
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:372
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:355
scheme_type::decipher_type result_type
Definition: elgamal_verifiable.hpp:370
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:385
Curve::gt_type gt_type
Definition: elgamal_verifiable.hpp:357
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:356
scheme_type::private_key_type private_key_type
Definition: elgamal_verifiable.hpp:352
scheme_type::verification_key_type verification_key_type
Definition: elgamal_verifiable.hpp:353
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:350
static void update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:380
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:351
Definition: decrypt_op.hpp:33
const proof_system_type::auxiliary_input_type & auxiliary_input
Definition: elgamal_verifiable.hpp:284
const proof_system_type::primary_input_type & primary_input
Definition: elgamal_verifiable.hpp:283
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:281
scalar_field_type::value_type r
Definition: elgamal_verifiable.hpp:279
nil::crypto3::pubkey::encrypt_op< elgamal_verifiable< Curve, BlockBits > >::init_params_type::pubkey
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:280
scalar_field_type::value_type r
Definition: elgamal_verifiable.hpp:288
const proof_system_type::auxiliary_input_type & auxiliary_input
Definition: elgamal_verifiable.hpp:292
const proof_system_type::primary_input_type & primary_input
Definition: elgamal_verifiable.hpp:291
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:289
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:290
std::vector< typename scalar_field_type::value_type > plain_text
Definition: elgamal_verifiable.hpp:287
scheme_type::public_key_type public_key_type
Definition: elgamal_verifiable.hpp:273
static void update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:308
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:296
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:317
scheme_type::cipher_type result_type
Definition: elgamal_verifiable.hpp:294
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:276
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:272
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:271
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:313
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:275
Definition: encrypt_op.hpp:33
std::vector< typename scalar_field_type::value_type > rnd
Definition: elgamal_verifiable.hpp:193
std::size_t msg_size
Definition: elgamal_verifiable.hpp:192
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:191
static void update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:205
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:210
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:174
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:175
scheme_type::private_key_type private_key_type
Definition: elgamal_verifiable.hpp:178
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:214
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:182
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:197
scheme_type::keypair_type keypair_type
Definition: elgamal_verifiable.hpp:180
Curve::template g2_type g2_type
Definition: elgamal_verifiable.hpp:184
keypair_type result_type
Definition: elgamal_verifiable.hpp:195
scheme_type::verification_key_type verification_key_type
Definition: elgamal_verifiable.hpp:179
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:183
nil::crypto3::pubkey::generate_keypair_op< elgamal_verifiable< Curve, BlockBits > >::public_key_type
scheme_type::public_key_type public_key_type
Definition: elgamal_verifiable.hpp:177
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:187
std::size_t msg_size
Definition: elgamal_verifiable.hpp:188
Definition: generate_keypair_op.hpp:33
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:160
private_key(const typename scalar_field_type::value_type &rho)
Definition: elgamal_verifiable.hpp:165
scalar_field_type::value_type rho
Definition: elgamal_verifiable.hpp:169
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:159
private_key()=default
Private key - a key known only to its owner. Only the user keeping his private key secret guarantees ...
Definition: private_key.hpp:47
std::vector< typename g1_type::value_type > t_g1
Definition: elgamal_verifiable.hpp:151
public_key & operator=(const public_key &other)=default
public_key(const typename g1_type::value_type &delta_g1, const std::vector< typename g1_type::value_type > &delta_s_g1, const std::vector< typename g1_type::value_type > &t_g1, const std::vector< typename g2_type::value_type > &t_g2, const typename g1_type::value_type &delta_sum_s_g1, const typename g1_type::value_type &gamma_inverse_sum_s_g1)
Definition: elgamal_verifiable.hpp:121
std::vector< typename g1_type::value_type > delta_s_g1
Definition: elgamal_verifiable.hpp:150
g1_type::value_type delta_sum_s_g1
Definition: elgamal_verifiable.hpp:153
public_key(public_key &&other)=default
Curve::template g2_type g2_type
Definition: elgamal_verifiable.hpp:115
bool operator==(const public_key &other) const
Definition: elgamal_verifiable.hpp:143
public_key(const public_key &other)=default
public_key()=default
std::vector< typename g2_type::value_type > t_g2
Definition: elgamal_verifiable.hpp:152
g1_type::value_type delta_g1
Definition: elgamal_verifiable.hpp:149
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:112
public_key(typename g1_type::value_type &&delta_g1, std::vector< typename g1_type::value_type > &&delta_s_g1, std::vector< typename g1_type::value_type > &&t_g1, std::vector< typename g2_type::value_type > &&t_g2, typename g1_type::value_type &&delta_sum_s_g1, typename g1_type::value_type &&gamma_inverse_sum_s_g1)
Definition: elgamal_verifiable.hpp:131
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:114
g1_type::value_type gamma_inverse_sum_s_g1
Definition: elgamal_verifiable.hpp:154
Public key - a key that can be published and used to verify the authenticity of the signed document,...
Definition: public_key.hpp:43
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:570
const proof_system_type::proof_type & proof
Definition: elgamal_verifiable.hpp:571
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:569
static std::enable_if< std::is_same< typename scalar_field_type::value_type, typename std::iterator_traits< InputIterator >::value_type >::value >::type update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:594
scheme_type::public_key_type public_key_type
Definition: elgamal_verifiable.hpp:561
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:563
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:560
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:559
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:611
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:582
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:564
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:607
Curve::gt_type gt_type
Definition: elgamal_verifiable.hpp:566
static std::enable_if< std::is_same< typename g1_type::value_type, typename std::iterator_traits< InputIterator >::value_type >::value >::type update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:602
scheme_type::cipher_type result_type
Definition: elgamal_verifiable.hpp:580
Curve::template g2_type g2_type
Definition: elgamal_verifiable.hpp:565
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:575
std::vector< typename scalar_field_type::value_type > rnd
Definition: elgamal_verifiable.hpp:577
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:574
std::vector< typename g1_type::value_type > cipher_text
Definition: elgamal_verifiable.hpp:578
const proof_system_type::proof_type & proof
Definition: elgamal_verifiable.hpp:576
Definition: rerandomize_op.hpp:33
verification_key()=default
verification_key(typename g2_type::value_type &&rho_g2, std::vector< typename g2_type::value_type > &&rho_sv_g2, std::vector< typename g2_type::value_type > &&rho_rhov_g2)
Definition: elgamal_verifiable.hpp:97
g2_type::value_type rho_g2
Definition: elgamal_verifiable.hpp:105
verification_key(const typename g2_type::value_type &rho_g2, const std::vector< typename g2_type::value_type > &rho_sv_g2, const std::vector< typename g2_type::value_type > &rho_rhov_g2)
Definition: elgamal_verifiable.hpp:91
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:84
std::vector< typename g2_type::value_type > rho_rhov_g2
Definition: elgamal_verifiable.hpp:107
std::vector< typename g2_type::value_type > rho_sv_g2
Definition: elgamal_verifiable.hpp:106
Curve::template g2_type g2_type
Definition: elgamal_verifiable.hpp:85
Definition: pubkey/include/nil/crypto3/pubkey/keys/verification_key.hpp:39
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:477
Curve::gt_type gt_type
Definition: elgamal_verifiable.hpp:485
static std::enable_if< std::is_same< typename g1_type::value_type, typename std::iterator_traits< InputIterator >::value_type >::value >::type update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:521
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:526
scheme_type::verification_key_type verification_key_type
Definition: elgamal_verifiable.hpp:480
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:501
scheme_type::public_key_type public_key_type
Definition: elgamal_verifiable.hpp:479
static std::enable_if< std::is_same< typename scalar_field_type::value_type, typename std::iterator_traits< InputIterator >::value_type >::value >::type update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:513
bool result_type
Definition: elgamal_verifiable.hpp:499
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:482
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:483
Curve::template g2_type g2_type
Definition: elgamal_verifiable.hpp:484
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:530
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:478
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:494
std::vector< typename scalar_field_type::value_type > plain_text
Definition: elgamal_verifiable.hpp:496
std::vector< typename g1_type::value_type > cipher_text
Definition: elgamal_verifiable.hpp:497
const verification_key_type & vk
Definition: elgamal_verifiable.hpp:493
const g1_type::value_type & proof
Definition: elgamal_verifiable.hpp:495
const proof_system_type::keypair_type & gg_keypair
Definition: elgamal_verifiable.hpp:489
const verification_key_type & vk
Definition: elgamal_verifiable.hpp:488
const g1_type::value_type & proof
Definition: elgamal_verifiable.hpp:490
Definition: verify_decryption_op.hpp:33
const proof_system_type::verification_key_type & gg_vk
Definition: elgamal_verifiable.hpp:437
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:436
const proof_system_type::primary_input_type & unencrypted_primary_input
Definition: elgamal_verifiable.hpp:439
const proof_system_type::proof_type & proof
Definition: elgamal_verifiable.hpp:438
elgamal_verifiable< Curve, BlockBits > scheme_type
Definition: elgamal_verifiable.hpp:428
static internal_accumulator_type init_accumulator(const init_params_type &init_params)
Definition: elgamal_verifiable.hpp:450
Curve::template g1_type g1_type
Definition: elgamal_verifiable.hpp:433
scheme_type::proof_system_type proof_system_type
Definition: elgamal_verifiable.hpp:429
scheme_type::public_key_type public_key_type
Definition: elgamal_verifiable.hpp:430
bool result_type
Definition: elgamal_verifiable.hpp:448
static result_type process(internal_accumulator_type &acc)
Definition: elgamal_verifiable.hpp:468
static void update(internal_accumulator_type &acc, InputRange range)
Definition: elgamal_verifiable.hpp:464
Curve::scalar_field_type scalar_field_type
Definition: elgamal_verifiable.hpp:432
static void update(internal_accumulator_type &acc, InputIterator first, InputIterator last)
Definition: elgamal_verifiable.hpp:459
const proof_system_type::proof_type & proof
Definition: elgamal_verifiable.hpp:444
const proof_system_type::verification_key_type & gg_vk
Definition: elgamal_verifiable.hpp:443
const public_key_type & pubkey
Definition: elgamal_verifiable.hpp:442
std::vector< typename g1_type::value_type > cipher_text
Definition: elgamal_verifiable.hpp:446
const proof_system_type::primary_input_type & unencrypted_primary_input
Definition: elgamal_verifiable.hpp:445
Definition: verify_encryption_op.hpp:33