So, in order to create a protected item you need to compose its descriptor. This can be done in two ways:

Using program GrdUtil.exe

This is the simplest and preferable way of creating protected items. GrdUtil.exe provides a convenient interface for this purpose. In order to create a protected item of a hardware algorithm descriptor you need to set the properties of the object being created and the utility will do the rest. It will create a protected item allocation table, write item descriptors into the dongle and set read/write locks onto the memory area occupied by these objects.

Using GrdUtil.exe you can also add new protected items to the existing ones, change properties and format of existing items or delete some (or all) items.

Using Guardant API functions

This way is more complicated. It consists of the following stages:

  1. Remove all of dongle memory contents using GrdInit or GrdTRU_SetKey.
  2. Protected item allocation table is recorded starting with the kmAlgo Addraddress.
  3. Protected item descriptors are written starting with the next byte following the table.
  4. Use operation GrdProtect to set read/write locks onto memory areas occupied by descriptors, and the number of protected items is written into kmAlgoNum field. From now on the descriptors will be impossible to read.

This way features some serious limitations. Essentially it can be used for deleting all existing protected items and for creating new ones instead. You will be unable to add a new item to the existing ones, or to change the descriptor of an existing item, or to selectively delete any items.

  • No labels