Hello,

I have started working on a client server system in C++ for privacy preserving 
signal processing applications. Since this system will rely on certain public 
key cryptography primitives, I decided to try and implement them with MPIR, 
since GMP seems a bit more complicated to compile on Windows... In this (long) 
message, I will detail my current progress with MPIR, the inconsistencies / 
errors that I noticed and, at the end, some questions.

At the moment, I downloaded mpir-2.5.1 and I think I managed to build the 
library for x64 and the SandyBridge platform - dll_mpir_sandybridge (I'm 
working on a Core i5 SandyBridge). In order to do this, I had to run the 
build.vc10\mpir_config.py (need to cd to \build.vc10\ before running it) in 
order to create the dll and lib projects for this platform (by the way, 
\build.vc10\readme.txt says to use "mpir_build.py" which does not exist). 
Afterwards, from the VS GUI, I had some issue with the prebuild.bat script, 
because you need to add the path for the sandybridge option into it in order to 
build this project, so I added this line:

if /i "%1" EQU "sandybridge" ((set sdir=x86_64w\sandybridge) & (set 
platform=x64))

(hopefully, I got it right)

After this, I noticed some inconsistencies in the documentation concerning the 
way it creates directories:
- \dll\x64\Release
- \lib\x64\Release
- \build.vc10\x64\Release
- the build.vc10\lib and \build.vc10\dll remain empty

Afterwards, I decided to build the tests, to check if all went OK. For this, I 
build the lib_mpir_cxx project first (mpir-tests.sln it nags about a missing 
mpirxx.h without it). Sometimes, it throws build errors for certain test 
projects (regarding missing add-test-lib). I managed to get all of them to 
build correctly only after running build on add-test-lib and then (re)building 
those that fail one by one. I think it has something to do with the build order 
and some concurrency issues. Can they be built in batch mode without involving 
VS?

I went to the \build.vc10\mpir-tests directory and ran run-tests.py. I got an 
error: no such file or directory '..\\dll\\x64\\Release\\mpir.dll at line 33. 
From what I can tell, the path there is wrong, probably because of the 
directory inconsistencies I mentioned above. I corrected it and got that 182 
tests ran correctly (some were skipped with message "test suppressed for 
windows DLL").

\build.vc10\readme.txt mentions a last_build.txt generated in \build.vc10\, but 
I am unable to find it. Perhaps this functionality got removed...

Questions:
- I don't have that much experience in designing and writing (multiplatform) 
C++ applications from scratch and I was wondering if there is any article or 
book that helps in this sense or maybe some project that I could, at least, use 
as inspiration;
- I saw that GMP has also added a C++ class interface. Is it compatible with 
the MPIR one?
- The documentation states that "MPIR does not support the secure cryptographic 
functions provided by GMP". Could you please detail this statement?
- For the client - server communication part, I think that OpenSSL is a good 
choice, which, as far as I've read, can be configured to use GMP as a big 
number library. Does this mean that I can use it with MPIR as well? Is there 
any guide on how to do this?
- Since MPIR is forked from GMP to make it more Windows friendly, does this 
create any issues under Linux? At the moment, I am thinking of trying to use a 
Linux virtual machine for tests on my current platform. Are there any issues 
with running this library in a virtual machine?

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/mpir-devel/-/WkB0-ebPHxYJ.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to