Add BrowserEd25519 and BrowserX25519#211
Merged
terrier989 merged 1 commit intomasterfrom Nov 21, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds browser-based Web Cryptography API implementations for Ed25519 and X25519 algorithms with fallback to Dart implementations. It also refactors Ed25519 validation logic into static helper methods and reorganizes imports for consistency.
Key changes:
- Introduces
BrowserEd25519andBrowserX25519classes that leverage Web Cryptography API - Refactors Ed25519 validation into reusable static methods (
checkPrivateKeyLength,checkPublicKeyLength,checkSignatureLength) - Standardizes import ordering across browser implementation files
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cryptography/lib/src/browser/ed25519.dart | New BrowserEd25519 implementation with Web Crypto API support and fallback |
| cryptography/lib/src/browser/x25519.dart | New BrowserX25519 implementation with Web Crypto API support and fallback |
| cryptography/lib/src/dart/ed25519.dart | Refactored to use static validation methods from Ed25519 base class |
| cryptography/lib/src/browser/browser_cryptography.dart | Integrated new ed25519() and x25519() methods, reordered imports |
| cryptography/lib/src/browser/browser_cryptography_when_not_browser.dart | Reordered isRunningInWasm and isSupported getters |
| cryptography/lib/src/browser/rsa_ssa_pkcs1v15.dart | Standardized import ordering |
| cryptography/lib/src/browser/rsa_pss.dart | Standardized import ordering |
| cryptography/lib/src/browser/pbkdf2.dart | Standardized import ordering |
| cryptography/lib/src/browser/aes_gcm.dart | Standardized import ordering |
| cryptography/lib/src/browser/aes_ctr.dart | Standardized import ordering |
| cryptography/lib/src/browser/aes_cbc.dart | Standardized import ordering |
| cryptography/lib/src/browser/_javascript_bindings.dart | Added blank lines for better formatting in CryptoKey extension type |
| cryptography_test/lib/algorithms/ed25519.dart | Simplified test structure by removing anonymous function wrapper |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bfb58f1 to
313aae9
Compare
313aae9 to
1ff9595
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.