[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: computing  client_write_MAC_secret and
From:       AUCOUTURIER Sebastien <aucouturier.wellincom () WANADOO ! FR>
Date:       2001-06-22 5:46:11
[Download RAW message or body]


Thanxx John,

You've rigth, a bad assignement in my source code... make me change
KP_SCHANNEL_ALG in KP_EFFECTIVE_KEYLEN

Best Regards.
_835_

-----Message d'origine-----
De : Microsoft Cryptographic API
[mailto:CryptoAPI@DISCUSS.MICROSOFT.COM]De la part de John Banes
Envoyé : jeudi 21 juin 2001 22:26
À : CryptoAPI@DISCUSS.MICROSOFT.COM
Objet : Re: computing client_write_MAC_secret and
server_write_MAC_secret ?


I think that what you are interpreting as CPSetKeyParam
KP_EFFECTIVE_KEYLEN are actually the two calls to set the
KP_SCHANNEL_ALG property on the master key object, as shown below.

Regards, John


    // Specify encryption algorithm.
    if(pCipherInfo->aiCipher != CALG_NULLCIPHER)
    {
        ZeroMemory(&Algorithm, sizeof(Algorithm));
        Algorithm.dwUse = SCHANNEL_ENC_KEY;
        Algorithm.Algid = pCipherInfo->aiCipher;
        Algorithm.cBits = pCipherInfo->cbSecret * 8;
        if(fExportable)
        {
            Algorithm.dwFlags = INTERNATIONAL_USAGE;
        }
        if(!CryptSetKeyParam(hMasterKey,
                             KP_SCHANNEL_ALG,
                             (PBYTE)&Algorithm,
                             0))
        {
            ...
        }
    }

    // Specify hash algorithm.
    Algorithm.dwUse = SCHANNEL_MAC_KEY;
    Algorithm.Algid = pHashInfo->aiHash;
    Algorithm.cBits = pHashInfo->cbCheckSum * 8;
    if(!CryptSetKeyParam(hMasterKey,
                         KP_SCHANNEL_ALG,
                         (PBYTE)&Algorithm,
                         0))
    {
        ...
    }

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic