w3c-ccg / universal-wallet-interop-spec

A data model and abstract interfaces for digital wallets
http://w3id.org/wallet
Other
56 stars 13 forks source link

Fix Notation regarding ECC key descriptions and object structures #113

Closed ehanoc closed 1 year ago

ehanoc commented 1 year ago

Why

Some of the notations are incorrect in the context of elliptic curve cryptography specifically in the context of Twisted Edwards Curve form.

References

OR13 commented 1 year ago

See also https://www.rfc-editor.org/rfc/rfc8037#appendix-A.4

ehanoc commented 1 year ago

Appreciate the reply @OR13

I can see how my first point wouldn't be compatible with the spec. Using d for the scalar as the pvtkey seems right then.

Although It is important to get all right, specially around 25519. I dare to say some of these specs are actually incorrect and confuse a lot of people. They might need to be revised (maybe already through Erratas?). Specially around ed22519 and the compressed form representation of it's public key. In Edwards twisted curves it's the y(255 bits) with a signed bit for x. And the spec clearly says x.

The other more minor issue is that they put ed25519 under elliptic curves, which is technically false. It's a signature scheme. Reference here https://ed25519.cr.yp.to/ from the actual author.

Any chance we can get more eyes on this?

OR13 commented 1 year ago

I suggest you take this to CFRG IETF list or JOSE lists, this spec aims to support key formats that conform to standards.

There are a lot of non standard key formats that might be more compact / aesthetic, but that are less well adopted, and therefore less interoperable.

You might also use the multikey format, which probably aligns more with what you are expecting and is currently being standardized at W3C, in the vc-data-integrity spec.

ehanoc commented 1 year ago

Thanks @OR13 , i understand that you are trying to comply with the spec.

Will have a look at the vc-data-integrity spec.