go-libp2p
go-libp2p copied to clipboard
custom signature scheme: dial attempt failed: proto: can't skip unknown wire type 6 for crypto_pb.PublicKey
Hi,
I wrapped a custom priv/pub signature scheme to implement the go-libp2p-crypto.PrivKey
and go-libp2p-crypto.PubKey
interface. But got the following error when running the chat example:
dial attempt failed: proto: can't skip unknown wire type 6 for crypto_pb.PublicKey
Is custom signature scheme currently supported?
The default chat.go works for me.
This two commits add support to the BLS signature scheme:
https://github.com/helinwang/go-libp2p-crypto/commit/e0b70571efc4c1424523637c01f89488c04133e0 https://github.com/helinwang/go-libp2p/commit/5025955d87a24cd0dd2aa642521ff43e7118115b
Any possibility for it gets merged? (adds a new dependency to "github.com/dfinity/go-dfinity-crypto/bls" though.)
Btw, I have not used gx
before, I have published my own version of go-libp2p-crypto
(hash is here: https://github.com/helinwang/go-libp2p-crypto/commit/e0b70571efc4c1424523637c01f89488c04133e0#diff-d95150d9db6fb31091770e6d6105b08dL1 ), will it be persisted on IPFS forever?
Thank you!
will it be persisted on IPFS forever?
Not unless someone pins it.
dial attempt failed: proto: can't skip unknown wire type 6 for crypto_pb.PublicKey
In your public and private key's Bytes()
function, you'll need to wrap your serialized key in a github.com/libp2p/go-libp2p-crypto/pb.{PublicKey,PrivateKey}
protobuf. Take a look at the Bytes()
implementation for Ed25519
and RSA
.
We'll probably want to take a close look at the BLS implementation but I'd love to include this if you make a PR.
@helinwang Any update on including BLS signature scheme in Libp2p?
Hi @aratz-lasa I don't have plan to spend time on this. Please feel free to use the code if you are working on this.