diff options
Diffstat (limited to 'src/scalarproduct/gnunet-service-scalarproduct_bob.c')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct_bob.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c index d0a622a36..5be0a85d1 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c | |||
@@ -570,10 +570,10 @@ transmit_bobs_cryptodata_message_multipart (struct BobServiceSession *s) | |||
570 | for (i = s->cadet_transmitted_element_count, j = 0; i < s->cadet_transmitted_element_count + todo_count; i++) | 570 | for (i = s->cadet_transmitted_element_count, j = 0; i < s->cadet_transmitted_element_count + todo_count; i++) |
571 | { | 571 | { |
572 | //r[i][p] and r[i][q] | 572 | //r[i][p] and r[i][q] |
573 | memcpy (&payload[j++], | 573 | GNUNET_memcpy (&payload[j++], |
574 | &s->r[i], | 574 | &s->r[i], |
575 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 575 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
576 | memcpy (&payload[j++], | 576 | GNUNET_memcpy (&payload[j++], |
577 | &s->r_prime[i], | 577 | &s->r_prime[i], |
578 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 578 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
579 | } | 579 | } |
@@ -627,10 +627,10 @@ transmit_bobs_cryptodata_message (struct BobServiceSession *s) | |||
627 | (unsigned int) s->used_element_count); | 627 | (unsigned int) s->used_element_count); |
628 | 628 | ||
629 | payload = (struct GNUNET_CRYPTO_PaillierCiphertext *) &msg[1]; | 629 | payload = (struct GNUNET_CRYPTO_PaillierCiphertext *) &msg[1]; |
630 | memcpy (&payload[0], | 630 | GNUNET_memcpy (&payload[0], |
631 | &s->s, | 631 | &s->s, |
632 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 632 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
633 | memcpy (&payload[1], | 633 | GNUNET_memcpy (&payload[1], |
634 | &s->s_prime, | 634 | &s->s_prime, |
635 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 635 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
636 | 636 | ||
@@ -639,10 +639,10 @@ transmit_bobs_cryptodata_message (struct BobServiceSession *s) | |||
639 | for (i = 0; i < s->cadet_transmitted_element_count; i++) | 639 | for (i = 0; i < s->cadet_transmitted_element_count; i++) |
640 | { | 640 | { |
641 | //k[i][p] and k[i][q] | 641 | //k[i][p] and k[i][q] |
642 | memcpy (&payload[i * 2], | 642 | GNUNET_memcpy (&payload[i * 2], |
643 | &s->r[i], | 643 | &s->r[i], |
644 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 644 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
645 | memcpy (&payload[i * 2 + 1], | 645 | GNUNET_memcpy (&payload[i * 2 + 1], |
646 | &s->r_prime[i], | 646 | &s->r_prime[i], |
647 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); | 647 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)); |
648 | } | 648 | } |
@@ -991,7 +991,7 @@ handle_alices_cryptodata_message (void *cls, | |||
991 | if (NULL == s->e_a) | 991 | if (NULL == s->e_a) |
992 | s->e_a = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * | 992 | s->e_a = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * |
993 | max); | 993 | max); |
994 | memcpy (&s->e_a[s->cadet_received_element_count], | 994 | GNUNET_memcpy (&s->e_a[s->cadet_received_element_count], |
995 | payload, | 995 | payload, |
996 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * contained_elements); | 996 | sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) * contained_elements); |
997 | s->cadet_received_element_count += contained_elements; | 997 | s->cadet_received_element_count += contained_elements; |
@@ -1262,7 +1262,7 @@ GSS_handle_bob_client_message_multipart (void *cls, | |||
1262 | for (i = 0; i < contained_count; i++) | 1262 | for (i = 0; i < contained_count; i++) |
1263 | { | 1263 | { |
1264 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); | 1264 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); |
1265 | memcpy (elem, | 1265 | GNUNET_memcpy (elem, |
1266 | &elements[i], | 1266 | &elements[i], |
1267 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); | 1267 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); |
1268 | if (GNUNET_SYSERR == | 1268 | if (GNUNET_SYSERR == |
@@ -1387,7 +1387,7 @@ GSS_handle_bob_client_message (void *cls, | |||
1387 | if (0 == GNUNET_ntohll (elements[i].value)) | 1387 | if (0 == GNUNET_ntohll (elements[i].value)) |
1388 | continue; | 1388 | continue; |
1389 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); | 1389 | elem = GNUNET_new (struct GNUNET_SCALARPRODUCT_Element); |
1390 | memcpy (elem, | 1390 | GNUNET_memcpy (elem, |
1391 | &elements[i], | 1391 | &elements[i], |
1392 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); | 1392 | sizeof (struct GNUNET_SCALARPRODUCT_Element)); |
1393 | if (GNUNET_SYSERR == | 1393 | if (GNUNET_SYSERR == |