AES-GCM (Level API Android <= 19)
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
- Versi yang Terpengaruh
- Tink Android, Semua Versi
- Jenis Kunci yang Terpengaruh
- AES-GCM
Deskripsi
Di Android KitKat (API level 19) tanpa Layanan Google Play, AES-GCM
tidak berfungsi dengan benar. Hal ini karena KitKat menggunakan Bouncy Castle 1.48 yang
tidak mendukung updateAAD
.
Jika Layanan Google Play ada, AES-GCM
akan berfungsi dengan baik.
Jika Anda ingin mendukung semua versi Android tanpa bergantung pada Layanan Google
Play, gunakan CHACHA20-POLY1305
, AES-EAX
, atau AES-CTR-HMAC-AEAD
untuk
AEAD Anda.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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."]]