I have a little program running in an Attiny2313. But before it can do anything, the device has to be authenticated first with an "authenticator".
The way it work is, the authenticator sends a bunch of characters(encryption/decryption keys, settings, etc) to the tiny2313 via the serial port. The tiny2313 will then save this in EEPROM. Only that time(when the tiny2313 has these array of characters) that the two can communicate via wireless.
My problem is, how do i prevent someone from reading the EEPROM data and at the same time still "programmable" by the authenticator by sending a new batch of data via serial(writing to EEPROM is handled by code in tiny2313)?
The datasheet tells me of lockbits but I'm not sure if the EEPROM can still be programmed by code if I use this setting
Further programming and verification of the Flash and
EEPROM is disabled in Parallel and Serial Programming
mode. The Boot Lock bits and Fuse bits are locked in both
Serial and Parallel Programming mode