Skip to content

How to generate/verify RSA-PSS with pre-computed content hash? #1145

Open
@oh2mqk

Description

@oh2mqk

At RFC 8017 (PKCS#1 v2.2) chapter 9.1. "EMSA-PSS" the "Figure 2" diagram shows that input "M" is hashed producing "mHash", then it is padded and salted, and again run through the same hash algorithm as the initial input is done.

The PSSSigner.java class implements this diagram very faithfully.

How can I feed the algorithm with pre-computed mHash ?
Maybe modifying the PSSSigner to enter two separate instances of the Hash algorithm, and instantiating first one as NullDigest ?

The Java Card has Signature API called: signPrecomputedHash() taking the mHash directly in from the caller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions