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

update lingT_signature_algorithm_not_supported - support rsa-pss #913

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Hagelkruys
Copy link

see #912

@Hagelkruys Hagelkruys mentioned this pull request Jan 31, 2025
Copy link
Member

@christopher-henderson christopher-henderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch! I double checked the citations and I believe this is correct. Now we need to get CICD passing.

  1. We need to edit the unit test at lint_signature_algorithm_not_supported_test.go#L44 to be from expected := lint.Warn to expected := lint.Pass.
  2. The linter wants us to run (from the repository root) gofmt -w v3/lints/cabf_br/lint_signature_algorithm_not_supported.go

warnSigAlgs = map[x509.SignatureAlgorithm]bool{
// The BRs v2.1.2 allow the use of RSA-PSS as a signature scheme, see
// 7.1.3.2.1 RSA
// The Mozilla root program policy v2.9 allow RSA-PSS as a signature

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking these references.

From Mozilla 5.1.1.

When a root or intermediate certificate's RSA key is used to produce a signature, only the following algorithms MAY be used, and with the following encoding requirements:

...

RSASSA-PSS with SHA-256, MGF-1 with SHA-256, and a salt length of 32 bytes.
The encoded AlgorithmIdentifier MUST match the following hex-encoded bytes:

304106092a864886f70d01010a3034a00f300d06096086480165030402010500a11c301a06092a864886f70d010108300d06096086480165030402010500a203020120

From CABF/Br 7.1.3.2.1

The CA SHALL use one of the following signature algorithms and encodings. When encoded, the
AlgorithmIdentifier MUST be byte‐for‐byte identical with the specified hex‐encoded bytes.

...

RSASSA‐PSS with SHA‐256, MGF‐1 with SHA‐256, and a salt length of 32 bytes:
Encoding:

304106092a864886f70d01010a3034a00f300d06096086480165030402010500a11c301a06092a864886f70d010108300d06096086480165030402010500a203020120

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.

2 participants