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

JS Key Chain #6

Closed
4 of 5 tasks
richardschneider opened this issue Nov 25, 2017 · 8 comments
Closed
4 of 5 tasks

JS Key Chain #6

richardschneider opened this issue Nov 25, 2017 · 8 comments

Comments

@richardschneider
Copy link
Owner

richardschneider commented Nov 25, 2017

Implement a key store #2 in JavaScript. See the doc, code and spec

It must

  • Manage a key (create, delete, list)
  • Import/Export a key
  • Encrypt/Decrypt a stream of data with a key
  • Create a PKCS 7 CMS message

It could

  • Sign/Verify a stream of data with a key
@RangerMauve
Copy link

Is this going to adhere to what was already done for the golang implementation?

@richardschneider
Copy link
Owner Author

@RangerMauve Yes, the ipfs key commands will be implemented. Here's a more updated spec.

Also need ipfs key export and ipfs key import commands.

@richardschneider
Copy link
Owner Author

@RangerMauve Encrypted PubSub is easy with CMS. Simply convert the topic message (plain message) into CMS (cipher message) and then publish. The CMS message contains the information needed (the key id) to convert the cipher message into a plain message.

@RangerMauve
Copy link

So the goal is to get IPFS to seamlessly integrate with rfc5652 messages for every level of the API?

@richardschneider
Copy link
Owner Author

@RangerMauve Yes, that is the goal. See the keystore spec for suggested API changes.

@richardschneider richardschneider changed the title JS Key Store JS Key Chain Dec 3, 2017
@richardschneider
Copy link
Owner Author

Thanks to a short discussion with @diasdavid, a few things have been clarified

  • This a key chain
  • It uses a key store to save/retrieve an encrypted key

The key store is some implementation of interface-datastore.

Note: 16 minutes of discussion equates to 5 hours of refactoring!

@RangerMauve
Copy link

@richardschneider Could you maybe link to the discussion if there's a digital version available?

@richardschneider
Copy link
Owner Author

@RangerMauve The source is now available at https://github.com/libp2p/js-libp2p-keychain

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

No branches or pull requests

2 participants