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

Implement support for Bls12381G1 KeyPair #15

Open
tplooker opened this issue Jun 14, 2020 · 6 comments
Open

Implement support for Bls12381G1 KeyPair #15

tplooker opened this issue Jun 14, 2020 · 6 comments

Comments

@tplooker
Copy link
Member

Some BLS and BBS signatures will involve the usage of a public key in G1, hence support should be added

@tplooker
Copy link
Member Author

tplooker commented Sep 3, 2020

All of the APIs are now exposed in bbs-signatures

@tplooker
Copy link
Member Author

tplooker commented Sep 3, 2020

The functionality in Bls12381G2KeyPair essentially needs to be replicated in the context of G1

kdenhartog pushed a commit that referenced this issue Sep 9, 2020
This adds support for Bls12381G1 KeyPairs, but the signer factory
and verifier factories which use @mattrglobal/bbs-signatures still
need to be updated before sign and verify will work properly.

re: issue #15

Signed-off-by: Kyle Den Hartog <kyle.denhartog@mattr.global>
kdenhartog added a commit that referenced this issue Sep 9, 2020
* feat: adds support for Bls12381G1KeyPairs

This adds support for Bls12381G1 KeyPairs, but the signer factory
and verifier factories which use @mattrglobal/bbs-signatures still
need to be updated before sign and verify will work properly.

re: issue #15

Signed-off-by: Kyle Den Hartog <kyle.denhartog@mattr.global>

* Update multicodec byte comment for Bls12381G1

Co-authored-by: Tobias Looker <tobias.looker@mattr.global>

* fix: removes functionality for signer and verify in bls12381G1KeyPair

this removes the sign and verifier factories as well as the tests to check sign
and verify for Bls12381G1KeyPair. The BBS+ signatures library needs to be updated
before this functionality will work for signing and verifying with G1 key pairs.

Co-authored-by: Tobias Looker <tobias.looker@mattr.global>
@kdenhartog
Copy link
Contributor

#26 got most of this done. There still remains some work to finish this which depends on mattrglobal/bbs-signatures#52 to finish

@OR13
Copy link

OR13 commented Nov 13, 2020

@tplooker @kdenhartog bump on this :)

unstable says "Not Implemented"

@kdenhartog
Copy link
Contributor

We've got support for the representation at this point, but not the usage (signer and verifier functions which were temporarily deleted in #26). Some of the Rust code still needs to be updated so we can use the G1 keypairs with the BBS Signatures which is why the unstable release still shows as "Not Implemented" (assuming I understand what you're referring to correctly).

I think in the thick of it this work got de-prioritized at the moment while we're working through some of the other related issues with contexts at the higher layers. We'll eventually get around to finishing it up, but if you've got an immediate need for it happy to review PRs and help get it through for you.

@OR13
Copy link

OR13 commented Nov 16, 2020

I don't have a use for it until we have a plan for it in https://github.com/w3c-ccg/ldp-bbs2020

I added support for both key pairs to did key over the weekend, here is a demo:

https://did.key.transmute.industries/did:key:z5TcEfyF1iXbRR3CEWmce569adi4JUCBXa7zKriHTTapk9m21APZbJXprWwBjKrNAeAs2XeYusP1nsqeeAXjg1mRGYkimTkpzT5Gj6QPUjkyfWexyowYA7iw3RCksysMRpijeh1mWxzbXAGHvYNwvwAEgm78KqDwUVexuqEoYYPuBAyE5rAcH7v8b3uggTLUmQNNSJ4Tp

{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    {
      "@base": "did:key:z5TcEfyF1iXbRR3CEWmce569adi4JUCBXa7zKriHTTapk9m21APZbJXprWwBjKrNAeAs2XeYusP1nsqeeAXjg1mRGYkimTkpzT5Gj6QPUjkyfWexyowYA7iw3RCksysMRpijeh1mWxzbXAGHvYNwvwAEgm78KqDwUVexuqEoYYPuBAyE5rAcH7v8b3uggTLUmQNNSJ4Tp"
    }
  ],
  "id": "did:key:z5TcEfyF1iXbRR3CEWmce569adi4JUCBXa7zKriHTTapk9m21APZbJXprWwBjKrNAeAs2XeYusP1nsqeeAXjg1mRGYkimTkpzT5Gj6QPUjkyfWexyowYA7iw3RCksysMRpijeh1mWxzbXAGHvYNwvwAEgm78KqDwUVexuqEoYYPuBAyE5rAcH7v8b3uggTLUmQNNSJ4Tp",
  "verificationMethod": [
    {
      "id": "#z3tEGEgLVT26ULshZDW1tz6LnRNm4jGsnoiCRDxLgS3PArtULQz72oTaCUj3ySfJfCiB8b",
      "controller": "did:key:z5TcEfyF1iXbRR3CEWmce569adi4JUCBXa7zKriHTTapk9m21APZbJXprWwBjKrNAeAs2XeYusP1nsqeeAXjg1mRGYkimTkpzT5Gj6QPUjkyfWexyowYA7iw3RCksysMRpijeh1mWxzbXAGHvYNwvwAEgm78KqDwUVexuqEoYYPuBAyE5rAcH7v8b3uggTLUmQNNSJ4Tp",
      "type": "JsonWebKey2020",
      "publicKeyJwk": {
        "kty": "EC",
        "crv": "BLS12381_G1",
        "x": "rKYC5xKLYiqwmalS3AI0XxSFExCwfwzoa3ku8lwIVypGoZS9I5IXC8r65ra1-eU4"
      }
    },
    {
      "id": "#zUC73goUoJWFuBFidjGu1VJyyy9Yh1TJzuvU4UPsXDGYSaTKKfGwnEtXTLDEKsfF8WegFPaGop1EJgi7yP3rHoL8jBQksc2vr6KTsCrDu6KpPTSyJS4S66rzUydCYtZe3Bg46fY",
      "controller": "did:key:z5TcEfyF1iXbRR3CEWmce569adi4JUCBXa7zKriHTTapk9m21APZbJXprWwBjKrNAeAs2XeYusP1nsqeeAXjg1mRGYkimTkpzT5Gj6QPUjkyfWexyowYA7iw3RCksysMRpijeh1mWxzbXAGHvYNwvwAEgm78KqDwUVexuqEoYYPuBAyE5rAcH7v8b3uggTLUmQNNSJ4Tp",
      "type": "JsonWebKey2020",
      "publicKeyJwk": {
        "kty": "EC",
        "crv": "BLS12381_G2",
        "x": "iABvXhR41dnp06OEhB8fTSaCTVtpXw-ROd3tGIZ5V5BMEXZpQ9YUt8aNKTCGruV5AV8RvTqpouV2bpDcLgJh6__xn-vZIq3J0JyOhgH58rFGxSrv4iIUMJSypy6VkCGX"
      }
    }
  ],
  "authentication": [
    "#z3tEGEgLVT26ULshZDW1tz6LnRNm4jGsnoiCRDxLgS3PArtULQz72oTaCUj3ySfJfCiB8b",
    "#zUC73goUoJWFuBFidjGu1VJyyy9Yh1TJzuvU4UPsXDGYSaTKKfGwnEtXTLDEKsfF8WegFPaGop1EJgi7yP3rHoL8jBQksc2vr6KTsCrDu6KpPTSyJS4S66rzUydCYtZe3Bg46fY"
  ],
  "assertionMethod": [
    "#z3tEGEgLVT26ULshZDW1tz6LnRNm4jGsnoiCRDxLgS3PArtULQz72oTaCUj3ySfJfCiB8b",
    "#zUC73goUoJWFuBFidjGu1VJyyy9Yh1TJzuvU4UPsXDGYSaTKKfGwnEtXTLDEKsfF8WegFPaGop1EJgi7yP3rHoL8jBQksc2vr6KTsCrDu6KpPTSyJS4S66rzUydCYtZe3Bg46fY"
  ],
  "capabilityInvocation": [
    "#z3tEGEgLVT26ULshZDW1tz6LnRNm4jGsnoiCRDxLgS3PArtULQz72oTaCUj3ySfJfCiB8b",
    "#zUC73goUoJWFuBFidjGu1VJyyy9Yh1TJzuvU4UPsXDGYSaTKKfGwnEtXTLDEKsfF8WegFPaGop1EJgi7yP3rHoL8jBQksc2vr6KTsCrDu6KpPTSyJS4S66rzUydCYtZe3Bg46fY"
  ],
  "capabilityDelegation": [
    "#z3tEGEgLVT26ULshZDW1tz6LnRNm4jGsnoiCRDxLgS3PArtULQz72oTaCUj3ySfJfCiB8b",
    "#zUC73goUoJWFuBFidjGu1VJyyy9Yh1TJzuvU4UPsXDGYSaTKKfGwnEtXTLDEKsfF8WegFPaGop1EJgi7yP3rHoL8jBQksc2vr6KTsCrDu6KpPTSyJS4S66rzUydCYtZe3Bg46fY"
  ]
}

@kdenhartog kdenhartog removed their assignment May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants