ooh what are you working on?
Conversation
I'm working on a reference implementation for the crypto protocol in my thesis 😂 so far I've implemented ElGamal encryption and Pedersen commitments over a quadratic residue group, and have written a basic server that can store commitments sent by users
1
1
the purpose of the protocol is to add verifiability to postal voting :)
1
Oh neat! Encryption stuff goes way over my head. Much respect! 🤩
1
1
💛! What you don't see is the solid two hours I spent today wondering why everything decrypted to 1, until I realised I was taking the modulus by the incorrect of the two prime numbers in the system...
1
Arrgh sounds like the months I spent trying to figure out why my polymorphic identity function wouldn't type check, when I'd messed up my variable binding implementation.
1
1
curse ye De Bruijn indices! so confusing!
1
1
I've gotten into a bit of a pickle with Rust's type checker... my Elem struct has a reference to the Group it's from, and then an ElGamal struct has a reference to both a Group and an Elem.
The problem is: when I create a Group in the new() function, I can't take an Elem...
1
... because the Group still belongs to new() and not the about-to-be-created ElGamal :'( not sure how to resolve it, I've worked around it by cloning a value but that's not very satisfying
1
Replying to
Hmmmm interesting! Sometimes cloning is a good idea (sometimes folks get too hungup on not doing so), but there might be a better way. If you want me to look over it anytime - sometimes this stuff can be hard to explain without context - I'd be more than happy to help!
Replying to
Another solution miight be to use reference counting, and have a weak reference somewhere (to avoid a cycle). But I dunno if that fits your use case.
1
1
Cheers! I'll shoot you a message when I've got a spare minute. I've tried to fit in reference counting but not had much success. I'd like to avoid clones because that's going to be a clone on every group operation which I suspect will eat up a lot of time.
1
Show replies

