We promise you're enjoying the foremost developer preview of Android P. We wanted to specifically telephone phone out about backward-incompatible changes nosotros innovation to brand to the cryptographic capabilities inwards Android P, which you lot tin run across inwards the developer preview.
Changes to providers
Starting inwards Android P, nosotros innovation to deprecate about functionality from the BC provider that's duplicated past times the AndroidOpenSSL (also known every bit Conscrypt) provider. This volition simply impact applications that specify the BC provider explicitly when calling getInstance()
methods. To endure clear, nosotros aren't doing this because nosotros are concerned most the safety of the implementations from the BC provider, rather because having duplicated functionality imposes additional costs too risks piece non providing much benefit.
If you lot don't specify a provider inwards your getInstance()
calls, no changes are required.
If you lot specify the provider past times mention or past times instance—for example, Cipher.getInstance("AES/CBC/PKCS7PADDING", "BC")
or Cipher.getInstance("AES/CBC/PKCS7PADDING", Security.getProvider("BC"))
—the take you lot arrive Android P volition depend on what API score your application targets. For apps targeting an API score earlier P, the telephone phone volition render the BC implementation too log a alert inwards the application log. For apps targeting Android P or later, the telephone phone volition throw NoSuchAlgorithmException
.
To resolve this, you lot should halt specifying a provider too utilisation the default implementation.
In a after Android release, nosotros innovation to withdraw the deprecated functionality from the BC provider entirely. Once removed, whatever telephone phone that requests that functionality from the BC provider (whether past times mention or instance) volition throw NoSuchAlgorithmException
.
Removal of the Crypto provider
In a previous post, nosotros announced that the Crypto provider was deprecated kickoff inwards Android Nougat. Since then, whatever asking for the Crypto provider past times an application targeting API 23 (Marshmallow) or earlier would succeed, but requests past times applications targeting API 24 (Nougat) or after would fail. In Android P, nosotros innovation to withdraw the Crypto provider entirely. Once removed, whatever telephone phone to SecureRandom.getInstance("SHA1PRNG", "Crypto")
volition throw NoSuchProviderException
. Please ensure your apps convey been updated.