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

FF129 SubtleCrypto - support for Ed25519 #34989

Merged
merged 34 commits into from
Aug 6, 2024

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Jul 23, 2024

FF129 adds support for the Ed25519 signing algorithm in https://bugzilla.mozilla.org/show_bug.cgi?id=1804788. There is a bit a background on these here: https://github.com/tQsW/webcrypto-curve25519/blob/master/explainer.md#support-curve25519-in-the-web-cryptography-api

This adds docs where appropriate - i.e. where the two algorithms are used. There is a generate keys/sign/verify live example for Ed25519 created in SubtleCrypto.sign() that I also link from verify().

There is also support for the key agreement algorithm X25519 in chrome behind a flag, and likely to come in FF nightly next month. I did not do examples for X25519 yet, but plan for that when it appears in FF nightly.
I did however mention the algorithm in the syntax where it can be used.

I also tidied the top level Web API overview. More work could be done here and in SubtleCrypto to make more consistent, but not in this update.

Fixes #30886

Related docs work can be tracked in #34708

Copy link
Contributor

github-actions bot commented Jul 23, 2024

Preview URLs (10 pages)
External URLs (12)

URL: /en-US/docs/Web/API/SubtleCrypto/generateKey
Title: SubtleCrypto: generateKey() method


URL: /en-US/docs/Web/API/SubtleCrypto/deriveKey
Title: SubtleCrypto: deriveKey() method


URL: /en-US/docs/Web/API/SubtleCrypto/sign
Title: SubtleCrypto: sign() method

(comment last updated: 2024-08-06 01:32:06)

@hamishwillee hamishwillee changed the title FF129 SubtlCrypto - support for Ed25519 FF129 SubtleCrypto - support for Ed25519 Jul 23, 2024
@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Jul 25, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Jul 26, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Jul 29, 2024
@hamishwillee hamishwillee marked this pull request as ready for review July 29, 2024 05:42
@hamishwillee hamishwillee requested a review from a team as a code owner July 29, 2024 05:42
@hamishwillee hamishwillee requested review from wbamberg and removed request for a team July 29, 2024 05:42
hamishwillee and others added 5 commits July 30, 2024 10:13
- update table of supported algos
- Tidy up the algorithms to be a bit more monolithic and cross link
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Aug 4, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

1 similar comment
Copy link
Contributor

github-actions bot commented Aug 4, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@hamishwillee
Copy link
Collaborator Author

@wbamberg Thanks for your additional review. All accepted and or/integrated. I left the ones you might want to discuss unresolved. But I very much hope this is good.

On the plus side, the X25519 is in FF130 which I have assigned myself. But the changes for that should just be a small example now plus anything that we leave hanging out of this.

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

Thanks for the update! I just had a bit more picking over of "supported algorithms" for sign().

files/en-us/web/api/subtlecrypto/sign/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/subtlecrypto/sign/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/subtlecrypto/sign/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/subtlecrypto/sign/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/subtlecrypto/sign/index.md Outdated Show resolved Hide resolved
@hamishwillee
Copy link
Collaborator Author

Reading the spec and finding out new things. Where will it lead. All changes accepted.

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

👍 thank you for your continued patience, Hamish!

@wbamberg wbamberg merged commit 223d903 into mdn:main Aug 6, 2024
8 checks passed
@hamishwillee
Copy link
Collaborator Author

👍 thank you for you continued patience, Hamish!

@wbamberg I was going to say the same thing. Your feedback makes me feel "a bit too" sloppy.

@hamishwillee hamishwillee deleted the ff129subtlcrypto_Ed25519 branch August 6, 2024 03:03

### HMAC

The HMAC algorithm calculates and verifies hash-based message authentication codes according to the
[FIPS 198-1 standard](https://csrc.nist.gov/files/pubs/fips/198-1/final/docs/fips-198-1_final.pdf).
The HMAC algorithm calculates and verifies hash-based message authentication codes according to the [FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).
Copy link
Member

Choose a reason for hiding this comment

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

@hamishwillee This PDF link gets redirected so I replaced it in #35222, but it got reverted in this PR. Was it for any particular reason?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. I've been working in this issue for weeks and didn't see a conflict or I would have taken your change.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see. I assumed so too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Josh-Cena Cool. Did you re-revert it, or is that a job on me?

Copy link
Member

Choose a reason for hiding this comment

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

I already fixed this in another redirected link fix PR ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SubtleCrypto: sign() method missing Ed25519 in Supported algorithms
4 participants