ACCEPTED_HASH_DIGEST_ALGORITHMS support sha3? #20
Replies: 2 comments 1 reply
-
There are two ways to use the PlainSigner with what we call Client-side hashing, see: https://doc.primekey.com/signserver/signserver-reference/client-side-hashing#ClientSideHashing-PlainSignatures. With the "Explicitly using Request Metadata Properties" that is when you need the ACCEPTED_HASH_DIGEST_ALGORITHMS and some more request properties. This mode could be the easiest to use as besides the properties the data you send it would be the hash without any special encoding. This only works for currently supported hash algorithms: SHA1, SHA-256, SHA-384, SHA-512. However, the other mode "Implicitly and with Encoding Depending on Algorithm" should work with all algorithms, but now it is up to you to format the signature input accordingly. For RSASSA-PKCS1_v1.5 it means that the input needs to be the DER encoded DigestInfo structure from RFC #3447 page 42 containing the OID of the hash algorithm and the hash value. If this is what you already have in binary.file, I guess you are good to go and to use that. I am not aware exactly what the rsautl commands does. Maybe the raw flag would mean "no padding" in which case that is probably different then what you get from the PlainSigner which for NONEwithRSA would use PKCS1 padding (or using NONEwithRSAandMGF1 which uses PSS padding). |
Beta Was this translation helpful? Give feedback.
-
5: Actually, the padding is done by the signer so this might be why it believes your input is too large. This is not currently clear in the documentation but has been clarified like this in the next version:
So this means that you should not apply any padding and instead just provide the DigestInfo structure (DER encoded). On page 42 is the exact bytes expected for some hash algorithms but it should probably work to construct that yourself and instead use SHA3. Hope this helps. Let us know how it works out. |
Beta Was this translation helpful? Give feedback.
-
As shown in the figure, I hash the signature file on the client side by specifying the attribute, and then call the signer to sign.

In the past, we signed and verified with the following commands
and now we want to use signserver for signing, and the verification remains the same. Now there are 2 problems.
The first is the signature file must be sha3-256, and then I modify this attribute and find that it is not supported. Is signserver currently not supported? Or is there another way to configure it?
The second is the -raw parameter in the openssl command will have any effect on the configuration of the signer?
Beta Was this translation helpful? Give feedback.
All reactions