bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

Allows creation of HashMLDsaSigner that can sign hashes

Open harrison314 opened this issue 3 weeks ago • 2 comments

Describe your changes

I made modifications that allow you to create a HashMLDsaSigner that can be used to sign an existing hash.

For proper functionality, it is necessary to accept the merge request https://github.com/bcgit/bc-csharp/pull/654

I added the same option for HashSlhDsaSigner.

My questions

  1. Is it necessary to add a check in the static HashMLDsaSigner CreateRawSigner(MLDsaParameters parametersWithoutPrehash, bool deterministic, DerObjectIdentifier preHashOid) method or is there a digest OID for preHashOid?
  2. Is it necessary to add a hash length check? I looked at RsaDigestSigner, but I didn't find this check in it.

How has this been tested?

Tested with my own application and with changes in https://github.com/bcgit/bc-csharp/pull/654

Checklist before requesting a review

  • [x] I have performed a self-review of my code
  • [x] I have kept the patch limited to only change the parts related to the patch
  • [ ] This change requires a documentation update

See also Contributing Guidelines.

harrison314 avatar Nov 29 '25 11:11 harrison314