zk-passport / proof-of-passport

Proof of passport protocol using zk-SNARKs
https://proofofpassport.com
260 stars 38 forks source link

Add support for new signature algorithms #38

Open 0xturboblitz opened 7 months ago

0xturboblitz commented 7 months ago

It's crucial for proof of passport to support more signature algorithms. See the map here for which country uses which. Here there are in order of priority.

Signature algorithm Mock passport data Supported Assigned
sha256WithRSAEncryption done
sha1WithRSAEncryption done
rsassaPss done
sha512WithRSAEncryption done
ecdsa-with-SHA384
ecdsa-with-SHA1
ecdsa-with-SHA256
ecdsa-with-SHA512

They are all based on the same primitives (RSA, ECDSA and SHA) that all have implementations in circom.

With the new circuit design we shipped, adding support for new signature algorithms can be done easily by copying the passport verifier circuit and modifying it.

Hash function circuits here

If you try your hands at those, please include typescript tests for them.

puneeth072003 commented 2 months ago

I'd like to take up this issue.

remicolin commented 2 months ago

Hi @puneeth072003 you can work on this, have you experience building circom circuits? You can't take the whole issue but you can start by working on one of the 3 signature/hash algorithm.

RajeshRk18 commented 2 months ago

Can I take up this issue? I've experience contributing to PLUME with circom. So, I'll be able to implement all 3 signature schemes

0xturboblitz commented 2 months ago

Hi @RajeshRk18, yes go for it If you have questions you can dm us at @FlorentTavernier or @colinremi on telegram

remicolin commented 1 month ago

hi @RajeshRk18 do you have any updates to share with us? We will assign the rsa-pss part to the person currently working on mgf1.

RajeshRk18 commented 1 month ago

@remicolin I am on it! Started working on rsapss already. Will make a pr soon

RajeshRk18 commented 1 month ago

RsassaPss is in wip.

RajeshRk18 commented 1 month ago

@remicolin Also rsassaPss requires MGF. So, #115 needs to be merged

remicolin commented 1 month ago

@RajeshRk18 Please focus on SHA1 and ECDSA for the moment, they require already a good amount of work.

0xturboblitz commented 1 month ago

Just added the mock passport data for rsassaPss here: https://github.com/zk-passport/proof-of-passport/blob/57ec1c3407ea1f66f348636a68e0d1c6cf914c65/common/src/utils/mockPassportData.ts#L105

If anyone wants to, you can now try doing the full implementation for rsassaPss using https://github.com/zk-passport/proof-of-passport/pull/115

RajeshRk18 commented 1 month ago

@0xturboblitz why I was unassigned? I am almost done

seshanthS commented 1 month ago

Hello, Shall I take sha1WithRSAEncryption

0xturboblitz commented 1 month ago

Assigning to @seshanthS as @RajeshRk18's sha1 pr is mostly copy-paste and does not compile

0xVikasRushi commented 3 weeks ago

Hello @remicolin @0xturboblitz 👋

I was thinking to implement ECDSA with sha1.

Please let me know if i can take up the ecdsa-with-SHA1

0xturboblitz commented 3 weeks ago

please do @0xVikasRushi

remicolin commented 2 weeks ago

@0xVikasRushi can you give your telegram @?

0xVikasRushi commented 2 weeks ago

@0xVikasRushi can you give your telegram @?

@Rushi0578