in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c [52:73]
int TDES_setup(
const BYTE *key,
UINT32 keyBits,
tpmKeyScheduleTDES *skey,
int dir
)
{
BYTE k[24];
BYTE *kp;
// If this is two-key, make it three key by replicating K1
if(keyBits == 128)
{
memcpy(k, key, 16);
memcpy(&k[16], key, 8);
kp = k;
}
else
kp = (BYTE *)key;
return wc_Des3_SetKey( skey, kp, 0, dir );
}