Closed andremmvgabriel closed 4 years ago
Hello,
The code required a config file:
ConfigFile cf(configFile);
What is the path you are passing to the function as configFile
?
Hello, and thanks for answering.
I have the config file in the same folder as the cpp file. So, after compiling the cpp, I run the code with the command line:
./exe_oblivious_transfer 1 "test_oblivious_transfer_config.txt"
Since both files are in the same folder, I'm assuming that I can specify its path with only its name "test_oblivious_transfer_config.txt"
Let me check what happens if I specify all the path to it.
Yes, the same error occurs when I specify the entire path to the config file.
The error come from this line at your code:
auto dlog = make_shared<OpenSSLDlogECF2m>();
The error message comes from this line at libscapi, and does not related to your OT file.
When you are using this object, it relies that a file called: ../include/configFiles/NISTEC.txt
exists.
Hmm, I've suspected also that because in the libscapi documentation, in the "Quickstart" tab, you have a sample code with the following line:
DlogGroup* dlog = new OpenSSLDlogECF2m("include/configFiles/NISTEC.txt", "K-233");
Where the path to the NISTEC file is specified. So should the error be fixed if I change the line that is giving an error as following?
auto dlog = make_shared<OpenSSLDlogECF2m>("path_to_NISTEC.txt", "K-233");
Yes, it should work.
Okay, so I've changed the error line to:
auto dlog = make_shared<OpenSSLDlogECF2m>("../../../../libscapi/include/configFiles/NISTEC.txt", "K-233");
The error about the const char* was solved indeed! Thanks! However, now there is another issue showing in the console, which is:
terminate called after throwing an instance of 'std::invalid_argument'
what(): x, y values are not a point on this curve
This happens in the line: output.g0 = dlog->generateElement(false, point);
Is this error because of the "K-233" specified previously?
I tried to run your code with K-163 and it works fine.
Perfect! Works fine now!
Thank you for all the help you have provided.
Hello everyone,
Hope I find you well!
Issue Description
So, after trying for a while to compile the example script with no success, I've decided to analise the code inside each example main in order to understand all the steps.
For each example, I've started by creating an empty script and copy piece by piece segments of your example code. For each segment copied, I compiled the code, printed the outputs, and commented the code (just for sake of my own understanding).
Everything went fine for the Communication example. However, in the Oblivious Transfer example, I can't get rid of an error which is:
terminate called after throwing an instance of 'char const*' Aborted (core dumped)
This error occurs when I try to run the code in line: auto dlog = make_shared\<OpenSSLDlogECF2m>(); inside the readConfigFile function.
How to reproduce the bug
This is my "test_oblivious_transfer.cpp" file (I didn't manage to copy much of the example code because the errors occurs very soon in the code). You have to copy this code inside a cpp. Pay attention to the "../../../../" on the includes in order to understand in what folder the file should be put in.
Along side with this file, I've copied the OTConfig file inside the libscapi OTExample folder.
Compile and run it. To run the code I type the command: ./compiled_file (which in my case was ./exe_oblivious_transfer 1 "test_oblivious_transfer_config.txt").
Machine details
Did anyone else had this error? Can someone help me?
Thanks. Best regards, André