Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Add ed25519 and secp256k1 #30

Closed
AlbertoElias opened this issue Feb 9, 2019 · 4 comments · Fixed by #31
Closed

Add ed25519 and secp256k1 #30

AlbertoElias opened this issue Feb 9, 2019 · 4 comments · Fixed by #31

Comments

@AlbertoElias
Copy link
Contributor

AlbertoElias commented Feb 9, 2019

I saw that it only supports rsa keys here: https://github.com/libp2p/js-libp2p-keychain/blob/master/src/keychain.js#L201

But the underlying library (https://github.com/libp2p/js-libp2p-crypto) also supports ed25519, and also secp256k1 if you add https://github.com/libp2p/js-libp2p-crypto-secp256k1.

Is there anything holding this feature back or is it something simple that I could create a PR for it so it will be supported downstream in js-ipfs?

@vasco-santos
Copy link
Member

Hello @AlbertoElias

Thanks for creating the issue. It would be great if you could create a PR for that 😀

@AlbertoElias
Copy link
Contributor Author

@vasco-santos Hey, I have an implementation pending tests, and even though that existing tests do pass, I get this error:

13 02 2019 11:54:23.451:ERROR [launcher]: ChromeHeadless failed 2 times (timeout). Giving up.

  0 passing (3m)

Command failed: karma start /mnt/c/Users/aelia/code/js-libp2p-keychain/node_modules/aegir/src/config/karma.conf.js --files-custom --log-level error
Error: Command failed: karma start /mnt/c/Users/aelia/code/js-libp2p-keychain/node_modules/aegir/src/config/karma.conf.js --files-custom --log-level error
    at makeError (/mnt/c/Users/aelia/code/js-libp2p-keychain/node_modules/execa/index.js:174:9)
    at Promise.all.then.arr (/mnt/c/Users/aelia/code/js-libp2p-keychain/node_modules/execa/index.js:278:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! libp2p-keychain@0.3.6 test: `aegir test -t node -t browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libp2p-keychain@0.3.6 test script.

Seems like it can't run the browser tests. Any ideas? I wanted to push my implementation to double check it with you but it doesn't let me until tests run. Thanks!

@AlbertoElias
Copy link
Contributor Author

I managed to get the browser tests running, but I had to modify the browser configuration in aegir for karma to:

browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
	ChromeHeadlessNoSandbox: {
		base: 'ChromeHeadless',
		flags: ['--no-sandbox']
	}
}

I created a PR here: ipfs/aegir#333

@AlbertoElias
Copy link
Contributor Author

Also, my work on this issue is blocked by libp2p/js-libp2p-crypto-secp256k1#13

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

Successfully merging a pull request may close this issue.

2 participants