2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
Conscrypt
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Conscrypt モジュールは、OTA アップデートに依存することなく、セキュリティの向上を加速し、デバイスの保護を強化します。Java コードとネイティブ ライブラリを使用して、Android TLS の実装とほとんどの Android 暗号機能(キー ジェネレーター、暗号、メッセージ ダイジェストなど)を提供します。Conscrypt はオープンソース ライブラリとして利用できますが、Android プラットフォームに含める場合は、特別な仕様がいくつかあります。
Conscrypt モジュールは、BoringSSL を使用します。BoringSSL は Google が OpenSSL からフォークしたネイティブ ライブラリであり、Conscrypt コード(Java とネイティブ コードの両方)と組み合わせて、多くの Google プロダクト(特に Google Chrome)で暗号化と TLS に使用されています。BoringSSL には公式リリースがなく、すべてのユーザーはゼロから構築する必要があります。また、API または ABI の安定性を保証するものではありません。
Android 15 の変更点
Android 15 では、TLS バージョン 1.0 および 1.1 の使用が制限されています。これまではこれらのバージョンは Android で非推奨でしたが、現在は Android 15 をターゲットとするアプリで許可されないようになりました。
Android 14 の変更点
Android 14 は、Conscrypt 内に更新可能なルート トラストストアを導入しています。CA 証明書(証明書)が Android 内およびインターネット全体で使用される公開鍵のルート オブ トラストとなります。これらの証明書は、暗号化の署名が適正かどうかが定期的にチェックされるため、証明書を利用するすべてのデバイスに提供し、保存する必要があります。
Mainline より前の Android は、システム パーティション(system/ca-certificates
)に証明書を保存し、Android がリリースされるたびに更新していました。Mainline では、Mainline トレインのアップデートを使用してより頻繁に証明書を更新できるようになりました。この新機能の導入により更新プロセスが効率化されることから、問題への対応に要する時間をさらに短縮でき、デバイスをより長く利用することが可能となります。
Android 14 より、ルートトラスト証明書は Conscrypt モジュールの APEX とシステム パーティションに保存されます。なお、アプリは引き続き独自の証明書を選択でき、NetworkSecurityConfig
を使用して証明書の動作を変更できます。
Android 14 でのその他の Conscrypt モジュールの変更点は次のとおりです。
- MAC 実装 AES-CMAC が追加されました。
- MAC 実装「PBEwithHmacSHA2-*」のサポートが終了し、削除されました。
- X25519 鍵、鍵合意、署名の限定的サポートが追加されました。
- X.509 の正確性に合わせて BoringSSL が更新されました。
- 一般公開の CertPath API における MD5 署名の証明書サポートが廃止されました。API レベル 16 以降、TLS 接続でこのような証明書は承認されません。
Android 10 の変更点
Android 9 には、Conscrypt 用の Android 固有の公開 API は含まれていません。代わりにセキュリティ プロバイダを使用して、Cipher や MessageDigest などの Java 暗号化アーキテクチャ(JCA)と、SLSocket や SSLEngine などの Java Secure Socket Extension(JSSE)用の標準クラスを実装します。ユーザーがこれらのクラスを操作し、libcore
またはフレームワーク コードが一部の非公開の Conscrypt API を使用します。
Android 10 では、少数の公開 API メソッドが android.net.ssl
に追加され、javax.net.ssl
の下のクラスが非公開の Conscrypt 機能にアクセスできるようになりました。さらに、Android 10 には、軽量版の Bouncy Castle が含まれています。Bouncy Castle は、Android ランタイムの一部である、あまり知られていない暗号ツールを提供します(Conscrypt モジュールには含まれていません)。
Conscrypt モジュール(com.android.conscrypt
)は、Conscrypt Java コードと、Android NDK ライブラリ(liblog
など)に動的にリンクする Conscrypt ネイティブ ライブラリを含む APEX ファイルとして配布されます。ネイティブ ライブラリには、NIST の暗号モジュール検証プログラム(CMVP)で検証済み(認証番号 3753)の BoringSSL のコピーも含まれています。
Conscrypt モジュールが公開している API は以下のとおりです。
- 公開 API は、
java.*
と javax.*
の下のパッケージに含まれるクラスおよびインターフェースと、android.net.ssl.*
の下にあるクラスの拡張です。外部アプリコードは Conscrypt を直接呼び出しません。これらの API は、Platform API 規格により下位互換性と上位互換性が保証されています。
- コア プラットフォーム API は、フレームワークが非公開の機能にアクセスするために使用する非公開 API です。これらの API は、比較的使用が制限されています。この API をよく使用するのは
NetworkSecurityConfig
で、Conscrypt トラスト マネージャー(証明書を検証するコンポーネント)を拡張してネットワーク セキュリティ構成機能を実装します。
- コア内 API は、JCA および JSEE 機構によってリフレクティブに呼び出される引数なしのコンストラクタに使用が制限されています。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Conscrypt\n\nThe Conscrypt module accelerates security improvements and improves device\nsecurity without relying on OTA updates. It uses Java code and a native\nlibrary to provide the Android TLS implementation as well as a large portion\nof Android cryptographic functionality such as key generators, ciphers, and\nmessage digests. Conscrypt is available as an\n[open source\nlibrary](https://github.com/google/conscrypt), though it has some specializations when included in the Android\nplatform.\n\n\nThe Conscrypt module uses\n[BoringSSL](https://boringssl.googlesource.com/boringssl/),\na native library that is a Google fork of OpenSSL and which is used in many\nGoogle products for cryptography and TLS (most notably Google Chrome), in conjunction with\nConscrypt code (both Java and native code). BoringSSL doesn't have official releases (all users\nbuild from head) and makes no guarantees around API or ABI stability.\n\nChanges in Android 15\n---------------------\n\n\nAndroid 15 restricts the usage of TLS versions 1.0 and 1.1. These versions\nhad previously been deprecated in Android, but are now disallowed for apps targeting Android\n15.\n\nChanges in Android 14\n---------------------\n\n\nAndroid 14 introduces an updatable root trust store within Conscrypt. CA\ncertificates (or certs) provide the roots of trust for public keys used within Android and the\ninternet at large. These certificates are routinely checked to ensure proper cryptographic signing,\nso they must be provided and stored on all devices that rely on them.\n\n\nPrior to Mainline, Android stored certificates in the system partition (in\n`system/ca-certificates`) and updated them with every Android release. Now with Mainline,\nit's possible to update certificates more frequently using Mainline train updates. This new\ncapability should streamline updating processes, allow us to have faster turnaround times for\nissues, and help to extend device lifetimes.\n\n\nStarting in Android 14, root trust certificates are stored in the Conscrypt\nmodule APEX and the system partition. Apps can still choose their own certificates and modify\ncertificate behavior using `NetworkSecurityConfig`.\n\nAndroid 14 includes these other Conscrypt module changes:\n\n- Added AES-CMAC MAC implementation.\n- Deprecated and removed \\`PBEwithHmacSHA2-\\*\\` MAC implementations.\n- Added limited support for X25519 keys, key agreements, and signatures.\n- Updated BoringSSL for X.509 correctness.\n- Dropped support for MD5-signed certificates in the public CertPath APIs. Such certificates haven't been accepted for TLS connections since API level 16.\n\nChanges in Android 10\n---------------------\n\n\nAndroid 9 doesn't include an Android-specific public API for Conscrypt but\ninstead uses a security provider that implements standard classes for Java\nCryptography Architecture (JCA) including Cipher and MessageDigest, and\nJava Secure Socket Extension (JSSE), including SSLSocket and SSLEngine.\nUsers interact with those classes and some nonpublic Conscrypt APIs are used\nby `libcore` or frameworks code.\n\n\nAndroid 10 adds a small number of public API methods\nin `android.net.ssl` to access Conscrypt functionality that isn't\nexposed by the classes under `javax.net.ssl`. Android\n10 also includes a slimmed copy of\n[Bouncy Castle](https://en.wikipedia.org/wiki/Bouncy_Castle_(cryptography)) to provide lower-popularity cryptographic\ntools as part of Android Runtime (not included in the Conscrypt module).\n\nFormat and dependencies\n-----------------------\n\nThe Conscrypt module (`com.android.conscrypt`) is distributed as an [APEX](/docs/core/ota/apex) file that\nincludes the Conscrypt Java code and a Conscrypt native library that dynamically\nlinks to Android NDK libraries (such as `liblog`). The native library\nalso includes a copy of BoringSSL that has has been validated ([Certificate #3753](https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/3753)) through NIST's [Cryptographic Module Validation Program (CMVP)](https://csrc.nist.gov/projects/cryptographic-module-validation-program).\n| **Note:** The Conscrypt module includes [/external/conscrypt](https://android.googlesource.com/platform/external/conscrypt/) and [/external/boringssl](https://android.googlesource.com/platform/external/boringssl/), but doesn't include `/external/bouncycastle`.\n\n\nThe Conscrypt module exposes the following APIs:\n\n- **Public APIs** are extensions of classes and interfaces in packages under `java.*` and `javax.*`, plus classes under `android.net.ssl.*`. External app code doesn't call Conscrypt directly. Platform API standards ensure that these APIs remain backward- and forward-compatible.\n- **Core platform APIs** are hidden APIs used by the framework to access nonpublic functionality. These are relatively limited; the largest user is `NetworkSecurityConfig`, which extends the Conscrypt trust manager (the component that verifies certificates) to implement the [network security configuration feature](https://developer.android.com/training/articles/security-config).\n- **Intra-core APIs** are limited to zero-argument constructors called reflectively by the JCA and JSEE machinery."]]