Skip to content

add salt length calculation with PSSSaltLengthAuto#96

Open
maraino wants to merge 1 commit intoThalesGroup:masterfrom
maraino:rsa-pss-auto
Open

add salt length calculation with PSSSaltLengthAuto#96
maraino wants to merge 1 commit intoThalesGroup:masterfrom
maraino:rsa-pss-auto

Conversation

@maraino
Copy link
Copy Markdown
Contributor

@maraino maraino commented Jul 13, 2022

Description

This PR adds support for signing using rsa.PSSSaltLengthAuto

When PSSSaltLengthAuto is set, the maximum salt length must equal:

(modulus_key_size - 1 + 7)/8 - hash_length - 2

For example, for a 4096-bit modules key and SHA256 it should be:

(4096 - 1 + 7)/8 - 32 - 2 = 478

See https://golang.org/cl/302230

When PSSSaltLengthAuto is set, the maximum salt length must equal:

  (modulus_key_size - 1 + 7)/8 - hash_length - 2

For example, for a 4096-bit modules key and SHA256 it should be:

  (4096 - 1 + 7)/8 - 32 - 2 = 478

See https://golang.org/cl/302230
@maraino maraino changed the title fix salt length calculation with PSSSaltLengthAuto add salt length calculation with PSSSaltLengthAuto Jul 13, 2022
@maraino
Copy link
Copy Markdown
Contributor Author

maraino commented Aug 12, 2022

@solcates, are you maintaining this repo? Any updates on this?

Copy link
Copy Markdown
Contributor

@optnfast optnfast left a comment

Choose a reason for hiding this comment

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

The change looks good to me.

@maraino
Copy link
Copy Markdown
Contributor Author

maraino commented Nov 11, 2022

@optnfast do you know who has approving rights in this repo and can merge this? @solcates?

@optnfast
Copy link
Copy Markdown
Contributor

@solcates would be my first thought but I no longer work for Thales so I don't really know.

Copy link
Copy Markdown
Contributor

@solcates solcates left a comment

Choose a reason for hiding this comment

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

Sorry, I haven't been checking up on this code like I should have

LGTM

@maraino
Copy link
Copy Markdown
Contributor Author

maraino commented Jan 27, 2025

Sorry, I haven't been checking up on this code like I should have

LGTM

@solcates is it possible to merge this and tag a new version?

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.

3 participants