Skip to content

Validate JWK usage metadata across backends - #308

Open
harrshita123 wants to merge 1 commit into
google:masterfrom
harrshita123:codex/fix-aes-ctr-large-chunks
Open

harrshita123 wants to merge 1 commit into
google:masterfrom
harrshita123:codex/fix-aes-ctr-large-chunks

Conversation

@harrshita123

@harrshita123 harrshita123 commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #58.

Summary

  • reject JWKs whose use conflicts with key_ops across native and browser imports
  • validate use against the imported algorithm before omitting it for browser WebCrypto compatibility
  • accept deriveKey and deriveBits with use: "enc" for ECDH keys
  • register regression tests covering valid and conflicting JWK metadata

Testing

  • dart format --output none --set-exit-if-changed lib/src/impl_js/impl_js.ecdh.dart lib/src/impl_js/impl_js.utils.dart lib/src/jsonwebkey.dart lib/src/testing/regression/jwk_use_key_ops_conflict.dart lib/src/testing/testing.dart
  • dart analyze
  • dart test -p vm test/webcrypto_test.dart --name 'ECDH .* JWK|AES-GCM JWK|JsonWebKey:'
  • dart test -p chrome test/webcrypto_test.dart --name 'ECDH .* JWK|AES-GCM JWK|JsonWebKey:'

@harrshita123
harrshita123 force-pushed the codex/fix-aes-ctr-large-chunks branch from 79836c8 to b4264e2 Compare July 5, 2026 16:38
@harrshita123
harrshita123 deleted the codex/fix-aes-ctr-large-chunks branch July 5, 2026 16:40
@harrshita123
harrshita123 restored the codex/fix-aes-ctr-large-chunks branch July 5, 2026 16:49
@harrshita123 harrshita123 reopened this Jul 5, 2026
@harrshita123
harrshita123 deleted the codex/fix-aes-ctr-large-chunks branch July 5, 2026 16:59
@harrshita123
harrshita123 restored the codex/fix-aes-ctr-large-chunks branch October 17, 2026 16:18
@harrshita123 harrshita123 changed the title Fix AES-CTR large chunk handling Validate JWK usage metadata across backends Oct 19, 2026
@harrshita123 harrshita123 reopened this Oct 19, 2026
@harrshita123
harrshita123 force-pushed the codex/fix-aes-ctr-large-chunks branch from b4264e2 to b4ec7c5 Compare October 19, 2026 05:46

This branch has not been deployed

No deployments
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.

1 participant