Port pluggable cryptography and re-wire current cryptography as default
@gkc đang làm issue này rồi.
Từ ngày 1/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem? Please describe.
The current cyrptography is hard coded in SelfKeyCommands, SharedKeyCommands, PublicKeyCommands and both of AtClientImpl's notification handlers. An application cannot supply a different scheme.
NOTE: Metadata.AppMetadata — the field that would carry the cryptography scheme / provider — already exists on trunk but nothing in the repo reads or writes it.
Describe the solution you'd like
A new interface CryptographyProvider which defines 2 methods encrypt/decrypt. This is mirrors CryptoProvider in Dart.
The existing cryptography is moved into an implementation LegacyCryptographyProvider. This mirrors LegacyCryptoProvider in Dart.
RuntimeCryptographyProvider is a implementation with a map of registered implementations keyed by provider ids. It's encrypt/decrypt implementation will delegate to a registered implementation based on the key Metadata.AppMetadata. Where this is not set it will default.
AtClientImpl and the static command method it invokes to execute at server commands will be modified to invoke a CryptographyProvider.
AtClients builder will be modified to pass a RuntimeCryptographyProvider, with LegacyCryptoProvider as the default, to the AtClientImpl it constructs.
Dart mapping
| Dart | Java |
|---|---|
CryptoProvider (crypto.dart) |
CryptographyProvider (api) |
CryptoProvider.id |
dropped — the id is the registry key, not provider behaviour |
CryptoContext {atClient, atKeysIo} (crypto.dart) |
dropped — (AtCommandExecutor, AtCommandExecutorContext) |
CryptoConfig {defaultProviderId, providers, lookup} (crypto.dart) |
dropped — RuntimeCryptographyProvider's builder |
CryptoConfig.lookup(id) linear scan over a List |
Map<CryptographyProviderId, CryptographyProvider> |
legacyCryptoProviderId = 'legacy' (crypto.dart) |
CryptographyProviderId.LEGACY — same wire literal |
CryptoRuntime (crypto_runtime.dart) |
RuntimeCryptographyProvider (impl.crypto) |
encryptForPut / encryptForNotification |
CryptographyProvider.encrypt |
decryptForGet / decryptForNotification / decryptForSyncConflict |
CryptographyProvider.decrypt |
LegacyCryptoProvider (legacy/legacy_crypto_provider.dart) |
LegacyCryptographyProvider (impl.crypto) |
LegacyEncryption.build / LegacyDecryption.build runtime key sniffing |
private methods per Keys.AtKey subtype |
SelfKeyEncryption / SelfKeyDecryption |
encryptSelfKey / decryptSelfKey |
SharedKeyEncryption / SharedByMeDecryption / SharedWithMeDecryption |
encryptSharedKey / decryptSharedKey |
AbstractAtKeyEncryption (shared-key management) |
the shared-key helpers inside LegacyCryptographyProvider |
AppMetadata.providerId (String, at_commons) |
Metadata.AppMetadata.providerId typed as CryptographyProviderId |
Describe alternatives you've considered
like for like mapping
Additional context
No response
- Ngôn ngữ chính
- Java
- Star
- 2
- Fork
- 19
- Merge trung bình
- 23 giờ 2 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của atsign-foundation/at_java
-
Port Dart's typed atKeys key material to at_java, with Dart-interoperable JSONCó thể làm lại được @gkc đã nhận 28 ngày trước và không có pull request nào đang mở. Đang mởenhancement
atsign-foundation/at_java#425 · 1 người được giao ·
-
Generate a SBOM and SLSA attestations during the release workflowCó thể làm lại được @cpswan đã nhận 183 ngày trước và không có pull request nào đang mở. Đang mởenhancement
atsign-foundation/at_java#383 · 3 bình luận · 2 người được giao ·
-
Enhance Activate utility such that it has feature parity with dart activate_cliCó thể làm lại được @akafredperry đã nhận 244 ngày trước và không có pull request nào đang mở. Đang mởenhancement
atsign-foundation/at_java#338 · 1 người được giao ·
-
Should Activate utility be migrated to an AtActivationClient interface and implementation in the api package?Có thể làm lại được @akafredperry đã nhận 245 ngày trước và không có pull request nào đang mở. Đang mởenhancement
atsign-foundation/at_java#334 · 1 người được giao ·
-
Introduce a protocol package and migrate all code that builds at protocol commands and interprets at protocol responses and notificationsCó thể làm lại được @akafredperry đã nhận 245 ngày trước và không có pull request nào đang mở. Đang mởenhancement
atsign-foundation/at_java#335 · 2 bình luận · 1 người được giao ·
Tất cả issue của atsign-foundation/at_java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
RunestoneInteractive/rs#1559 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
inu-appcenter/memorIN-backend#298 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
opendataloader-project/opendataloader-pdf#757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redhat-developer/intellij-quarkus#1626 ·