[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
KEKIdentifier
Continuing on from my previous emails,
I am now attempting to tranfer some relevant KEKDetails. I create my
RecipientInfo and pass it a populated KEKDetails instance. The message is
then encrypted fine with these details and transferred to the 'far side',
that is, the KEKdetails are successfully decoded. However, I don't appear to
have any way of actually accessing the details from my CTIL.
As I understand it, the KEKDetails contains info about which particular
encryption key has been used, and other miscellaneous info, like the date
and other values. The sort of information that a CTIL will need to actually
decrypt an encrypted content key. Yet there doesn't appear to be a way to
actually pass the KEKdetails to the SMTI_Extract_KeyWrap() method.
The code I am specificly looking at is below.
Is this functionality missing or am I merely looking in the wrong place or
misunderstanding the purpose of KEKIdentifier ?
Thanks,
Gav
sm_Decrypt.cpp, CSM_DataToDecrypt::TryThisInstance()
if (determineKEKUserEncryptionData(*pRI))
{
// create a buffer to receive the MEK
if ((pMEK = new CSM_Buffer) == NULL)
SME_THROW(SM_MEMORY_ERROR, NULL, NULL);
// decrypt the EMEK using a content encryption alg.
//SME(pInst->AccessTokenInterface()->SMTI_Decrypt(
// pRI->m_pbufParams, &pRI->m_bufEMEK,
// &pRI->m_pKEKDetails->m_UserEncryptionData, pMEK));
pKeyAgreeAlg=
new CSM_Alg(*pRI->AccesskeyEncryptionAlgorithm());
// IN, specified encryption of key,
// used here in key generation, but alg not implemented.
if (pKeyAgreeAlg->parameters)
{
m_pKeyWrapOID=new AsnOid (pKeyAgreeAlg->algorithm);
pInst->SetPreferredCSInstAlgs(NULL, NULL, NULL, m_pKeyWrapOID);
SME(pInst->AccessTokenInterface()->SMTI_ExtractKeyWrap(pMEK,
&pRI->m_bufEMEK, NULL/*pRI->m_pbufParams*/,
&pRI->m_pKEKDetails->m_UserEncryptionData,
NULL));
} // END if pKeyAgreeAlg->parameters
the pRI->m_pKEKDetails->m_RID contains the info I need in
SMTI_Extract_KeyWrap(), but I can't find a way to pass it in.