From 37883338c42867a110c8daa00d4843a48a0e2eb4 Mon Sep 17 00:00:00 2001 From: terrier989 Date: Fri, 21 Nov 2025 23:11:46 +0000 Subject: [PATCH] chore: cryptography v2.9.0 --- cryptography/CHANGELOG.md | 5 +++++ cryptography/README.md | 5 +---- .../browser_cryptography_when_not_browser.dart | 2 ++ cryptography/pubspec.yaml | 2 +- cryptography_flutter/README.md | 11 +++++------ cryptography_flutter/pubspec.yaml | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cryptography/CHANGELOG.md b/cryptography/CHANGELOG.md index fde3602..2020afd 100644 --- a/cryptography/CHANGELOG.md +++ b/cryptography/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.9.0 +* Adds support for Web Crypto Ed25519 signatures. +* Adds support for Web Crypto X25519 key exchange. +* Bug fixes and refactoring. + ## 2.8.1 * Bug fixes. diff --git a/cryptography/README.md b/cryptography/README.md index 4f9a7b6..6121312 100644 --- a/cryptography/README.md +++ b/cryptography/README.md @@ -46,7 +46,7 @@ Android / iOS / Mac OS X operating system APIs whenever possible. In _pubspec.yaml_: ```yaml dependencies: - cryptography: ^2.8.1 + cryptography: ^2.9.0 # If you are writing a Flutter app/package, also add this: cryptography_flutter: ^2.3.4 @@ -144,8 +144,6 @@ implementations are available: * [Ed25519](https://pub.dev/documentation/cryptography/latest/cryptography/Ed25519-class.html) ( curve25519 EdDSA) - * Performance of the pure Dart implementation is around 200 (signatures or verifications) per - second in VM and about 50 in browsers. * Elliptic curves approved by NIST * [Ecdsa.p256](https://pub.dev/documentation/cryptography/latest/cryptography/Ecdsa/Ecdsa.p256.html) ( ECDSA P256 / secp256r1 / prime256v1 + SHA256) @@ -176,7 +174,6 @@ implementations are available: * We don't have implementations of these in pure Dart. * [X25519](https://pub.dev/documentation/cryptography/latest/cryptography/X25519-class.html) ( curve25519 Diffie-Hellman) - * Throughput of the pure Dart implementation is around 1000 key agreements per second (in VM). ### Key derivation / password hashing algorithms diff --git a/cryptography/lib/src/browser/browser_cryptography_when_not_browser.dart b/cryptography/lib/src/browser/browser_cryptography_when_not_browser.dart index ac291dd..13eb2e3 100644 --- a/cryptography/lib/src/browser/browser_cryptography_when_not_browser.dart +++ b/cryptography/lib/src/browser/browser_cryptography_when_not_browser.dart @@ -39,6 +39,7 @@ import 'package:meta/meta.dart'; /// * [Ecdh] /// * [Ecdsa] /// * Only when `hash` is [Sha256], [Sha384], or [Sha512]. +/// * [Ed25519] /// * [Hkdf] /// * Only when `hmac` is [Hmac.sha256], [Hmac.sha384], or [Hmac.sha512]. /// * [Hmac] @@ -50,6 +51,7 @@ import 'package:meta/meta.dart'; /// * [Sha256] /// * [Sha384] /// * [Sha512] +/// * [X25519] /// /// The class extends [DartCryptography] so other factory methods will return /// pure Dart implementations. diff --git a/cryptography/pubspec.yaml b/cryptography/pubspec.yaml index 0a97c83..d344a1b 100644 --- a/cryptography/pubspec.yaml +++ b/cryptography/pubspec.yaml @@ -1,5 +1,5 @@ name: cryptography -version: 2.8.1 +version: 2.9.0 homepage: https://github.com/dint-dev/cryptography description: Cryptographic algorithms for encryption, digital signatures, key agreement, authentication, and diff --git a/cryptography_flutter/README.md b/cryptography_flutter/README.md index bbbfb07..7301c8b 100644 --- a/cryptography_flutter/README.md +++ b/cryptography_flutter/README.md @@ -11,15 +11,14 @@ Maintained by [terrier989](https://github.com/terrier989). Licensed under the [Apache License 2.0](LICENSE). ## Trade-offs of using operating system APIs -### Pros +### Advantages * __Compliant__. * Operating system implementations of algorithms are often compliant with various compliance requirements (such as FIPS 140-2). -* __Speed__. - * For some algorithms, operating system implementations are up to 100 times faster than pure Dart - implementations. +* __Performance__. + * Some operating system implementations are much faster than pure Dart implementations. -### Cons +### Disadvantages * __Easier to inspect__ * If someone reverse engineers you application, it may be easier to inspect operating system calls than pure Dart implementations provided by @@ -57,7 +56,7 @@ In _pubspec.yaml_: ```yaml dependencies: - cryptography: ^2.8.1g + cryptography: ^2.9.0 cryptography_flutter: ^2.3.4 ``` diff --git a/cryptography_flutter/pubspec.yaml b/cryptography_flutter/pubspec.yaml index 297ce82..43831cf 100644 --- a/cryptography_flutter/pubspec.yaml +++ b/cryptography_flutter/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # # Packages by github.com/dint-dev: # - cryptography: ^2.8.1 + cryptography: ^2.9.0 flutter: sdk: flutter