diff --git a/libOTe_Tests/BinarySolver_Tests.cpp b/libOTe_Tests/BinarySolver_Tests.cpp index c371527e..219f8d04 100644 --- a/libOTe_Tests/BinarySolver_Tests.cpp +++ b/libOTe_Tests/BinarySolver_Tests.cpp @@ -727,15 +727,15 @@ namespace osuCrypto // Build batch instances std::vector> A(batch), A0(batch), A1(batch); - std::vector> B(batch), B0(batch), B1(batch), C0(batch), C1(batch); + std::vector> B(batch), Bsh0(batch), Bsh1(batch), C0(batch), C1(batch); for (u64 b = 0; b < batch; ++b) { A[b].resize(n, m8); A0[b].resize(n, m8); A1[b].resize(n, m8); B[b].resize(m, k8); - B0[b].resize(m, k8); - B1[b].resize(m, k8); + Bsh0[b].resize(m, k8); + Bsh1[b].resize(m, k8); C0[b].resize(n, k8); C1[b].resize(n, k8); @@ -754,10 +754,10 @@ namespace osuCrypto for (u64 j = 0; j < k; ++j) { *BitIterator(B[b][i].data(), j) = prng.getBit(); - *BitIterator(B0[b][i].data(), j) = prng.getBit(); + *BitIterator(Bsh0[b][i].data(), j) = prng.getBit(); } for (u64 j = 0; j < B[b].cols(); ++j) - B1[b](i, j) = B[b](i, j) ^ B0[b](i, j); + Bsh1[b](i, j) = B[b](i, j) ^ Bsh0[b](i, j); } } @@ -767,7 +767,7 @@ namespace osuCrypto for (u64 b = 0; b < batch; ++b) { A0List.emplace_back(A0[b]); A1List.emplace_back(A1[b]); - B0List.emplace_back(B0[b]); B1List.emplace_back(B1[b]); + B0List.emplace_back(Bsh0[b]); B1List.emplace_back(Bsh1[b]); C0List.emplace_back(C0[b]); C1List.emplace_back(C1[b]); } diff --git a/libOTe_Tests/RingLpn_Tests.cpp b/libOTe_Tests/RingLpn_Tests.cpp index ea04f407..7974e94e 100644 --- a/libOTe_Tests/RingLpn_Tests.cpp +++ b/libOTe_Tests/RingLpn_Tests.cpp @@ -689,26 +689,26 @@ namespace osuCrypto throw RTE_LOC; auto sock = coproto::LocalAsyncSocket::makePair(); - std::vector A0(n), B0(n), C0(n); - std::vector A1(n), B1(n), C1(n); + std::vector A0(n), Bsh0(n), C0(n); + std::vector A1(n), Bsh1(n), C1(n); if (verbose) triples[0].setTimer(timer); // Generate triples using the 3-parameter expand function auto r = macoro::sync_wait(macoro::when_all_ready( - triples[0].expand(A0, B0, C0, prng0, sock[0]), - triples[1].expand(A1, B1, C1, prng1, sock[1]))); + triples[0].expand(A0, Bsh0, C0, prng0, sock[0]), + triples[1].expand(A1, Bsh1, C1, prng1, sock[1]))); std::get<0>(r).result(); std::get<1>(r).result(); // Verify that we got correct triple correlations - // Check that (A0 + A1) * (B0 + B1) = C0 + C1 + // Check that (A0 + A1) * (Bsh0 + Bsh1) = C0 + C1 bool allCorrect = true; for (size_t i = 0; i < n && allCorrect; i++) { auto a = A0[i] + A1[i]; // Reconstruct A - auto b = B0[i] + B1[i]; // Reconstruct B + auto b = Bsh0[i] + Bsh1[i]; // Reconstruct B auto c = C0[i] + C1[i]; // Reconstruct C auto expected = a * b; // Expected product @@ -734,7 +734,7 @@ namespace osuCrypto for (u64 i = 0; i < std::min(5, n); ++i) { auto a = A0[i] + A1[i]; - auto b = B0[i] + B1[i]; + auto b = Bsh0[i] + Bsh1[i]; auto c = C0[i] + C1[i]; std::cout << " Triple " << i << ": " << a << " * " << b << " = " << c << std::endl; }