Lines Matching refs:bytes
130 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
142 TEST_CF_SECRET(X, bytes);
143 TEST_CF_SECRET(Y, bytes);
147 TEST_CF_PUBLIC(X, bytes);
148 TEST_CF_PUBLIC(Y, bytes);
150 TEST_ASSERT(memcmp(X, Y, bytes) != 0);
153 TEST_CF_SECRET(X, bytes);
154 TEST_CF_SECRET(Y, bytes);
158 TEST_CF_PUBLIC(X, bytes);
159 TEST_CF_PUBLIC(Y, bytes);
165 TEST_ASSERT(memcmp(X, Y, bytes) != 0);
167 TEST_MEMORY_COMPARE(X, bytes, Y, bytes);
200 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
212 memcpy(X, tmp_X, bytes);
214 TEST_CALLOC(Y, bytes);
215 memcpy(Y, tmp_Y, bytes);
218 TEST_CF_SECRET(X, bytes);
219 TEST_CF_SECRET(Y, bytes);
223 TEST_CF_PUBLIC(X, bytes);
224 TEST_CF_PUBLIC(Y, bytes);
226 TEST_MEMORY_COMPARE(X, bytes, tmp_X, bytes);
227 TEST_MEMORY_COMPARE(Y, bytes, tmp_Y, bytes);
230 TEST_CF_SECRET(X, bytes);
231 TEST_CF_SECRET(Y, bytes);
235 TEST_CF_PUBLIC(X, bytes);
236 TEST_CF_PUBLIC(Y, bytes);
243 TEST_ASSERT(memcmp(X, tmp_X, bytes) != 0);
244 TEST_ASSERT(memcmp(X, tmp_Y, bytes) != 0);
245 TEST_ASSERT(memcmp(Y, tmp_X, bytes) != 0);
246 TEST_ASSERT(memcmp(Y, tmp_Y, bytes) != 0);
248 TEST_MEMORY_COMPARE(X, bytes, tmp_Y, bytes);
249 TEST_MEMORY_COMPARE(Y, bytes, tmp_X, bytes);
288 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
300 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
303 memcpy(X, A, bytes);
305 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
308 memcpy(X, B, bytes);
310 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
313 if (memcmp(A, B, bytes) == 0) {
315 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
318 memcpy(X, A, bytes);
320 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
354 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
360 memcpy(tmp, X, bytes);
370 TEST_MEMORY_COMPARE(X, bytes, res, bytes);
408 const size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
423 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
426 memcpy(X, A, bytes);
428 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
431 memcpy(X, B, bytes);
433 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
436 if (memcmp(A, B, bytes) == 0) {
438 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
441 memcpy(X, A, bytes);
443 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
448 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
451 memcpy(X, A, bytes);
453 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
456 memcpy(X, B, bytes);
458 TEST_MEMORY_COMPARE(X, bytes, R, bytes);
568 size_t bytes = limbs * sizeof(*A);
581 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
584 memcpy(X, A, bytes);
586 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
589 memcpy(X, B, bytes);
591 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
593 if (memcmp(A, B, bytes) == 0) {
598 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
601 memcpy(X, A, bytes);
603 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
609 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
612 memcpy(X, A, bytes);
614 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
617 memcpy(X, B, bytes);
619 TEST_MEMORY_COMPARE(X, bytes, S, bytes);
713 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
726 TEST_MEMORY_COMPARE(R, bytes, X, bytes);
729 memcpy(R, A, bytes);
732 TEST_MEMORY_COMPARE(R, bytes, X, bytes);
739 TEST_MEMORY_COMPARE(A, bytes, X, bytes);
777 size_t bytes = limbs * sizeof(mbedtls_mpi_uint);
790 TEST_MEMORY_COMPARE(R, bytes, X, bytes);
793 memcpy(R, A, bytes);
796 TEST_MEMORY_COMPARE(R, bytes, X, bytes);
803 TEST_MEMORY_COMPARE(A, bytes, X, bytes);
823 size_t n_limbs, a_limbs, x_limbs, bytes;
835 bytes = n_limbs * sizeof(mbedtls_mpi_uint);
844 TEST_MEMORY_COMPARE(R, bytes, Z, bytes);
848 TEST_MEMORY_COMPARE(R, bytes, Z, bytes);
852 TEST_MEMORY_COMPARE(R, bytes, X, bytes);
856 TEST_MEMORY_COMPARE(A, bytes, X, bytes);