cryptobiu / libscapi

Comprehensive Open Source Library for Secure Multiparty Computation
MIT License
180 stars 66 forks source link

One or two tests fail #62

Closed dvdrndlph closed 5 years ago

dvdrndlph commented 5 years ago

Describe the bug My build fails with one or sometime two (!?) errors from tests.exe.

dave@mpc:~/libscapi/tests$ ./tests.exe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests.exe is a Catch v1.2.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
TrapdoorPermutation
  OpenSSL
-------------------------------------------------------------------------------
tests/tests.cpp:817
...............................................................................

tests/tests.cpp:834: FAILED:
  REQUIRE( re_inv->getElement() == re_src->getElement() )
with expansion:
  0 == 23
with message:
  re_enc->getElement() := 12

-------------------------------------------------------------------------------
asymmetric encryption
  El Gamal on group element
-------------------------------------------------------------------------------
tests/tests.cpp:1066
...............................................................................

tests/tests.cpp:1068: FAILED:
  {Unknown expression after the reported line}
due to unexpected exception with message:
  GroupElements in the given ciphertexts must be a members in the DlogGroup of
  type Zp*

===============================================================================
test cases:  18 |  16 passed | 2 failed
assertions: 499 | 497 passed | 2 failed

dave@mpc:~/libscapi/tests$ ./tests.exe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests.exe is a Catch v1.2.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
asymmetric encryption
  El Gamal on group element
-------------------------------------------------------------------------------
tests/tests.cpp:1066
...............................................................................

tests/tests.cpp:1068: FAILED:
  {Unknown expression after the reported line}
due to unexpected exception with message:
  GroupElements in the given ciphertexts must be a members in the DlogGroup of
  type Zp*

===============================================================================
test cases:  18 |  17 passed | 1 failed
assertions: 499 | 498 passed | 1 failed

Steps to reproduce the bug On Macintosh hardware create a VM using the latest VirtualBox and ubuntu-18.04-desktop-amd64.iso. Then run these commands:

$ cd
$ sudo apt-get update
$ sudo apt-get install -y git
$ sudo apt-get install -y build-essential
$ sudo apt-get install -y libssl-dev libgmp3-dev cmake liblog4cpp5-dev libboost-all-dev
$ git clone https://github.com/cryptobiu/libscapi.git
$ cd libscapi
$ make

Machine details (please complete the following information):

Additional context

liorko87 commented 5 years ago

Hello @dvdrndlph,

Please pull the latest version of libscapi and try again

Lior