Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSA-PSS signature algorithm support #124

Merged
merged 5 commits into from
Jul 22, 2024
Merged

Conversation

WorldThirteen
Copy link
Collaborator

No description provided.

@microshine
Copy link
Contributor

I have implemented support for the RSA-PSS mechanism with parameters for signing and verifying PDF documents. The update also includes tests for algorithm conversion, as well as signing and verifying signatures for various RSA mechanisms:

  • RSASSA-PKCS1-v1_5: SHA-1, SHA-256, SHA-384, SHA-512
  • RSA-PSS: SHA-1, SHA-256, SHA-384, SHA-512

When signing a document, identifiers for the RSA-PSS algorithm are formed in the CMS block as follows:

SEQUENCE (2 elem)
  OBJECT IDENTIFIER 1.2.840.113549.1.1.10 rsaPSS (PKCS #1)
  SEQUENCE (3 elem)
    [0] (1 elem)
      SEQUENCE (2 elem)
        OBJECT IDENTIFIER 2.16.840.1.101.3.4.2.3 sha-512 (NIST Algorithm)
        NULL
    [1] (1 elem)
      SEQUENCE (2 elem)
        OBJECT IDENTIFIER 1.2.840.113549.1.1.8 pkcs1-MGF (PKCS #1)
        SEQUENCE (2 elem)
          OBJECT IDENTIFIER 2.16.840.1.101.3.4.2.3 sha-512 (NIST Algorithm)
          NULL
    [2] (1 elem)
      INTEGER 64

This ensures proper identification and application of the RSA-PSS algorithm during the signing process.

image

@microshine microshine linked an issue Jul 22, 2024 that may be closed by this pull request
@microshine microshine marked this pull request as ready for review July 22, 2024 09:51
@microshine microshine merged commit 195c7ba into main Jul 22, 2024
@microshine microshine deleted the add-rsa-pss-support branch July 22, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for RSA-PSS in CMS
2 participants