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

Allow rsa.PSSSaltLengthEqualsHash as option #361

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

Conversation

maraino
Copy link

@maraino maraino commented Jan 11, 2024

This commit adds support to the salt length set to rsa.PSSSaltLengthEqualsHash when signing with an RSA key. This is currently supported, but the user must specify the length of the digest size.

Adding rsa.PSSSaltLengthEqualsHash allows the use of a key generated by the TPM for TLS client/server authentication. Go will set this option by default if an RSA key is used.

The client code looks like this:

if sigType == signatureRSAPSS {
        signOpts = &rsa.PSSOptions{SaltLength: rsa.PSSSaltLengthEqualsHash, Hash: sigHash}
}
sig, err := cert.PrivateKey.(crypto.Signer).Sign(c.config.rand(), signed, signOpts)

This commit adds support to the salt length set to
rsa.PSSSaltLengthEqualsHash when signing with an RSA key. This is
currently supported, but the user must sspecify the length to the digest
size.

Adding rsa.PSSSaltLengthEqualsHash allows using a key generated by the
TPM for TLS client authentication, Go will set this option by default
if an RSA key is used.

Signed-off-by: Mariano Cano <[email protected]>
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.

1 participant