Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple/Replace SpongyCastle #44

Closed
ligi opened this issue Oct 2, 2018 · 11 comments
Closed

Decouple/Replace SpongyCastle #44

ligi opened this issue Oct 2, 2018 · 11 comments

Comments

@ligi
Copy link
Member

ligi commented Oct 2, 2018

Ideally SpongyCastle should be gone completely to allow multi-platform use cases in the future and work towards #1 . But I did not yet find a replacement library in Kotlin for it. I think it might be possible to extract and convert the needed functions from SpongyCastle - but this needs to be audited. So it also needs to be decoupled. This way users can stick to the well-tried SpongyCastle until the replacement gained trust.

acceptance criteria:

  • option to not use spongycastle anymore (replace with plain kotlin alternative - goal is to get rid of JVM dependency)
  • initializeCrypto() is gone there also ;-)
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 320.0 DAI (320.0 USD @ $1.0/DAI) attached to it.

@gitcoinbot
Copy link

gitcoinbot commented Nov 4, 2018

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 months ago.
Please review their action plans below:

1) rmeissner has been approved to start work.

Create new module in kethereum to abstract away anything related to spongycastle and related classes.

Idea would be to create a registry(similar to the Security providers in java) that is completely written in kotlin and doesn't work on strings (to make it work with proguard without any issues).

Then we would have implementations for all the required crypto functions that would use spongycastle. This would allow that even single functions could be upgraded to pure kotlin solutions. (This would probably be another module)

These implementations will be registered in the registry. And we will use this registry everywhere in kotlin.

I would need to check more details, but that would be my plan.

As this would be done as a side project (besides my normal work) I might need a little longer (should still be within the 2 month)

Learn more on the Gitcoin Issue Details page.

@rmeissner
Copy link
Contributor

Update on my plan:

  1. Remove all spongycastle dependencies (except for crypto module)
  2. Fix errors by extracting everything into custom classes in the crypto module
  3. Move all spongycastle specific extensions from the crypto module to a crypto_spongy module

This would allow that in the future you have another crpyto_ module that implements all the spongy stuff in pure kotlin

@ligi
Copy link
Member Author

ligi commented Nov 5, 2018

Sounds great! Looking forward to it.

@rmeissner
Copy link
Contributor

rmeissner commented Nov 5, 2018

@ligi should I also move all javax.crypto related method/classes to that abstraction layer?

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 320.0 DAI (320.0 USD @ $1.0/DAI) has been submitted by:

  1. @rmeissner

@ceresstation please take a look at the submitted work:


@spm32
Copy link

spm32 commented Nov 8, 2018

Awesome job @rmeissner paying you out now :)

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 320.0 DAI (320.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @rmeissner.

1 similar comment
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 320.0 DAI (320.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @rmeissner.

@spm32
Copy link

spm32 commented Nov 8, 2018

@rmeissner let me know if you want to do https://gitcoin.co/issue/walleth/kethereum/43 as well, happy to pay a tip :p

@rmeissner
Copy link
Contributor

@ceresstation I am generally interested in the topic, not sure if I will be able to pick it up soon (next 2 weeks) I will let you know ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants