Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
IPsec/IKEv2 Library
Stay organized with collections
Save and categorize content based on your preferences.
The IPsec/IKEv2 Library module provides a mechanism for negotiating security
parameters (keys, algorithms, tunnel configurations) for new and existing
Android features such as Interworking Wireless LAN (IWLAN) and VPNs. This module
is updatable, meaning it can receive updates to functionality outside of the
normal Android release cycle.
The IPsec/IKEv2 Library module provides the following benefits.
Support for IMS, IWLAN, and modernized VPNs. IP Multimedia Subsystem (IMS)
and IWLAN require IKEv2 to complete key exchanges securely and reliably. In
Android 11, the IPsec/IKEv2 Library module's IKEv2
negotiation library is the platform's default implementation of an IKEv2
client, supporting initial establishment, periodic re-key, dead peer
detection, and handoff. The module also enables deprecation and replacement of
the racoon-based IKEv1 VPN library used as the default built-in VPN client in
Android 10 and lower.
Ecosystem consistency. Using the IPsec/IKEv2 negotiation library as the
platform's default library encourages ecosystem-wide consistency, reduces
dependencies on closed source implementations, and improves maintainability
and updatability. Having a client-only implementation that works on top of
Android's IPsec API unlocks the power of Linux IPsec support without requiring
the elevated privileges needed by an IKEv2 daemon. The IKEv2 library is
written in Java to avoid security issues found in C or C++ implementations.
Quick fixes for security and interoperability issues. IPsec/IKEv2 is
security-critical code that supports VPNs in securing user data. Many clients
and servers implement IKEv2 protocol slightly differently, resulting in
potential interoperability issues between the IKEv2 library and other IKEv2
servers. Module updatability allows the Android team to respond to security
vulnerabilities quickly and to fix interoperability bugs quickly while
minimizing work for ecosystem partners.
Module boundary
The IPsec/IKEv2 Library module is in packages/modules/IPsec
.
The IPsec/IKEv2 Library module (com.android.ipsec
) is in
APEX format and is available for devices
running Android 11 or higher.
Customization
The IPsec/IKEv2 library module doesn't support customization.
Testing
The Android Compatibility Test Suite (CTS) verifies the IPsec/IKEv2
library module's functionality by running a comprehensive set of CTS
tests on every module release. You can also run IPsec/IKEv2 Library module unit
tests using the command atest FrameworksIkeTests
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# IPsec/IKEv2 Library\n\nThe IPsec/IKEv2 Library module provides a mechanism for negotiating security\nparameters (keys, algorithms, tunnel configurations) for new and existing\nAndroid features such as Interworking Wireless LAN (IWLAN) and VPNs. This module\nis updatable, meaning it can receive updates to functionality outside of the\nnormal Android release cycle.\n\nThe IPsec/IKEv2 Library module provides the following benefits.\n\n- **Support for IMS, IWLAN, and modernized VPNs.** IP Multimedia Subsystem (IMS)\n and IWLAN require IKEv2 to complete key exchanges securely and reliably. In\n Android 11, the IPsec/IKEv2 Library module's IKEv2\n negotiation library is the platform's default implementation of an IKEv2\n client, supporting initial establishment, periodic re-key, dead peer\n detection, and handoff. The module also enables deprecation and replacement of\n the racoon-based IKEv1 VPN library used as the default built-in VPN client in\n Android 10 and lower.\n\n- **Ecosystem consistency.** Using the IPsec/IKEv2 negotiation library as the\n platform's default library encourages ecosystem-wide consistency, reduces\n dependencies on closed source implementations, and improves maintainability\n and updatability. Having a client-only implementation that works on top of\n Android's IPsec API unlocks the power of Linux IPsec support without requiring\n the elevated privileges needed by an IKEv2 daemon. The IKEv2 library is\n written in Java to avoid security issues found in C or C++ implementations.\n\n- **Quick fixes for security and interoperability issues.** IPsec/IKEv2 is\n security-critical code that supports VPNs in securing user data. Many clients\n and servers implement IKEv2 protocol slightly differently, resulting in\n potential interoperability issues between the IKEv2 library and other IKEv2\n servers. Module updatability allows the Android team to respond to security\n vulnerabilities quickly and to fix interoperability bugs quickly while\n minimizing work for ecosystem partners.\n\nModule boundary\n---------------\n\nThe IPsec/IKEv2 Library module is in `packages/modules/IPsec`.\n\nModule format\n-------------\n\nThe IPsec/IKEv2 Library module (`com.android.ipsec`) is in\n[APEX](/docs/core/ota/apex) format and is available for devices\nrunning Android 11 or higher.\n\nCustomization\n-------------\n\nThe IPsec/IKEv2 library module doesn't support customization.\n\nTesting\n-------\n\nThe Android Compatibility Test Suite (CTS) verifies the IPsec/IKEv2\nlibrary module's functionality by running a comprehensive set of CTS\ntests on every module release. You can also run IPsec/IKEv2 Library module unit\ntests using the command `atest FrameworksIkeTests`."]]