NetBurner 3.1
checklock

This gives and example of how to give a board permission/lock to run specific code based on MAC address.

The basic process is we take a secret message and run it through the MD5 hash function. We pad this secret message to some multiple of 64 bytes and save off the MD5 context.

Then on the board we want to sign we combine this partial MD5 context with the board MAC address and generate a 16 byte digest specific to both the board and the secret message.

We then store this 16 byte digest somewhere (In the example we store this in the UserParameters space)

Then when we want to see if the program is runign on a board with permission we recompute this digest and check agains the stored value.

Preliminary steps:

  • Go to the Keyblob project.
  • Edit the text: const char * YourSecretSigningText ="This should be your company secret message";
  • Compile and run this on a netburner board.
  • Capture the last message `/*Your keblob should be :
keyblob
signboard