The PIO Universal Data allows the creation and management of different data types: 'key', 'data', and 'password`.
|
Currently available for CmDongle with a Minimum Firmware Version of 4.40. CmActLicense and CmCloud are not supported. |
For using the data type 'key' the functions CmCrypt2 and CmGetPublicKey have been extended.
|
CmCrypt2 can be used with all Universal Data (UvD) PIO 'key' types: RSA2048, RSA3072, RSA4096, AES128, AES256. How to use CmCrypt2 with Universal Data (UvD)? 1.Specify the index of the UvD PIO in member mulKeyExtType of CMBASECRYPT2. 2.Specify the 'login number' in the member muLogin of CMBASECRYPT2. 3.Set the member mflCtrl of CMBASECRYPT2 to CM_CRYPT_UNIVERSALDATA. •CM_CRYPT_DIRECT_ENC and CM_CRYPT_DIRECT_DEC for key type AES •CM_CRYPT_DIRECT_DEC for key type RSA Please note that AES can still only be used with an 16 byte input. Error Codes when using Universal Data (UvD) PIOs may be as follows: •CMERROR_INDEXINVALID, if the specified index does not refer to a UvD PIO. •CMERROR_PRODUCTITEMOPTIONINVALID, if the specified index does not refer to a UvD PIO of type 'key' or if the PIO status is invalid. •CMERROR_INVALID_LOGIN, if the specified 'login number' is not in use. •CMERROR_ACCESS_DENIED, if using the key is password-protected and the given 'login number' is not valid or if using the key does not require a password, but muLogin != 0. •CMERROR_SESSION_EXPIRED, if the session used to create the specified 'login number' has expired. |
|
CmGetPublicKey can be used to obtain the public key of RSA keys stored in a UvD PIO of type 'key'. It is possible to obtain the public key for the key types RSA2048, RSA3072 and RSA4096. How to use CmGetPublicKey with Universal Data (UvD)? 1.Specify the index of the UvD PIO in member mulKeyExtType of CMAUTHENTICATE. 2.Specify the 'login number' in the member mulEncryptionCodeOptions of CMAUTHENTICATE. 3.Set the member mflCtrl of CMAUTHENTICATE to CM_AUTH_UNIVERSALDATA. 4.Use the new structure CMPUBLICKEY as pbPubKey parameter. 5.Set the parameter cbPubkey to sizeof(CMPUBLICKEY). Error Codes when using Universal Data (UvD) PIOs may be as follows: •CMERROR_INDEXINVALID, if the specified index does not refer to a UvD PIO. •CMERROR_PRODUCTITEMOPTIONINVALID, if the specified index does not refer to a UvD PIO of type 'key' or if the PIO status is invalid. •CMERROR_INVALID_LOGIN, if the specified 'login number' is not in use. •CMERROR_ACCESS_DENIED, if using the key is password-protected and the given 'login number' is not valid or if using the key does not require a password, but mulEncryptionCodeOptions != 0. •CMERROR_SESSION_EXPIRED, if the session used to create the specified 'login number' has expired. |