diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-19 23:21:01 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-19 23:21:01 +0200 |
commit | f6bacc5058d8049a44f25fcc7a931227ddcfb65e (patch) | |
tree | 2cf8eb2c7ffa654f0b924f68681ba92266d8cbdb /crypto.c | |
parent | 977de7747484be89d00aa70924cb937d0bed786c (diff) | |
download | libbrandt-f6bacc5058d8049a44f25fcc7a931227ddcfb65e.tar.gz libbrandt-f6bacc5058d8049a44f25fcc7a931227ddcfb65e.zip |
some doxygen fixes
Diffstat (limited to 'crypto.c')
-rw-r--r-- | crypto.c | 37 |
1 files changed, 19 insertions, 18 deletions
@@ -324,7 +324,7 @@ smc_free2 (gcry_mpi_point_t **dst, uint16_t size1, uint16_t size2) | |||
324 | 324 | ||
325 | /** | 325 | /** |
326 | * smc_sums_partial calculates sums up until the current index and stores them | 326 | * smc_sums_partial calculates sums up until the current index and stores them |
327 | * in @a out. @$f\forall i \leq len: out_i=sum_{h=1}^iin_h@$f | 327 | * in @a out. \f$\forall i \leq len: out_i=\sum_{h=1}^iin_h\f$ |
328 | * | 328 | * |
329 | * @param[out] out Where to store the resulting sums. Points may be given | 329 | * @param[out] out Where to store the resulting sums. Points may be given |
330 | * uninitialized, but the appropriate amount of memory has to be allocated | 330 | * uninitialized, but the appropriate amount of memory has to be allocated |
@@ -347,7 +347,8 @@ smc_sums_partial (gcry_mpi_point_t out[], gcry_mpi_point_t in[], uint16_t len) | |||
347 | 347 | ||
348 | 348 | ||
349 | /** | 349 | /** |
350 | * smc_sum calculates the sum of all input points. @$fout=sum_{i=1}^{len}in_i@$f | 350 | * smc_sum calculates the sum of all input points. |
351 | * \f$out=\sum_{i=1}^{len}in_i\f$ | ||
351 | * | 352 | * |
352 | * @param[out] out Where to store the result | 353 | * @param[out] out Where to store the result |
353 | * @param[in] in Input points. | 354 | * @param[in] in Input points. |
@@ -359,7 +360,7 @@ smc_sum (gcry_mpi_point_t out, gcry_mpi_point_t in[], uint16_t len) | |||
359 | uint16_t i; | 360 | uint16_t i; |
360 | 361 | ||
361 | brandt_assert (NULL != out); | 362 | brandt_assert (NULL != out); |
362 | /**TODO: how to copy a point more efficiently? */ | 363 | /**\todo: how to copy a point more efficiently? */ |
363 | gcry_mpi_ec_add (out, ec_zero, ec_zero, ec_ctx); | 364 | gcry_mpi_ec_add (out, ec_zero, ec_zero, ec_ctx); |
364 | for (i = 0; i < len; i++) | 365 | for (i = 0; i < len; i++) |
365 | gcry_mpi_ec_add (out, out, in[i], ec_ctx); | 366 | gcry_mpi_ec_add (out, out, in[i], ec_ctx); |
@@ -382,12 +383,12 @@ smc_compute_pkey (struct AuctionData *ad) | |||
382 | /** | 383 | /** |
383 | * smc_zkp_dl | 384 | * smc_zkp_dl |
384 | * | 385 | * |
385 | * @param v TODO | 386 | * @param v \todo |
386 | * @param g TODO | 387 | * @param g \todo |
387 | * @param x TODO | 388 | * @param x \todo |
388 | * @param a TODO | 389 | * @param a \todo |
389 | * @param c TODO | 390 | * @param c \todo |
390 | * @param r TODO | 391 | * @param r \todo |
391 | */ | 392 | */ |
392 | void | 393 | void |
393 | smc_zkp_dl (const gcry_mpi_point_t v, | 394 | smc_zkp_dl (const gcry_mpi_point_t v, |
@@ -402,7 +403,7 @@ smc_zkp_dl (const gcry_mpi_point_t v, | |||
402 | ec_keypair_create_base (a, z, g); | 403 | ec_keypair_create_base (a, z, g); |
403 | 404 | ||
404 | /* compute challange c */ | 405 | /* compute challange c */ |
405 | /**TODO: generate c from HASH(g,v,a) and don't output it */ | 406 | /**\todo: generate c from HASH(g,v,a) and don't output it */ |
406 | ec_skey_create (c); | 407 | ec_skey_create (c); |
407 | gcry_mpi_mod (c, c, ec_n); | 408 | gcry_mpi_mod (c, c, ec_n); |
408 | 409 | ||
@@ -416,11 +417,11 @@ smc_zkp_dl (const gcry_mpi_point_t v, | |||
416 | /** | 417 | /** |
417 | * smc_zkp_dl_check | 418 | * smc_zkp_dl_check |
418 | * | 419 | * |
419 | * @param v TODO | 420 | * @param v \todo |
420 | * @param g TODO | 421 | * @param g \todo |
421 | * @param a TODO | 422 | * @param a \todo |
422 | * @param c TODO | 423 | * @param c \todo |
423 | * @param r TODO | 424 | * @param r \todo |
424 | * @return 0 if the proof is correct, something else otherwise | 425 | * @return 0 if the proof is correct, something else otherwise |
425 | */ | 426 | */ |
426 | int | 427 | int |
@@ -463,7 +464,7 @@ smc_zkp_2dle (const gcry_mpi_point_t v, | |||
463 | gcry_mpi_ec_mul (b, z, g2, ec_ctx); | 464 | gcry_mpi_ec_mul (b, z, g2, ec_ctx); |
464 | 465 | ||
465 | /* compute challange c */ | 466 | /* compute challange c */ |
466 | /**TODO: generate c from HASH(g1,g2,v,w,a,b) and don't output it */ | 467 | /* \todo: generate c from HASH(g1,g2,v,w,a,b) and don't output it */ |
467 | ec_skey_create (c); | 468 | ec_skey_create (c); |
468 | gcry_mpi_mod (c, c, ec_n); | 469 | gcry_mpi_mod (c, c, ec_n); |
469 | 470 | ||
@@ -560,7 +561,7 @@ smc_zkp_0og (gcry_mpi_point_t alpha, | |||
560 | gcry_mpi_ec_mul (b2, w, y, ec_ctx); | 561 | gcry_mpi_ec_mul (b2, w, y, ec_ctx); |
561 | 562 | ||
562 | /* compute challange c */ | 563 | /* compute challange c */ |
563 | /**TODO: generate c from HASH(alpha,beta,a1,b1,a2,b2) and don't output it */ | 564 | /* \todo: generate c from HASH(alpha,beta,a1,b1,a2,b2) and don't output it */ |
564 | ec_skey_create (c); | 565 | ec_skey_create (c); |
565 | gcry_mpi_mod (c, c, ec_n); | 566 | gcry_mpi_mod (c, c, ec_n); |
566 | 567 | ||
@@ -596,7 +597,7 @@ smc_zkp_0og (gcry_mpi_point_t alpha, | |||
596 | gcry_mpi_ec_mul (b1, w, y, ec_ctx); | 597 | gcry_mpi_ec_mul (b1, w, y, ec_ctx); |
597 | 598 | ||
598 | /* compute challange c */ | 599 | /* compute challange c */ |
599 | /**TODO: generate c from HASH(alpha,beta,a1,b1,a2,b2) and don't output it */ | 600 | /* \todo: generate c from HASH(alpha,beta,a1,b1,a2,b2) and don't output it */ |
600 | ec_skey_create (c); | 601 | ec_skey_create (c); |
601 | gcry_mpi_mod (c, c, ec_n); | 602 | gcry_mpi_mod (c, c, ec_n); |
602 | 603 | ||