baseline icon indicating copy to clipboard operation
baseline copied to clipboard

SRI - Accept Eddsa signatures throughout the application

Open biscuitdey opened this issue 1 year ago • 2 comments

Overview

Previously we accepted only Ecdsa signatures in the SRI because we used Metamask to login and Metamask used Ecdsa signatures. But Ecdsa signature verification inside circom zk circuits is very https://github.com/eea-oasis/baseline/pull/752 & the available alternatives are not widely used (causing issues with https://github.com/eea-oasis/baseline/pull/752#issuecomment-1733898957). Keeping these issues in mind, SRI team has decided to use Eddsa signatures.

Reference

PR #752

Tasks

  • [ ] Generate Eddsa signatures on the client-side
  • [ ] Add Eddsa sig verification in auth

biscuitdey avatar Oct 05 '23 12:10 biscuitdey

Currently blocked by https://github.com/eea-oasis/baseline/issues/765

ognjenkurtic avatar Nov 16 '23 15:11 ognjenkurtic

Approach used (as suggested by Andreas):

  1. get pubkey_owner from accounts in MM through API
  2. `message = keccack256(pubKey_owner)'
  3. call the MM signing function API with the message as payload and the target account to use
  4. API returns signature
  5. Convert hex signature into Bigint number
  6. That is the EdDSA privkey
  7. Then generate the EdDSA pubkey from privkey using circom crypto library
  8. Then use circom crypto library to create EdDSA signatures with privkey

biscuitdey avatar Jan 10 '24 08:01 biscuitdey

Completed.

biscuitdey avatar Jun 20 '24 14:06 biscuitdey