After accepting an answer to my previous question, I am beginning to have doubts.
I want to updating pricing information in vending machines by inserting an SD card with new pricing.
I have to encrypt the file, because anyone who can change it can get one cent drinks. The people who stock the machines would exchange the cards when there is new pricing. They are on minimum wage and generally not renowned hackers, but could, I suppose, pass a card on.
The SD card would be behind a locked casing and anyone who opened that could just clean out the cash box & would probably be unlikely to swipe the card.
The code in the machines is rarely changed, but there will be an option for firmware upgrade (via the same SD card), so I suppose I could update keys that way if they become compromised & store them in NonVolatile memory.
Each machine has a unique CPU Id and also is aware of its model type “drinks, candy, etc” where all machines of the same type have the same pricing structure – if that is of any use for seeding, etc
Question: what’s a good algorithm to use when I am writing in Delphi on Windows and reading in C on a low memory (128kB) embedded system (the file is likely ot be of the order of 512 to 1,024 bytes)? How to deal with keys in this scenario? Hard code into the s/w?
Any other comments or suggestions?