From 9e8a846e34ceb803381a67a8a7bbdc6056608d4a Mon Sep 17 00:00:00 2001 From: Alwin Zomotor <alwin.zomotor@de.bosch.com> Date: Mon, 9 Sep 2024 16:35:51 +0200 Subject: [PATCH] fix: fixed test case in client_test.go by removing it as it is no longer useful Signed-off-by: Alwin Zomotor <alwin.zomotor@de.bosch.com> --- pkg/castor/client_test.go | 2 +- pkg/castor/entities.go | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkg/castor/client_test.go b/pkg/castor/client_test.go index b7013e31..1067f280 100644 --- a/pkg/castor/client_test.go +++ b/pkg/castor/client_test.go @@ -65,7 +65,7 @@ var _ = Describe("Castor", func() { client := Client{URL: myURL, HTTPClient: httpClient} tuples, err := client.GetTuples(2, BitGfp, uuid.MustParse("acc23dc8-7855-4a2f-bc89-494ba30a74d2")) - Expect(tuples).To(Equal(jsn)) + Expect(tuples).To(Equal(tbytelist)) Expect(err).NotTo(HaveOccurred()) }) }) diff --git a/pkg/castor/entities.go b/pkg/castor/entities.go index d8e34d35..973da640 100644 --- a/pkg/castor/entities.go +++ b/pkg/castor/entities.go @@ -47,29 +47,30 @@ type TupleType struct { Name string PreprocessingName string SpdzProtocol SPDZProtocol + Arity int8 } var ( // BitGfp describes the Bits tuple type in the Mudulo a Prime domain. - BitGfp = TupleType{"BIT_GFP", "Bits", SPDZGfp} + BitGfp = TupleType{"BIT_GFP", "Bits", SPDZGfp, 1} // BitGf2n describes the Bits tuple type in the GF(2^n) domain. - BitGf2n = TupleType{"BIT_GF2N", "Bits", SPDZGf2n} + BitGf2n = TupleType{"BIT_GF2N", "Bits", SPDZGf2n, 1} // InputMaskGfp describes the Inputs tuple type in the Mudulo a Prime domain. - InputMaskGfp = TupleType{"INPUT_MASK_GFP", "Inputs", SPDZGfp} + InputMaskGfp = TupleType{"INPUT_MASK_GFP", "Inputs", SPDZGfp, 2} // InputMaskGf2n describes the Inputs tuple type in the GF(2^n) domain. - InputMaskGf2n = TupleType{"INPUT_MASK_GF2N", "Inputs", SPDZGf2n} + InputMaskGf2n = TupleType{"INPUT_MASK_GF2N", "Inputs", SPDZGf2n, 2} // InverseTupleGfp describes the Inverses tuple type in the Mudulo a Prime domain. - InverseTupleGfp = TupleType{"INVERSE_TUPLE_GFP", "Inverses", SPDZGfp} + InverseTupleGfp = TupleType{"INVERSE_TUPLE_GFP", "Inverses", SPDZGfp, 2} // InverseTupleGf2n describes the Inverses tuple type in the GF(2^n) domain. - InverseTupleGf2n = TupleType{"INVERSE_TUPLE_GF2N", "Inverses", SPDZGf2n} + InverseTupleGf2n = TupleType{"INVERSE_TUPLE_GF2N", "Inverses", SPDZGf2n, 2} // SquareTupleGfp describes the Squares tuple type in the Mudulo a Prime domain. - SquareTupleGfp = TupleType{"SQUARE_TUPLE_GFP", "Squares", SPDZGfp} + SquareTupleGfp = TupleType{"SQUARE_TUPLE_GFP", "Squares", SPDZGfp, 2} // SquareTupleGf2n describes the Squares tuple type in the GF(2^n) domain. - SquareTupleGf2n = TupleType{"SQUARE_TUPLE_GF2N", "Squares", SPDZGf2n} + SquareTupleGf2n = TupleType{"SQUARE_TUPLE_GF2N", "Squares", SPDZGf2n, 2} // MultiplicationTripleGfp describes the Triples tuple type in the Mudulo a Prime domain. - MultiplicationTripleGfp = TupleType{"MULTIPLICATION_TRIPLE_GFP", "Triples", SPDZGfp} + MultiplicationTripleGfp = TupleType{"MULTIPLICATION_TRIPLE_GFP", "Triples", SPDZGfp, 3} // MultiplicationTripleGf2n describes the Triples tuple type in the GF(2^n) domain. - MultiplicationTripleGf2n = TupleType{"MULTIPLICATION_TRIPLE_GF2N", "Triples", SPDZGf2n} + MultiplicationTripleGf2n = TupleType{"MULTIPLICATION_TRIPLE_GF2N", "Triples", SPDZGf2n, 3} ) // SupportedTupleTypes is a list of all tuple types supported by the castor client.