Skip to content

Feature request: OpenSSL::PKey::PKey, OpenSSL::PKey::ML-DSA, or OpenSSL::PKey::ML-DSA-NN to implement #private? and #to_pem #1085

Description

@junaruga

For the last commit of ruby/rubygems#9697: rubygems: Add PQC ML-DSA support for cryptographically signed gems workflow, there are some code changes that come from the differences between OpenSSL::PKey::RSA, OpenSSL::PKey::DSA, OpenSSL::PKey::EC classes (RSA, DSA, EC cases) that have #private? and #to_pem, and OpenSSL::PKey::PKey class (ML-DSA cases) that doesn't have #private? and #to_pem.

I guess OpenSSL::PKey::PKey class is for general algorithm. I want OpenSSL::PKey::PKey class to implement missing methods for the compatibility of OpenSSL::PKey::RSA, OpenSSL::PKey::DSA, OpenSSL::PKey::EC classes. Or I want OpenSSL::PKey::ML-DSA or OpenSSL::PKey::ML-DSA-NN classes to have the missing methods. I understand that the usage #to_pem is not encouraged due to #public_to_pem or #private_to_pem used in this case instead of #to_pem. However, I still want the #to_pem method for the compatibility.

With this feature, I can implement new ML-DSA feature without conditional logic for missing methods.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions