LDicomNet::GetEncryptKeyLengthTLS

#include "ltdic.h"

L_UINT32 LDicomNet::GetEncryptKeyLengthTLS(cipher)

L_CIPHERSUITE cipher;

/* ciphersuite */

Returns the effective length (in bits) of the encryption key associated with the specified ciphersuite (56 for DES etc). This function is available in the Medical Suite toolkits.

Parameter

Description

cipher

Value that indicates the ciphersuite for which to get the length of the encryption key.

Returns

Returns the effective length of the encryption key associated with the specified ciphersuite.

Comments

There are differences between the size of the key and the effective length. The security of a key is given by the effective length, not by the size (a DES key has 8 bytes, just like a DES40 key, but the first has 56 bits effective, and the second only 40.)

Required DLLs and Libraries

LTDIC
LTCRY
LTTLS

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LDicomNet::GetAuthenticationAlgorithmTLS, LDicomNet::GetIntegrityAlgorithmTLS, LDicomNet::GetEncryptionAlgorithmTLS, LDicomNet::GetKeyExchangeAlgorithmTLS, LDicomNet::GetMutualAuthKeyLengthTLS, Class Members

Topics:

Adding TLS Security to a DICOM Connection

 

Negotiating a Ciphersuite

 

General Transport Layer Secure (TLS) Information

Example

L_INT LDicomNet_GetEncryptKeyLengthTLSExample(LDicomNet* m_pDicomNet)
{
   L_INT       nRet;
   LDicomNet*  pDicomNet;
   // create and initialize pDicomNet
   pDicomNet = m_pDicomNet;
   nRet = pDicomNet->GetEncryptKeyLengthTLS(TLS_DHE_RSA_WITH_DES_CBC_SHA);
   L_TCHAR strMsg[64];
   wsprintf(strMsg, TEXT("Effective key length for TLS_DHE_RSA_WITH_DES_EDE_CBC_SHA is %d"), nRet);
   AfxMessageBox(strMsg);
   return DICOM_SUCCESS;
}