MOTION  0.01
Framework for mixed-protocol multi-party computation
test_constants.h
Go to the documentation of this file.
1 // MIT License
2 //
3 // Copyright (c) 2019 Oleksandr Tkachenko
4 // Cryptography and Privacy Engineering Group (ENCRYPTO)
5 // TU Darmstadt, Germany
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining a copy
8 // of this software and associated documentation files (the "Software"), to deal
9 // in the Software without restriction, including without limitation the rights
10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 // copies of the Software, and to permit persons to whom the Software is
12 // furnished to do so, subject to the following conditions:
13 //
14 // The above copyright notice and this permission notice shall be included in all
15 // copies or substantial portions of the Software.
16 //
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // SOFTWARE.
24 
25 #pragma once
26 
27 #include <initializer_list>
28 
29 constexpr auto kTestIterations = 2u; // increase if needed
30 constexpr auto kDetailedLoggingEnabled = false;
31 constexpr auto kPortOffset = 17777u;
32 constexpr auto kNumberOfPartiesList = {2u, 3u, 4u, 5u, 10u};
encrypto::motion::MakeLocallyConnectedParties
std::vector< std::unique_ptr< Party > > MakeLocallyConnectedParties(const std::size_t number_of_parties, std::uint16_t, const bool)
constructs number_of_parties motion::Party's locally connected via TCP.
Definition: party.cpp:227
encrypto::motion::ShareWrapper::Out
ShareWrapper Out(std::size_t output_owner=std::numeric_limits< std::int64_t >::max()) const
constructs an output gate, which reconstructs the cleartext result. The default parameter for the out...
Definition: share_wrapper.cpp:414
encrypto::motion::ShareWrapper
Definition: share_wrapper.h:44
encrypto::motion::BitMatrix
Definition: bit_matrix.h:42
party.h
TEST_P
TEST_P(CommunicationLayerTest, Tcp)
Definition: test_communication_layer.cpp:95
encrypto::motion::BitMatrix::TransposeUsingBitSlicing
static void TransposeUsingBitSlicing(std::array< std::byte *, 128 > &matrix, std::size_t number_of_columns)
Transposes a matrix of 128 rows and arbitrary column size inplace using BitSlicing.
Definition: bit_matrix.cpp:409
AesniKeyExpansion128
void AesniKeyExpansion128(void *round_keys_input)
Definition: aesni_primitives.cpp:55
encrypto::motion::communication::MakeLocalTcpCommunicationLayers
std::vector< std::unique_ptr< CommunicationLayer > > MakeLocalTcpCommunicationLayers(std::size_t number_of_parties, bool ipv6)
Definition: communication_layer.cpp:526
boolean_gmw_gate.h
encrypto::motion::MpcProtocol::kArithmeticConstant
@ kArithmeticConstant
encrypto::motion::MultiplyVectors
std::vector< T > MultiplyVectors(std::vector< T > a, std::vector< T > b)
Multiplies each element in a and b and returns the result.
Definition: helpers.h:139
encrypto::motion::SumReduction
T SumReduction(const std::vector< T > &values)
Returns the sum of each element in values.
Definition: helpers.h:259
arithmetic_gmw_gate.h
encrypto::motion::BitVector::SecureRandom
static BitVector SecureRandom(const std::size_t size) noexcept
Returns a random BitVector.
Definition: bit_vector.cpp:893
TEST
TEST(ArithmeticGmw, InputOutput_1_1K_Simd_2_3_4_5_10_parties)
Definition: test_agmw.cpp:37
kDetailedLoggingEnabled
constexpr auto kDetailedLoggingEnabled
Definition: test_constants.h:30
encrypto::motion::MpcProtocol::kBmr
@ kBmr
encrypto::motion::AddVectors
std::vector< T > AddVectors(const std::vector< T > &a, const std::vector< T > &b)
Adds each element in a and b and returns the result.
Definition: helpers.h:100
bit_vector.h
kNumberOfPartiesList
constexpr auto kNumberOfPartiesList
Definition: test_constants.h:32
kAesBlockSize
constexpr std::size_t kAesBlockSize
Definition: aesni_primitives.h:29
bmr_wire.h
test_helpers.h
encrypto::motion::SubReduction
T SubReduction(const std::vector< T > &values)
Returns the difference of each element in values.
Definition: helpers.h:278
backend.h
encrypto::motion::BitVector<>
AesniMmoSingle
void AesniMmoSingle(const void *round_keys_input, void *input)
Definition: aesni_primitives.cpp:280
encrypto::motion::MpcProtocol::kBooleanGmw
@ kBooleanGmw
encrypto::motion::communication::MakeDummyCommunicationLayers
std::vector< std::unique_ptr< CommunicationLayer > > MakeDummyCommunicationLayers(std::size_t number_of_parties)
Definition: communication_layer.cpp:503
communication_layer.h
boolean_gmw_wire.h
aesni_primitives.h
base_ot_data.h
encrypto::motion::BitMatrix::Transpose128RowsInplace
static void Transpose128RowsInplace(std::array< std::byte *, 128 > &matrix, std::size_t number_of_columns)
Transposes a matrix of 128 rows and arbitrary column size inplace.
Definition: bit_matrix.cpp:252
encrypto::motion::communication::QueueHandler
Definition: message_handler.h:52
encrypto::motion::RowMulReduction
std::vector< T > RowMulReduction(const std::vector< std::vector< T >> &values)
Returns the product of each row in a matrix.
Definition: helpers.h:375
random_value
auto random_value
Definition: test_agmw.cpp:35
kTestIterations
constexpr auto kTestIterations
Definition: test_constants.h:29
mt_provider.h
logger.h
share_wrapper.h
encrypto::motion
Definition: algorithm_description.cpp:35
encrypto::motion::BitVector::GetSize
auto GetSize() const noexcept
Get size of BitVector.
Definition: bit_vector.h:149
TEST
TEST(AesNi128, KeyExpansion)
Definition: test_aesni.cpp:31
encrypto::motion::SharePointer
std::shared_ptr< Share > SharePointer
Definition: conversion_gate.h:49
TEST
TEST(CommunicationLayer, Dummy)
Definition: test_communication_layer.cpp:30
encrypto::motion::BitVector::Get
bool Get(std::size_t position) const
Get bit at given position.
Definition: bit_vector.cpp:471
AesniCtrStreamSingleBlock128Unaligned
void AesniCtrStreamSingleBlock128Unaligned(const void *round_keys_input, std::uint64_t *counter, void *output)
Definition: aesni_primitives.cpp:214
INSTANTIATE_TEST_SUITE_P
INSTANTIATE_TEST_SUITE_P(CommunicationLayerTcpTests, CommunicationLayerTest, testing::Bool(), [](auto &info) { return info.param ? "ipv6" :"ipv4";})
CommunicationLayerTest
Definition: test_communication_layer.cpp:93
base_ot_provider.h
message_handler.h
typedefs.h
encrypto::motion::curve25519::equal
static uint8_t equal(signed char b, signed char c)
Definition: mycurve25519.cpp:3971
bit_matrix.h
encrypto::motion::BitSpan
Non-owning non-resizeable BitVector.
Definition: bit_vector.h:578
AesniCtrStreamBlocks128Unaligned
void AesniCtrStreamBlocks128Unaligned(const void *round_keys_input, std::uint64_t *counter_input_pointer, void *output_input_pointer, std::size_t number_of_blocks)
Definition: aesni_primitives.cpp:151
encrypto::motion::RowSumReduction
std::vector< T > RowSumReduction(const std::vector< std::vector< T >> &values)
Returns the sum of each row in a matrix.
Definition: helpers.h:317
encrypto::motion::BitVector::Append
void Append(bool bit) noexcept
Appends a bit to BitVector.
Definition: bit_vector.cpp:621
encrypto::motion::RowSubReduction
std::vector< T > RowSubReduction(const std::vector< std::vector< T >> &values)
Returns the difference of each row in a matrix.
Definition: helpers.h:346
encrypto::motion::communication::QueueHandler::GetQueue
SynchronizedQueue< std::vector< std::uint8_t > > & GetQueue()
Definition: message_handler.h:58
encrypto::motion::MpcProtocol::kArithmeticGmw
@ kArithmeticGmw
AesniTmmoBatch4
void AesniTmmoBatch4(const void *round_keys_input, void *input, __uint128_t tweak)
Definition: aesni_primitives.cpp:235
TEST
TEST(ObliviousTransfer, BaseOt)
Definition: test_base_ot.cpp:34
encrypto::motion::BitVector::Subset
BitVector Subset(std::size_t from, std::size_t to) const
Returns a new BitVector containing the bits of this BitVector between positions from and to.
Definition: bit_vector.cpp:806
kPortOffset
constexpr auto kPortOffset
Definition: test_constants.h:31
encrypto::motion::MulReduction
T MulReduction(const std::vector< T > &values)
Returns the product of each element in values.
Definition: helpers.h:294
test_constants.h
TEST
TEST(BooleanGmw, InputOutput_1_1K_Simd_2_3_4_5_10_parties)
Definition: test_bgmw.cpp:35
AesniCtrStreamBlocks128
void AesniCtrStreamBlocks128(const void *round_keys_input, std::uint64_t *counter_input_pointer, void *output_input_pointer, std::size_t number_of_blocks)
Definition: aesni_primitives.cpp:92
arithmetic_gmw_wire.h