Sahamati / rahasya

The project aims to simplify the usage of ECC curve (curve25519) with Diffie-Hellman Key exchange. The work is inline with the Account Aggregator Specification.
Apache License 2.0
13 stars 20 forks source link

Any support for other language apart from Java? #25

Closed sanket-vekariya closed 2 years ago

sanket-vekariya commented 2 years ago

Is there any guidance to implement at mobile side along with all the legal specifications? (Android/iOS/Fluttet/ReactNative or any Web/Mobile Front Technology)

It would be very much helpful if any guidance is available. Also is there any existing code available or is this under development for user facing languages? Is there any future plans here to develop with other languages?

sanket-vekariya commented 2 years ago

@gsasikumar

gsasikumar commented 2 years ago

@sanket-vekariya I did make some progress but was not able to test this thoroughly. Is it possible to take a look and help me with the test? This has both Javascript and C. The C implementation works till deriving a DHE shared key but not end to end. I feel javascript (node) works end to end. If you think it's not helping then I can make it in other languages. But rather than doing it in multiple languages, I prefer to have some common language like C or plain old javascript and build the native interfaces in the respective languages.

Can you check the node code to see if it fits your need? https://github.com/gsasikumar/rahasya/

sanket-vekariya commented 2 years ago

@gsasikumar I checked with both the flows.. Here are the results.

Javascript (node) output:

image

C output:

image

Any guidance how to proceed further along with the flow (encryption for request params, decryption from output result, how to use these keys as an input request of DHPublicKey, etc.) ?

gsasikumar commented 2 years ago

@sanket-vekariya ok got it. Looks like I did it only till deriving the DHE key. we need to use KDF after this. is it possible to include this javascript code in react? If it is then I will create the complete KDF.

sanket-vekariya commented 2 years ago

@gsasikumar Sure.. It would be very helpful.. Let us know if anything we can contribute here.

sanket-vekariya commented 2 years ago

@gsasikumar Can you update / guide here once this is done? Too many things are depending on this part for us.

gsasikumar commented 2 years ago

@sanket-vekariya I have completed the javascript side of the work. I am trying to test it with java to see the compatibility. Will update you soon

sanket-vekariya commented 2 years ago

@gsasikumar Sure.. If possible, can you please share you WIP code in some branch so we can help you with testing and others??

gsasikumar commented 2 years ago

I have committed to the final working code. Feel free to take it from my repo. I will raise the PR soon.

sanket-vekariya commented 2 years ago

@gsasikumar This new implementation is based on the "curve25519" as per the AA specifications, correct?

gsasikumar commented 2 years ago

@sanket-vekariya if this has addressed your issue then pls close this defect.

gsasikumar commented 2 years ago

as this is addressed i am closing this request