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

Feat: Added support for Ed25519Signature2020 signature type and Ed25519VerificationKey2020 #2241

Merged
merged 11 commits into from
Jul 17, 2023

Conversation

dkulic
Copy link
Contributor

@dkulic dkulic commented May 25, 2023

No description provided.

Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
TimoGlastra
TimoGlastra previously approved these changes May 25, 2023
Copy link
Member

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some primt statements. There are quite some places where suites are registered. Might be good to add a registry at some point for signature suites, which would also allow for dynamic registration of more suites

Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Darko Kulic <36031644+dkulic@users.noreply.github.com>
@dkulic
Copy link
Contributor Author

dkulic commented May 26, 2023

I will fix these errors, sorry for that, but one of them is multiformats library not supporting python 3.6. Python 3.6 is EOL, maybe it should be dropped?

Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
@swcurran
Copy link
Member

@WadeBarnes, others — can we drop Python 3.6? What is the follow on impact of dropping that? It seems long overdue.

@WadeBarnes
Copy link
Member

@swcurran, Yes we can drop Python 3.6. The py3.9 images have shown to be drop-in compatible where the BC Gov Python 3.6 based images were used before in all cases where I've upgraded to 0.8.1.

@dbluhm
Copy link
Member

dbluhm commented May 27, 2023

I opened up #2247 to make the version bump from 3.6 to 3.9

@swcurran
Copy link
Member

To be discussed at ACA-Pug Meeting — May 30, 2023.

@swcurran
Copy link
Member

swcurran commented Jun 1, 2023

Per the May 30, 2023 ACA-Pug meeting — we are dropping 3.6 support in ACA-Py #2244 / #2247 . As soon as that is done, this should be updated, processed and merged.

Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
@dkulic dkulic changed the title Feat: Added support for Ed25519Signature2020 signature type Feat: Added support for Ed25519Signature2020 signature type and Ed25519VerificationKey2020 Jun 13, 2023
Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
@dbluhm
Copy link
Member

dbluhm commented Jul 5, 2023

@dkulic is OOTO so I'll take care of the conflicts on this PR.

@dbluhm dbluhm force-pushed the feat/Ed25519Signature2020 branch from 272f352 to 650aeef Compare July 6, 2023 13:47
@dbluhm dbluhm requested a review from TimoGlastra July 6, 2023 14:48
@dbluhm
Copy link
Member

dbluhm commented Jul 6, 2023

This one is ready to go; since I had a (small) hand in it, I'll give others a chance to review.

@swcurran
Copy link
Member

swcurran commented Jul 6, 2023

@TimoGlastra — you had reviewed this previously. Could you take a look, please?

@dbluhm
Copy link
Member

dbluhm commented Jul 10, 2023

Requesting input from @usingtechnology and/or @andrewwhitehead; would like to see this one keep moving along.

@@ -294,6 +299,8 @@ async def resolve_invitation(
def _extract_key_material_in_base58_format(method: VerificationMethod) -> str:
if isinstance(method, Ed25519VerificationKey2018):
return method.material
elif isinstance(method, Ed25519VerificationKey2020):
return bytes_to_b58(multibase.decode(method.material))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also needs an "unwrap" on the material to remove the 0xed multicodec prefix added when using the publicKeyMultibase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually a little ambiguous in the DID Spec whether publicKeyMultibase also includes the multicodec prefix but in practice (in libraries like didcomm-python), it seems to be expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added support for both (with and without multicodec). Do you think it should be like that or should we support multibase keys only with multicodec?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the ambiguity, I think accepting either is probably a good choice for now at least.

Signed-off-by: Darko Kulic <darko.kulic@sicpa.com>
@sonarcloud
Copy link

sonarcloud bot commented Jul 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@swcurran swcurran merged commit 7f223e5 into hyperledger:main Jul 17, 2023
9 checks passed
@dkulic dkulic deleted the feat/Ed25519Signature2020 branch July 25, 2023 07:49
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

Successfully merging this pull request may close these issues.

5 participants