add bid encryption
This commit is contained in:
parent
0ebfb634f6
commit
8ffae340b6
18
crypto.c
18
crypto.c
@ -439,6 +439,24 @@ smc_gen_keyshare (struct AuctionData *ad)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
smc_encrypt_bid (struct AuctionData *ad,
|
||||||
|
uint16_t j,
|
||||||
|
gcry_mpi_point_t a1,
|
||||||
|
gcry_mpi_point_t a2,
|
||||||
|
gcry_mpi_point_t b1,
|
||||||
|
gcry_mpi_point_t b2,
|
||||||
|
gcry_mpi_t c,
|
||||||
|
gcry_mpi_t d1,
|
||||||
|
gcry_mpi_t d2,
|
||||||
|
gcry_mpi_t r1,
|
||||||
|
gcry_mpi_t r2)
|
||||||
|
{
|
||||||
|
smc_zkp_0og (ad->alpha[ad->i][j], (j == ad->b ? ec_gen : ec_zero), ad->Y,
|
||||||
|
ad->beta[ad->i][j], a1, a2, b1, b2, c, d1, d2, r1, r2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* smc_zkp_dl
|
* smc_zkp_dl
|
||||||
*
|
*
|
||||||
|
@ -28,13 +28,12 @@ struct AuctionData {
|
|||||||
uint16_t n; /** The amount of bidders/agents */
|
uint16_t n; /** The amount of bidders/agents */
|
||||||
uint16_t k; /** The amount of possible prices */
|
uint16_t k; /** The amount of possible prices */
|
||||||
uint16_t i; /** Own agents index, only used when bidding */
|
uint16_t i; /** Own agents index, only used when bidding */
|
||||||
|
uint16_t b; /** Own bid */
|
||||||
|
|
||||||
gcry_mpi_t x; /** Own private additive key share */
|
gcry_mpi_t x; /** Own private additive key share */
|
||||||
gcry_mpi_point_t *y; /** public multiplicative key shares, size: n */
|
gcry_mpi_point_t *y; /** public multiplicative key shares, size: n */
|
||||||
gcry_mpi_point_t Y; /** Shared public key */
|
gcry_mpi_point_t Y; /** Shared public key */
|
||||||
|
|
||||||
gcry_mpi_point_t *b; /** Own bid, size: k */
|
|
||||||
|
|
||||||
gcry_mpi_point_t **alpha; /** alphas, size: n*k */
|
gcry_mpi_point_t **alpha; /** alphas, size: n*k */
|
||||||
gcry_mpi_point_t **beta; /** betas, size: n*k */
|
gcry_mpi_point_t **beta; /** betas, size: n*k */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user