5. Methodology
As NIST continues to standardize PQC, the expectation is that this technology will experience a rapid acceleration of its integration into a wide variety of existing and future software and infrastructure projects in an effort to maintain a high level of security and privacy protections. To aid in this effort, the open-source community started a new project called "Open Quantum Safe" (OQS). OQS’ efforts focus on creating and maintaining a free implementation of PQC algorithms in the form of "liboqs", as well as integrations of this capability into common providers and architectures, such as OpenSSL [
40], BoringSSL [
41], and more. Specifically, enabling the OQS extension for OpenSSL allows for a more straightforward approach to testing and research of these algorithms in lab and production systems before, during, and after their standardization by NIST. The specific repository used in this research, oqs-provider, lists its included PQC KEM and Signature algorithms. A list of these KEM and Signature Algorithm groups is shown in
Table 2.
Specifically, the main focus of testing is put on CRYSTALS-Kyber, as it is the main KEM that is being considered for standardization by NIST. The full list of KYBER PQC and Hybrid (a combination of traditional methods with PQC) KEMs included in oqs-provider is detailed in
Table 3.
The full incorporation of PQC into a 5G CN does require careful consideration of understanding the components and interfaces that require changes. If there are any missed in the process, essential CN functions will no longer work, causing fatal system errors.
The process outlined in
Figure 3 details the high-level steps taken to add PQC into a 5G CN. This methodology can also be used as a roadmap to incorporate PQC into other 5G systems, as the underlying structure of different CNs is comparable in accordance with 3GPP standards.
In order to utilize oqs-provider, it needs to be compiled from source, which ultimately generates the necessary shared library file that OpenSSL utilizes to incorporate the PQC KEMs and Signature algorithms. In Listing 1 in
Appendix A, we are demonstrating the instructions for this procedure that we have incorporated inside each of the Dockerfiles associated with all the NFs included in free5GC.
To fully enable the features provided by this extension in a variety of environments, OQS provides detailed instructions in their documentation as well. For the purpose of this research, the CRYSTALS-Kyber KEMs were activated at the system level by adding their values to the ’openssl.cnf’ configuration file.
Figure 4 shows the lines that were added or updated in order to enable OQS.
The free5GC project is a free and open-source 5G CN that is currently compliant with 3GPP Release 15, with ongoing development aiming at compliance with 3GPP Release 17 [
42]. In our research, we cloned the original free5GC repositories and subsequently modified them to incorporate PQC capabilities using oqs-provider. Free5GC has a "docker-compose" deployment method that allows for seamless integration and use with systems that support Docker.
Figure 5 illustrates the Docker images that are running after updating the free5GC codebase to allow PQC.
In our custom implementation of free5GC, each VNF container is running a lightweight version of Ubuntu 22.04 Jammy with OpenSSL v3.0.2 installed. After compiling oqs-provider from source for the respective platform, the resulting shared library file is installed in each VNF Docker container, enabling PQC integration at a system level.
Additionally, some modifications to the source of free5GC are necessary in order to utilize OpenSSL. Virtually all aspects of free5GC are written in GoLang [
43], which lacks direct native support for using OpenSSL. A Go program traditionally uses Go’s own TLS and Crypto libraries to handle TLS communications [
44]. To address this challenge, we selected the open-source Go-Openssl wrapper from ’pexip’ [
45] and incorporated it within each VNF to enable the use of OpenSSL for cryptography within free5GC rather than Go’s crypto library. At the time of publication of this paper, the custom CN implementation is built using free5GC v3.4.2. The integration of Go-Openssl focuses on two main areas within each VNF in free5GC’s source code: server.go and the OpenAPI system. Within server.go, the network function is typically utilized to create a TCP listener, which subsequently utilizes the Go TLS to secure the HTTP connection on the server side. Listing 2 in
Appendix A shows a code snippet of the two functions that are amended within the code base, in this specific case for 5G’s the "Access and Mobility Management Function" (AMF) VNF. In our PQC-enabled implementation, if encryption (https) is enabled in free5GC’s YAML configuration file, then an OpenSSL-enabled listener is created within the ’NewServer’ function. The newly created server uses the OpenSSL context that is stored in the server struct from the logic in the NewServer function. The built-in functions are used to obtain the path to the certificates used for context creation, and certificate verification is set to "none" for testing purposes.
Next, our focus was on enabling each of the HTTPS clients used throughout free5GC for API calls to similarly be enabled for OpenSSL usage. This process was not as straightforward as the corresponding server-side effort. Free5GC utilizes an OpenAPI-driven approach to API implementation and handling of client HTTP requests. Analyzing the call flow across multiple different files that include client attributes revealed that, ultimately, they all utilize a call to the CallAPI() function within the free5GC OpenAPI repository, which is located in the client.go file. In this function, an OpenSSL context is created using two specific functions: CreateOpenSSLClientCtx() and GetCurrentNetworkFunctionUsingAPI(). The OpenSSL context is managed in the same manner as the server. However, in the case of a client, there are no built-in functions to obtain the path to the client certificates. Client certificates are not strictly required for TLS connectivity. However, they are needed when mutual TLS authentication (mTLS) is desired, which can provide a significant improvement in security between both client and server. Thus, GetCurrentNetworkFunctionUsingAPI() obtains the specific network function that is making a request by parsing the stack trace. Returned from this function is effectively the name of the VNF making the HTTP request, which is appended to the path where the certificates are stored inside the Docker containers. In either scenario, if the configuration includes a custom HTTPClient setup requirement, a custom client transport method that includes OpenSSL support is added. The logic sequence for this process is shown in CreateOpenSSLInnerClientTransport(). The dialTLS function that handles the transport protocols for an HTTP client in Go is overridden to use the OpenSSL dial wrapper. The request is then made using the OpenSSL-enabled dialTLS() function during the invocation of the Do() method. This process is shown in the code Listing 3 contained in
Appendix A.
One major goal of this customization was to make it as seamless as possible for a free5GC administrator to install and operate it with support for PQC. With the extensible nature of Docker, this goal was met while maintaining the same basic structure for downloading and installing our PQC-enabled free5GC build. The user only needs to run one additional command to install MongoDB from source, which, for convenience, has been incorporated into a single shell script. The steps to clone, build, install, and run PQC-enabled free5GC that are used by this script are also shown in
Appendix A in Listing 4.
Once we established a full integration of PQC into all HTTPS REST API endpoints (server code) and all corresponding client calls to these APIs, we could proceed to collect results that demonstrate the feasibility of this integration of PQC into free5GC operations and also quantify the impact on latency and bandwidth usage, which are shown and discussed in the next section.