I need to implement run-time licensing in an embedded protocol stack.
I already have an idea about how to achieve this but I am interested in hearing any alternative approaches, or any pitfalls to watch out for. You can assume that each device running the stack will have a unique hard-coded identifier (MAC address equivalent) and access to some non-volatile storage.
My planned approach is to provide a licence key generated via a hash function from the device identifier which the manufacturer should store in the non-volatile store. The stack will hash the identifier using the same hashing function and verify that it matches the stored key before it will run.