Inversed-Tech / eyelid

Private iris matching
Apache License 2.0
0 stars 0 forks source link

Implementation of encryption and decryption #82

Closed emmorais closed 1 month ago

emmorais commented 2 months ago

This PR adds encryption and decryption functionality. It provides basic features to YASHE cryptosystem. It doesn't deal with homomorphic operations.

teor2345 commented 1 month ago

Hey just checking if you need help with this PR?

emmorais commented 1 month ago

Hey just checking if you need help with this PR?

Can you please help with with merging?

teor2345 commented 1 month ago

Hey just checking if you need help with this PR?

Can you please help with with merging?

Yep, just doing this now.

u128::from<C::Coeff>() and u128::into<C::Coeff>() are already implemented, but we need to require that they are available in the trait type constraints. I'll fix that too.

teor2345 commented 1 month ago

That was a lot more complicated than I expected, the conversion methods were hidden behind a bunch of traits in different crates. No wonder they were difficult to discover.

I think I've implemented what you wanted, but it was tricky to know without the equations in the function documentation. Feel free to make any fixes or further changes.

emmorais commented 1 month ago

That was a lot more complicated than I expected, the conversion methods were hidden behind a bunch of traits in different crates. No wonder they were difficult to discover.

I think I've implemented what you wanted, but it was tricky to know without the equations in the function documentation. Feel free to make any fixes or further changes.

It looks very good now, thanks a lot for improving it in many ways! I think it is ready to merge now.

emmorais commented 1 month ago

Feel free to merge after approving.