Channel binding for post-quantum cryptography - Mailing list pgsql-hackers

From Filip Janus
Subject Channel binding for post-quantum cryptography
Date
Msg-id CAFjYY+JCCQeh03nzVG6Rs9MUgU_kOvhMbNaaS6kn_c4CcAZkTg@mail.gmail.com
Whole thread Raw
Responses Re: Channel binding for post-quantum cryptography
List pgsql-hackers

Hi hackers,

While working on testing post-quantum cryptography integration in my system, I discovered that PostgreSQL has an issue with channel binding when using ML-DSA cryptographic algorithms.

The problem is caused by a difference between the currently used algorithms and post-quantum ones. For example, commonly used algorithms like RSA have a defined digest algorithm, but ML-DSA does not.

PostgreSQL's channel binding implementation expects all signature algorithms to have a traditional digest mapping, but post-quantum algorithms such as ML-DSA use their hash function internally as part of the signature process.

As a result, the connection fails with the following error:

could not find digest for NID UNDEF

The issue can be worked around by disabling channel binding.

Although the RFC is not entirely clear on how to handle this situation, in my patch I propose using SHA-256 as the default digest in such cases.


    -Filip-
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Preserve index stats during ALTER TABLE ... TYPE ...
Next
From: Peter Smith
Date:
Subject: Re: Should we say "wal_level = logical" instead of "wal_level >= logical"