Is this project still live?
We are using this wrapper in our tools, it works well, but we need to send Store data commands in which the data is encrypted using DEK (See the GP specification).
We have hacked a function to access BYTE GP211_SECURITY_INFO::dataEncryptionSessionKey[16] from the wrapper.
A better alternative would be an encryption routine in the GlobalPlatform library, eg GP211_EncryptData() but we have no time to implement this, submit upstream, etc. for the moment.
Code: Select all
/* parameter GP211_SECURITY_INFO */
PyObject* pyGP211_get_sdek(PyObject* self, PyObject* args)
{
CHECK_FUNCTION_ARGUMENTS_COUNT(1);
GP211_SECURITY_INFO stGP211SecurityInfo = *(GP211_SECURITY_INFO *)PyString_AsString(PyTuple_GetItem(args, 0));
return PyString_FromStringAndSize((char*)stGP211SecurityInfo.dataEncryptionSessionKey, 16);
}