Skip to content

crypto/x509: consider hardcoding RSA PSS paramemters #41407

Description

@rolandshoemaker

rsaPSSParameters is used to generate the RSA PSS parameters based on a given hash. It constructs a structure based on the hash and marshals it using encoding/asn1. Given there are only three possible input hashes it's somewhat heavyweight for what it does, and could be replaced by hardcoding the three possible DER parameter encodings that can be generated and picking one based on the hash.

This would also simplify the necessity for error handling that comes with calling asn1.Marshal (see https://go-review.googlesource.com/c/go/+/252557/).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions