Coder Social home page Coder Social logo

Comments (17)

ladnir avatar ladnir commented on May 27, 2024 1

the following should work

python3 ./build.py
./out/build/linux/frontend/frontend_libOTe -u kkrt

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

Thank you, this worked. Another qustion: My purpose is not to run the whole project. My own project cpp file has the interfaces of libOTe. I copied it to the same root directory and want to generate an executable file through g++ -o test test.cpp. Is this possible?

from libote.

ladnir avatar ladnir commented on May 27, 2024

Yes but I suggest cmake. Here's a project template https://github.com/ladnir/ProjectTemplate

If you want to directly compile with g++, you'll need to link the the libraries in out/install/linux/lib/ and libOTe, cryptoTools in out/build/linux/...

Then also do the includes out/install/linux and libOTe/, cryptoTools/cryptoTools

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

@ladnir Thanks! I'll try it.

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

Sorry, I meet the anther question when I cmake the test demo:
When I cd /home/user/libOTe/libOTe_Tests/cmakeTests to run the test:
image
I type cmake . -D CMAKE_PREFIX_PATH=/home/user/libOTe/out/build/linux into the terminal, the error is:
image
And when I type cmake . -D CMAKE_PREFIX_PATH=/home/user/libOTe/out/build/linux into the terminal again, the error is:
image
But I remember when I install the libOTe I used relic.

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

Hello teacher, the front span-lite issue had been solved. However, when I cmake . another question occur:

CMake Error at libOTe/out/build/linux/cryptoTools/cryptoToolsDepHelper.cmake:92 (message):
  could not find relic.  Add -DFETCH_RELIC=ON or -DFETCH_ALL=ON to auto
  download.

How to solve that, thanks! Sorry to disturb you again.

from libote.

ladnir avatar ladnir commented on May 27, 2024

You need to install relic and whatever else you are using (eg span). You can install them to that out/install/linux dir using the main libOTe build.py script. This calls cmake which will build and install them.

from libote.

ladnir avatar ladnir commented on May 27, 2024

Also take a look at the ProjectTemplate Readme. It talks about some of this

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

You need to install relic and whatever else you are using (eg span). You can install them to that out/install/linux dir using the main libOTe build.py script. This calls cmake which will build and install them.
image

I check my out/install/linux, I have installed the relic before cmake:
This is my out/install/linux dir, I'm not sure if it has been installed.

from libote.

ladnir avatar ladnir commented on May 27, 2024

Is your code on github? I can take a look

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

Is your code on github? I can take a look

Here is my code: I want to test the KKRT's N-choose-One OT, and I've copy the test demo to the main.cpp in the root dir. My purpose is to use its interface but I can't cmake it. Thank you for helping!
Here's my code: https://github.com/StarKirby1102/KKRT
image

from libote.

ladnir avatar ladnir commented on May 27, 2024

change your headers to


#include "libOTe/TwoChooseOne/OTExtInterface.h"

#include "libOTe/Tools/Tools.h"
#include "libOTe/Tools/LinearCode.h"
#include <cryptoTools/cryptoTools/Network/Channel.h>
#include <cryptoTools/cryptoTools/Network/Session.h>
#include <cryptoTools/cryptoTools/Network/IOService.h>
#include <cryptoTools/cryptoTools/Common/Log.h>
#include <cryptoTools/cryptoTools/Common/TestCollection.h>

#include "libOTe/NChooseOne/Kkrt/KkrtNcoOtReceiver.h"
#include "libOTe/NChooseOne/Kkrt/KkrtNcoOtSender.h"

call cmake with -DCMAKE_PREFIX_PATH=path/to/libOTe. So assuming you are in your KKRT directory, call

cmake . -DCMAKE_PREFIX_PATH=./libOTe

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

change your headers to


#include "libOTe/TwoChooseOne/OTExtInterface.h"

#include "libOTe/Tools/Tools.h"
#include "libOTe/Tools/LinearCode.h"
#include <cryptoTools/cryptoTools/Network/Channel.h>
#include <cryptoTools/cryptoTools/Network/Session.h>
#include <cryptoTools/cryptoTools/Network/IOService.h>
#include <cryptoTools/cryptoTools/Common/Log.h>
#include <cryptoTools/cryptoTools/Common/TestCollection.h>

#include "libOTe/NChooseOne/Kkrt/KkrtNcoOtReceiver.h"
#include "libOTe/NChooseOne/Kkrt/KkrtNcoOtSender.h"

call cmake with -DCMAKE_PREFIX_PATH=path/to/libOTe. So assuming you are in your KKRT directory, call

cmake . -DCMAKE_PREFIX_PATH=./libOTe

I try it follow your answer, but a new question has occured.

  Could not find a package configuration file provided by "span-lite" with
  any of the following names:

    span-liteConfig.cmake
    span-lite-config.cmake

However, I have install my project before runninig.
image
Is there something missing?

from libote.

ladnir avatar ladnir commented on May 27, 2024

Here's what I did. I have two folders,

LibOTe
KKRT

I build libOTe as normal.

Then I cloned your repo (without libOTe as a sub module)

Fixed your headers

Called cmake . -DCMAKE_PREFIX_PATH=../libOTe

In theory, libOTe can be anywhere.

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

Here's what I did. I have two folders,

LibOTe KKRT

I build libOTe as normal.

Then I cloned your repo (without libOTe as a sub module)

Fixed your headers

Called cmake . -DCMAKE_PREFIX_PATH=../libOTe

In theory, libOTe can be anywhere.

Maybe missing some denpendencies when downloading, building or installing, my district can't use vpn to dowanload some resouce. Could you please send me an installed libOTe version(zip or tar.gz) to me or help me to install my project? I'm a rookie, I really want to try to use it , thanks!

from libote.

ladnir avatar ladnir commented on May 27, 2024

No, maybe you should get off VPN.

Take a look at the cryptoTools/thirdparty/getXXXX.cmake files. You can manually download them and place them in the thirdparty folder and run the build.

You'll only need to do this for cryptoTools/thirdparty ( span, relic, boost). But libOTe has other dependancies depending on how it's configured.

from libote.

StarKirby1102 avatar StarKirby1102 commented on May 27, 2024

I rebuild the libOTe, successfully run the test! Thanks.

from libote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.