AES-GCM (Cấp độ API Android <= 19)
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
- Phiên bản bị ảnh hưởng
- Tink Android, Tất cả phiên bản
- Loại khoá bị ảnh hưởng
- AES-GCM
Nội dung mô tả
Trên Android KitKat (API cấp 19) không có Dịch vụ Google Play, AES-GCM
sẽ không hoạt động đúng cách. Điều này là do KitKat sử dụng Bouncy Castle 1.48, phiên bản này không hỗ trợ updateAAD
.
Nếu có Dịch vụ Google Play, AES-GCM
sẽ hoạt động tốt.
Nếu bạn muốn hỗ trợ tất cả các phiên bản Android mà không cần phụ thuộc vào Dịch vụ Google Play, hãy sử dụng CHACHA20-POLY1305
, AES-EAX
hoặc AES-CTR-HMAC-AEAD
cho AEAD của bạn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eAES-GCM encryption may not function correctly on Android KitKat (API level 19) devices without Google Play Services due to limitations in Bouncy Castle 1.48.\u003c/p\u003e\n"],["\u003cp\u003eIf Google Play Services is available on the device, AES-GCM encryption should operate as expected.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure compatibility across all Android versions without relying on Google Play Services, it is recommended to utilize CHACHA20-POLY1305, AES-EAX, or AES-CTR-HMAC-AEAD for authenticated encryption.\u003c/p\u003e\n"],["\u003cp\u003eThis issue impacts all versions of Tink for Android and specifically affects the AES-GCM key type.\u003c/p\u003e\n"]]],["Android KitKat without Google Play Services has a known issue where AES-GCM encryption does not function correctly due to an outdated Bouncy Castle version lacking `updateAAD` support. If Google Play Services is available, AES-GCM functions as expected. For universal Android support without Play Services dependency, utilize CHACHA20-POLY1305, AES-EAX, or AES-CTR-HMAC-AEAD instead of AES-GCM. This affects all versions of Tink Android.\n"],null,["# AES-GCM (Android API Level <= 19)\n\nAffected Versions\n: Tink Android, All Versions\n\nAffected Key Types\n: AES-GCM\n\nDescription\n-----------\n\nOn Android KitKat (API level 19) without [Google Play Services](https://developers.google.com/android/guides/overview), `AES-GCM`\ndoes not work properly. This is because KitKat uses Bouncy Castle 1.48 which\ndoes not support `updateAAD`.\n\nIf Google Play Services is present, `AES-GCM` should work well.\n\nIf you want to support all Android versions without depending on Google Play\nServices, use `CHACHA20-POLY1305`, `AES-EAX`, or `AES-CTR-HMAC-AEAD` for your\nAEAD."]]