Giter VIP home page Giter VIP logo

cryptotools's People

Contributors

abarak-biu avatar ame-reiori avatar dd23 avatar erik-buchholz avatar fabrice102 avatar kimlaine avatar ladnir avatar ladnir2 avatar ldr709 avatar rahulrachuri avatar rindalvisa avatar robtrifiletti avatar sagrawal87 avatar spaceships avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptotools's Issues

few issues with the cmake and with the readme.md

In the Unix subsection in the install section in readme.md , there is a call to make right after installing boost. But it did not succeed for me without applying cmake first. (on macos)

[Btw, the boost.get also fails on macos, and it only works after commenting out lines as described here: https://github.com/zcash/zcash/issues/4333 . - This is not an issue in cryptoTools obviously.]

Once again in the readme file, it says the binary name is ./frontend_libOTe . But that's just a copy-paste issue from the libOTe project. Instaed it should be ./frontend_cryptoTools/frontend_cryptoTools

Trying make install also fails. It looks for a file cryptoools-config.cmake in the project root directory. There is no such file there. But there is a file in another directory named cryptoToolsconfig.cmake (no dash, and capital T). Could it be this file? Seemed to do some install process on my laptop

How to select prime curve by curveID

The first figure contains the elliptic curve included in the RElic
image
The second graph is selecting an elliptic curve by curveID, but ep_param_get() returns 12, and if curveID is not the selected 12, the SECG_K256 curve is used
image
But I want to select CURVE_25519, so what should I select?

Build error: no type named 'const_iterator' in 'std::span'

When building the cryptoTools without span-lite, i got error:

In included file: no type named 'const_iterator' in 'std::span<osuCrypto::block, 18446744073709551615>'clang(typename_nested_not_found)
MatrixView.h(16, 32): Error occurred here
Matrix.h(16, 27): In instantiation of template class 'osuCrypto::MatrixViewosuCrypto::block' requested here
KkrtNcoOtReceiver.h(34, 23): In instantiation of template class 'osuCrypto::MatrixosuCrypto::block' requested here

Because const_iterator in std::span was removed as a result of LWG3320.

May i pull request to fix it?

Build error: accessing undefined mLog

Hi,

The IOService class member mLog is accessed from Channel.cpp (lines 46 and 70) whether ENABLE_NET_LOG was defined or not. Naturally, when ENABLE_NET_LOG is not defined the build fails.

A missing file Backtrace.h is included from cryptoTools/frontend_cryptoTools/main.cpp line 13.

FYI.

Unable to compile this library

locomotive@locomotive-VirtualBox:~/sknn/libOTe/cryptoTools$ make
[ 2%] Built target sha_asm
[ 5%] Building CXX object cryptoTools/CMakeFiles/cryptoTools.dir/Network/Channel.cpp.o
In file included from /home/locomotive/sknn/libOTe/cryptoTools/cryptoTools/Network/Channel.h:5:0,
from /home/locomotive/sknn/libOTe/cryptoTools/cryptoTools/Network/Channel.cpp:1:
/home/locomotive/sknn/libOTe/cryptoTools/cryptoTools/Network/SocketAdapter.h: In member function ‘virtual void osuCrypto::BoostSocketInterface::send(osuCrypto::spanboost::asio::mutable_buffer, bool&, osuCrypto::u64&)’:
/home/locomotive/sknn/libOTe/cryptoTools/cryptoTools/Network/SocketAdapter.h:166:25: error: no match for ‘operator!=’ (operand types are ‘boost::system::error_code’ and ‘int’)
error = (ec != 0);
~~~^~~~
compilation terminated due to -Wfatal-errors.
cryptoTools/CMakeFiles/cryptoTools.dir/build.make:354: recipe for target 'cryptoTools/CMakeFiles/cryptoTools.dir/Network/Channel.cpp.o' failed
make[2]: *** [cryptoTools/CMakeFiles/cryptoTools.dir/Network/Channel.cpp.o] Error 1
CMakeFiles/Makefile2:86: recipe for target 'cryptoTools/CMakeFiles/cryptoTools.dir/all' failed
make[1]: *** [cryptoTools/CMakeFiles/cryptoTools.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

a typo in PPA comments

Hi,
This is a great implementation of PPA. But there is a tiny typo here:

// G[i] = G[i:0] = G[i:j] ^ G[j-1:0] & P[j:0]

I think this should be 'G[i] = G[i:0] = G[i:j] ^ G[j-1:0] & P[i:j]' with 'P[j:0]' replaced with 'P[i:j]'.

PS:
Maybe some more notes for others to understand why your elegant implementation works:
In textbook, the prefix in PPA is updated as: G[i:j] = G[i:k] + P[i:k]*G[k-1:j]. So, G[i]=G[i:0] = G[i:j] + P[i:j]G[j-1:0]. The '+' is 'OR' and '' is 'AND'.
But this will require us to introduce another costly 'AND' operation since we need to implement 'OR' with 'AND' in MPC scenario. Generally, 'G[i:j] + P[i:j]*G[j-1:0]' is not equivalent to 'G[i:j] ^ G[j-1:0] & P[i:j]', when all of them are '1'. But the bad case will not occur here since we have constraints: G=X AND Y, and P=X XOR Y. So we are safe to use G[i:j] ^ G[j-1:0] & P[i:j], in which only one ADD is used.

‘osuCrypto::Sodium’ has not been declared

Why does this error occur?Thank you
/root/PSU_gai/BloomFilter/bloom_filter.h:17:18: error: ‘osuCrypto::Sodium’ has not been declared
17 | using osuCrypto::Sodium::Rist25519;

abort when calling chl.recv() on BitVector

Hi, the following code aborts on the receiver side. It works fine when replacing the use of BitVector to vector. Can you please help me figuring out how to fix this issue?
`
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include

#include <cryptoTools/Common/BitVector.h>

#include <cryptoTools/Network/Channel.h>
#include <cryptoTools/Network/Session.h>
#include <cryptoTools/Network/IOService.h>

using namespace osuCrypto;
using namespace std;

std::string addr = "localhost";

void sender(){
setThreadName("Sender");

// get up the networking
IOService ios(0);
Session sess(ios, addr, 1212, EpMode::Client);
Channel chl = sess.addChannel();

chl.resetStats();


BitVector outputBitMap(900);

// transfer tables and labels
chl.send(outputBitMap.data(), outputBitMap.size());

std::cout
        << "      Sent: " << chl.getTotalDataSent() << std::endl
        << "  received: " << chl.getTotalDataRecv() << std::endl << std::endl;

chl.close();
sess.stop();
ios.stop();
return;

}

void receiver(){
setThreadName("Receiver");

// get up the networking
IOService ios(0);
Session sess(ios, addr, 1212, EpMode::Server);
Channel chl = sess.addChannel();

chl.resetStats();

// get garbled tables and output maps
BitVector outputBitMap(900);
chl.recv(outputBitMap.data(), outputBitMap.size());

std::cout
    << "      Sent: " << chl.getTotalDataSent() << std::endl
    << "  received: " << chl.getTotalDataRecv() << std::endl << std::endl;
chl.resetStats();

chl.close();
sess.stop();
ios.stop();
return;

}

int main(int argc, char** argv) {

int role = atoi(argv[1]); // 0: send, 1: recv
role ? receiver() : sender();

}
`

This is the abort message I get:
"malloc.c:2394: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted"

Thanks a lot.

Bug in Timer

Hi,
I run into this:

std::cout << std::left << std::setw(width) << "Label " << " " << std::setw(p) << "Time (ms)" << " " << std::setw(p) << "diff (ms)\n__________________________________" << std::endl;

it should be out instead of cout.

can't find config.h in install destionation directory

CMakeList.txt
configure_file(cryptoTools/Common/config.h.in "cryptoTools/Common/config.h" )
shoud add ${PROJECT_SOURCE_DIR}
configure_file(cryptoTools/Common/config.h.in "${PROJECT_SOURCE_DIR}/cryptoTools/Common/config.h" )

setup failed

I follows the instruction and setup boost + miracle. I met these following issues. Have you ever see it before. I am using VS 2017.

image

image

Make issue with _mm_aesenclast_si128

I'm having issues buidling the latest version and I think it's related to the most recent commit. This is the error message I recieved when running make:

[ 65%] Building CXX object tests_cryptoTools/CMakeFiles/tests_cryptoTools.dir/AES_Tests.cpp.o
In file included from /home/yangziling/cryptoTools/tests_cryptoTools/AES_Tests.cpp:9:
/home/yangziling/cryptoTools/cryptoTools/Crypto/AES.h: In static member function ‘static osuCrypto::block osuCrypto::details::AES<types>::finalEnc(osuCrypto::block, const osuCrypto::block&) [with osuCrypto::details::AESTypes types = osuCrypto::details::NI]’:
/home/yangziling/cryptoTools/cryptoTools/Crypto/AES.h:195:20: error: ‘_mm_aesenclast_si128’ was not declared in this scope; did you mean ‘_mm_testnzc_si128’?
  195 |             return _mm_aesenclast_si128(state, roundKey);
      |                    ^~~~~~~~~~~~~~~~~~~~
      |                    _mm_testnzc_si128
compilation terminated due to -Wfatal-errors.
make[2]: *** [tests_cryptoTools/CMakeFiles/tests_cryptoTools.dir/build.make:63: tests_cryptoTools/CMakeFiles/tests_cryptoTools.dir/AES_Tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:163: tests_cryptoTools/CMakeFiles/tests_cryptoTools.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Question About CuckooHash Params

In cryptoTools/Common/CuckooIndex.cpp, the function selectParams is used to set CuckooHash Params,
what is the basis for setting the parameters, and are there any research papers on the relevant experimental conclusions and formulas?

For example, is there rigorous evidence supporting the lines in the figure below,
image
or which article proposed the formula for calculating the statSecParam parameter?
image

Thank you for your time and assistance. I truly appreciate your help in addressing my questions. Looking forward to hearing from you soon.

AES Portable roundEnc finalEnc declaration error

compile with ENABLE_SSE=OFF, throw error :
"definition of 'roundEnc' does not match any declaration in 'osuCrypto::details::AESosuCrypto::details::Portable'"

AES.h roundEnc finalEnc declaration
static block roundEnc(block state, const block& roundKey);
should change to
static block roundEnc(block& state, const block& roundKey);

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.