RE: CSM_Free3::SMTI_DigestData

"Colestock, Robert" <[email protected]> Tue, 10 Jul 2001 14:30:28 -0400
Newsgroups gmane.ietf.sfl
Message-ID <[email protected]>
Eric:

This version was already tested with our software; it is un-encumbered (no
licensing issues); it works...

You are certainly welcome to use the internal version if you wish, it should
work the same.  As provided in the SFL, the SHA-1 and SHA-2 hashes are
currently available without a CTIL.

Bob Colestock
VDA.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, July 10, 2001 8:58 AM
To: [email protected]
Subject: CSM_Free3::SMTI_DigestData



Hi,

I want to know why we do not use CryptoPP::SHA when we want to do hash with
SHA algorithm ?????   (we use internal function)

/***************************************************************************
************/

(line 2134)
//////////////////////////////////////////////////////////////////////////
// SMTI_DigestData uses CSM_Common for SHA1 and Crypto++ for MD5
SM_RET_VAL CSM_Free3::SMTI_DigestData(
            CSM_Buffer *pData, // input
            CSM_Buffer *pDigest) // output
{
   CSM_OID *poidDigest = NULL;
   char *pchData;
   long lBytesRead;

   SME_SETUP("CSM_Free3::SMTI_DigestData");

   // find out what the preferred digest alg is
   if ((poidDigest = GetPrefDigest()) == NULL)
      SME_THROW(SM_FREE_NO_DIGEST_ALG, NULL, NULL);

   if (*poidDigest == sha_1 || *poidDigest == id_dsa_with_sha1 ||
//       *poidDigest == sha_1WithRSAEncryption_ALT ||
       *poidDigest == sha_1WithRSAEncryption)
   {
      // do SHA1 digest using common CTI
      SME(CSM_Common::SMTI_DigestData(pData, pDigest));
   }
   else if (*poidDigest == md5 ||
            *poidDigest == md5WithRSAEncryption)
   {
      bool bLastBlock = false; // set to true when this is the last block
      // do MD5 digest
      MD5 md5;
....
}
/***************************************************************************
************/


CSM_Free3 is not supposed to use Crypto++ library ?????


Thanks.

**************************************************************************
Eric Boudreault
------------------------------------------------
Programmeur
------------------------------------------------
Motus Technologies
390, St-Vallier Est
Bureau 100
Québec, Qc
G1K 3P6
Tél.: 521-2100  ext.#242
Fax.: 521-2101
courriel: [email protected]
**************************************************************************