Re: Hash value not correct in CryptVerifyDetachedMessageSignature

From: Pablo J. Royo (PabloJRoyo_at_discussions.microsoft.com)
Date: 08/13/04


Date: Fri, 13 Aug 2004 07:11:02 -0700


Thank you very much Tarik.

> You might have to reverse the bytes returnd by hashing using CAPI in order
> to verify it with Hash calculated using OpenSSL.

But How do I have access to that bytes?

I suppose, the function I use does an internal hashing of the content pased
to it, so I have no access to that.

The function prototype is

BOOL WINAPI CryptVerifyDetachedMessageSignature(
  PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara,
  DWORD dwSignerIndex,
  const BYTE* pbDetachedSignBlob,
  DWORD cbDetachedSignBlob,
  DWORD cToBeSigned,
  const BYTE* rgpbToBeSigned[],
  DWORD* rgcbToBeSigned[],
  PCCERT_CONTEXT* ppSignerCert
);

 I suppose I must give the clear content to the fucntion, so it can check
its hash is the same contained in the signature passed in
pbDetachedSignBlob.But I could also pass a hash of a clear content already
computed by some othe ways...
Are this rgpbToBeSigned the hash or the clear content ?.

Thanks again.



Relevant Pages

  • Re: [Full-Disclosure] Show me the Virrii!
    ... audit process execution at just the right time. ... To complete what turned out to be a three-part-series on using hash ... DWORD WINAPI BlockProcThread; ... char sProfileModePath; ...
    (Full-Disclosure)
  • Re: [Full-Disclosure] Show me the Virrii!
    ... the resources necessary to assemble definitive lists of ... audit process execution at just the right time. ... To complete what turned out to be a three-part-series on using hash ... BOOL validatehash(HANDLE hProfile,char *sHash,DWORD hashlen); ...
    (Full-Disclosure)
  • Re: Hash method
    ... Here's how you do a hashing with the Crypt* functions. ... DWORD dwHashLen; ... goto done; ... // Put the hash in buffer. ...
    (microsoft.public.pocketpc.developer)
  • Making Datatypes Constant and Emulating Const Correctness
    ... Being relatively new to Perl with Java and bits of C under my belt, ... I'm new to C+++, too, but remember a number of uses for the const keyword ... an array to some analizer function as a constant strongly signals that no ... some reference (e,g. a blessed hash reference) ...
    (comp.lang.perl.misc)
  • Re: Question about tcp hash function tcp_hashfn()
    ... But it still does not fix artifacts with for example const IP and random ... ports or const IP and linear port selection. ... Values must be specially tuned to be used with Jenkins hash, ...
    (Linux-Kernel)