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?
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::ECclasses (RSA, DSA, EC cases) that have#private?and#to_pem, andOpenSSL::PKey::PKeyclass (ML-DSA cases) that doesn't have#private?and#to_pem.I guess
OpenSSL::PKey::PKeyclass is for general algorithm. I wantOpenSSL::PKey::PKeyclass to implement missing methods for the compatibility ofOpenSSL::PKey::RSA,OpenSSL::PKey::DSA,OpenSSL::PKey::ECclasses. Or I wantOpenSSL::PKey::ML-DSAorOpenSSL::PKey::ML-DSA-NNclasses to have the missing methods. I understand that the usage#to_pemis not encouraged due to#public_to_pemor#private_to_pemused in this case instead of#to_pem. However, I still want the#to_pemmethod for the compatibility.With this feature, I can implement new ML-DSA feature without conditional logic for missing methods.
What do you think?