zama-ai / bounty-program

Zama Bounty Program: Contribute to the FHE space and Zama's open source libraries and get rewarded 💰
https://zama.ai
252 stars 14 forks source link

Develop an FHE-based iris identification application tutorial with Concrete #58

Closed gelintonx closed 8 months ago

gelintonx commented 1 year ago

Overview

Design an iris recognition biometric template protection schemes based on Homomorphic Encryption

Description

Biometric recognition is becoming a prominent way to authenticate users or verify their identities. As highlighted in the ISO/IEC 24745, it is important to protect biometric information for secrecy, irreversibility, and renewability during storage and transfer. In this bounty you will need to design an FHE based remote authentication system that protects sensitive Iris information during storage and biometric comparison. In its paper "Hybrid biometric template protection: Resolving the agony of choice between bloom filters and homomorphic encryption", the research team looked at three different approaches: Bloom filters, homomorphic encryption and hybrid biometric template protection (BTP). The team highlighted the advantages and disadvantages of each approach.

The bounty objective is to:

The client:

Then the server:

Performance:

Your PR should comply with the following:

Library targeted

Reward

Up to €5,000

Related links and references

bcm-at-zama commented 11 months ago

Hello @gelintonx

Some comments on https://github.com/zama-ai/bounty-GacsBiometrics/tree/main (as it appeared yesterday, ie

commit 1630873d6e1e70fec2f5dc972b04958e4b2a565d Date: Mon Dec 18 00:04:19 2023 +0100

beta v1.4

):

    inp = 2 * probe_template + registered_template
    xor = fhe.univariate(lambda x: (x & 1) ^ ((x >> 1) & 1))(inp)

by

    inp = probe_template + registered_template
    xor = fhe.univariate(lambda x: x % 2)(inp)

It will compute XOR as well, I have tested on my computer (a 2019 Intel MacBookPro) and it seems a bit faster. Maybe to check on your side as well? I would say the bitwidth of the input of the PBS is as large (2 bits) but maybe there is less noise so the PBS can be faster. I did 5 inferences:

    old method: [82.257, 88.515, 100.945, 97.644, 93.514] seconds
    new method: [77.174, 79.680, 87.305, 91.242, 93.006] seconds
Create the app frontends/concrete-python/examples/iris-identification/{client,server}.py
Create the tutorial docs/tutorial/iris-identification.{md,ipynb}

of the open bounty submission? In particular, having a notebook is really a plus for people understanding.

In a nutshell, I would work on the packaging and documentation, to be more explicit to users.

Congrats for what you've done. Cheers

gelintonx commented 11 months ago

Dear @bcm-at-zama thank you for this review of the project. I have taken note of everything to repair it as soon as possible. If there is anything else I can help with I am available. Again, thank you very much.

bcm-at-zama commented 11 months ago

Thanks a lot, @gelintonx . You'll tell me if something is unclear. Maybe just keep in mind that it's one of the reviews, you should have one more after the break. Cheers

gelintonx commented 11 months ago

@bcm-at-zama Good morning and Happy new year! I have been testing a new template created using University of Salzburg kit it's size is 256 x 1 but the result is different from using 20 x 480 template. Performance different is huge 1.676 vs 68.335 seconds I would like to know your opinion about this difference. Also I added some new features and will commit soon.

bcm-at-zama commented 11 months ago

Happy new year. How should I reproduce the problem, please?

gelintonx commented 10 months ago

Good morning @bcm-at-zama this is the project I said https://wavelab.at/sources/USIT/. Templates are smaller than GacsBiometrics templates.

bcm-at-zama commented 10 months ago

Could you provide sources files and instructions on how to reproduce the problem, please? certainly the best is to create a GitHub issue in https://github.com/zama-ai/concrete/issues and someone in the team will look at it. If it's more convenient, don't hesitate to create a branch or repo somewhere with everything which is needed to reproduce the problem.

Thanks a lot

bcm-at-zama commented 10 months ago

And in the meantime, do you think we could already merge what you've done (with the comments I had given)? I really would love your biometry work to be public, such that we can show it to Concrete users

gelintonx commented 10 months ago

@bcm-at-zama Yes, I would also love to make it public. I have to push a new commit that I have been scheduling since the beginning of January.

bcm-at-zama commented 9 months ago

Hey @gelintonx . Let's try to finish this, can we?

gelintonx commented 8 months ago

@bcm-at-zama Sure I have been really busy but I also want to finish the project.

bcm-at-zama commented 8 months ago

We take the lead here from now, we are going to reward you for the work, thanks a lot for your contribution (https://github.com/zama-ai/bounty-GacsBiometrics).

gelintonx commented 8 months ago

@bcm-at-zama I get it, it's been a long time since I started. Thanks Zama team it has been a great opportunity to work with FHE