Closed fletcher closed 9 years ago
Fletcher-
Sorry for the delay on this. I just saw the notification!
Thanks for checking this out and digging in. Let me check into this and see if I can figure out what's going on.
Ah, had forgotten about this but it's documented in the TODOs in the readme:
TODO: Complete the Python-as-client to C-as-server code path. As of now, this code only works one way. While fairly trivial to complete, I haven't done it yet
I'll see if I can add this to my list sooner rather than later.
I clearly was not seeing the specific parts that are broken. I'm happy to take a look if you have any pointers as to where I should be looking. Do you remember what parts needed to be completed?
It's been waaay too long to recall. Feel free to look into it. I'll check into this weekend and either let you know or just fix it, depending on what needs to be done. Not very useful if it doesn't work both ways w/ o zeee python.
Fixed the C server. Now the C code alone can act as server and client.
Thanks -- it seems to work for me. I'll play around with it.
Not directly related to the smp, but I was experimenting with Shamir's Secret Sharing and created a c version of the javascript example from wikipedia:
https://github.com/fletcher/c-sss
I think doing that helped me better understand a little bit of the math going on in your project (well, perhaps understand is a bit strong...)
Anyway, thanks again for fixing this!!
Glad it is helpful. :) If you find any other issues, let me know.
I'll check out Shamir's stuff. That looks interesting!
I've been exploring the SMP, and was looking for an actual implementation to play with. Thanks for sharing this!
I'm having trouble getting it to work though...
1) I don't use python, and don't have M2Crypto installed, so...
2) I figured I would learn a couple of things by hacking the c version to act as a server.
3) I modified the code to run in either "server" or "client" mode, based on whether an ip address is provided in the arguments
4) Two copies (1 server, 1 client) seem to connect ok and send data back and forth
5) I modified the server to perform steps 2 & 4 instead of 1,3,5.
6) I get lots of
unpackAndCompare: Failed
errors on the server side, andProof x check failed!
(x=3,4,5) or segfaults (or both) on the client side. I included the output (including some extra debugging statements that I added)Server:
Client:
It appears that the server fails in step4, which breaks the connection and causes the client to fail. But this could also be because of the errors on the server when receiving step 1.
If I skip step4 (and just resend the holder unchanged), then both instances complete, but report that the secrets don't match (which is the correct outcome since I skipped a step).
Are there any known gotchas that should prevent me from making this work? Is there something in setup() that needs to be changed on the server side? Something else I could be doing that causes step1 or step4 to fail?
Thanks!!!
Fletcher