Project

General

Profile

Actions

Feature #22068

open

Adding post-quantum cryptography (PQC) support across Ruby standard libraries

Feature #22068: Adding post-quantum cryptography (PQC) support across Ruby standard libraries
1

Added by jaruga (Jun Aruga) 6 days ago. Updated 4 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:125491]

Description

Summary and motivation

Post-quantum cryptography (PQC) means cryptography algorithm which people can safely use after (post) quantum computing is practically used in the future. By using the quantum computing which is much more powerful than the current computing, it can be possible to crack the current non-PQC algorithms.

The goal of this ticket is to make Ruby (including libraries: default gems + bundle gems) work in the environment where only post-quantum cryptography (PQC)-supported algorithms are enabled. PQC-supported algorithms are only ML-DSA, ML-KEM and SLH-DSA for now. ML-DSA is used for signature (certification), and ML-KEM is used for connection. As I heard from my colleagues working for OpenSSL, that SLH-DSA is not ready to be used, we can ignore SLH-DSA for now.

Ruby OpenSSL (ruby/openssl) already supports PQC by the ticket ruby/openssl#894. And there are some works are needed for other standard libraries using Ruby OpenSSL in Ruby to support PQC.

I cite the following text from the NIST's PQC document. NIST is an organization defining cryptographic standards.

Some engineers even predict that within the next twenty or so years sufficiently large quantum computers will be built to break essentially all public key schemes currently in use. Historically, it has taken almost two decades to deploy our modern public key cryptography infrastructure. Therefore, regardless of whether we can estimate the exact time of the arrival of the quantum computing era, we must begin now to prepare our information security systems to be able to resist quantum computing.

I also cite the following text from DigiCert, a security company's blog. (link)

Gartner predicts that by 2029, conventional asymmetric cryptography like RSA and ECC will be unsafe for protecting sensitive data due to “harvest-now, decrypt-later" threats—even before a quantum break occurs.

So, it's better to prepare PQC support now.

As an example of the actual movement European Commission is trying to migrate from non-PQC to PQC.(link)

Proof of concept

I manage my proof-of-concept scripts on my junaruga/ruby-pqc-test repository. For now, there are only some scripts to test RubyGems and Bundler in PQC use cases.

Tasks

I checked ruby/ruby including default gems and bundled gems at the master branch commit 93f1010f70a3ac924c3b37e4ae82cf1a669fcbf0 which was the latest at that time.
While ruby/ruby original code doesn't have PQC logic, the following libraries that have the own upstream project need to be modified to support PQC use cases in my investigation. And I am motivated to work on these tasks, adding the PQC features and/or tests. I will open the issue ticket for each upstream project ruby/* one by one.

Note I used the following ripgrep's rg command (an enhanced grep command) to check the affected files by PQC.

$ rg "require +['\"]openssl['\"]|OpenSSL" --type ruby

Let me know what you think.

Updated by jaruga (Jun Aruga) 6 days ago Actions #1

  • Description updated (diff)

Updated by jaruga (Jun Aruga) 6 days ago Actions #2

  • Description updated (diff)

Updated by jaruga (Jun Aruga) 6 days ago Actions #3

  • Description updated (diff)

Updated by hsbt (Hiroshi SHIBATA) 4 days ago 1Actions #4 [ruby-core:125517]

Thanks for your detailed summary. I will handle rubygems and bundler.

Updated by jaruga (Jun Aruga) 4 days ago Actions #5 [ruby-core:125520]

As I heard from my colleagues working for OpenSSL, that SLH-DSA is not ready to be used, we can ignore SLH-DSA for now.

Sorry, the above was wrong or outdated information.
SLH-DSA is ready to use for signature use case (but not for TLS signature) now.

I am working at Red Hat, and it seems that my colleagues meant the following page's content that RHEL 10.0 provided a draft version of SLH-DSA by the OQS provider not by OpenSSL.

Interoperability of RHEL 10 post-quantum cryptography
https://access.redhat.com/articles/7119430

The OQS provider (oqsprovider-0.8.0-5.el10) implements the ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism) and ML-DSA (Module-Lattice-Based Digital Signature Algorithm) NIST standards. The package provides an early draft version of SLH-DSA (Stateless Hash-Based Digital Signature), the SPHINCS+ algorithm, which will not be supported in the future.

However, as OpenSSL 3.5 supports SLH-DSA, this is not the case.

Updated by jaruga (Jun Aruga) 4 days ago Actions #6 [ruby-core:125521]

hsbt (Hiroshi SHIBATA) wrote in #note-4:

Thanks for your detailed summary. I will handle rubygems and bundler.

Thanks!

Actions

Also available in: PDF Atom