Revamp the simple password flag and rPi fixes (#1056)
MY_SIGNING_SIMPLE_PASSWD is now called MY_SECURITY_SIMPLE_PASSWD. MY_SIGNING_SIMPLE_PASSWD only affects signing, and a new flag, MY_ENCRYPTION_SIMPLE_PASSWD only affects encryption. MY_SECURITY_SIMPLE_PASSWD enable both these flags. The rPi port has been improved to support more security settings and it is now also possible to enable encryption for RFM69 transport. Documentation has been improved to provide a "Security" section under "Library customisation" which has a table that summarize all security related configuration flags, and the corresponding rPi configuration flags. The signing personalization documentation has been updated to include the procedure for rPi. Fixes #1055
This commit is contained in:
@@ -134,7 +134,7 @@ void print_soft_sign_hmac_key(uint8_t *key_ptr = NULL)
|
||||
printf("\n\n");
|
||||
|
||||
printf("The next line is intended to be used in SecurityPersonalizer.ino:\n");
|
||||
printf("#define MY_SOFT_HMAC_KEY ");
|
||||
printf("#define MY_HMAC_KEY ");
|
||||
for (int i=0; i<32; i++) {
|
||||
printf("%#02X", key_ptr[i]);
|
||||
if (i < 31) {
|
||||
@@ -265,9 +265,9 @@ void print_aes_key(uint8_t *key_ptr = NULL)
|
||||
uint8_t key[16];
|
||||
|
||||
if (key_ptr == NULL) {
|
||||
#ifdef MY_SIGNING_SIMPLE_PASSWD
|
||||
#ifdef MY_ENCRYPTION_SIMPLE_PASSWD
|
||||
memset(key, 0, 16);
|
||||
memcpy(key, MY_SIGNING_SIMPLE_PASSWD, strnlen(MY_SIGNING_SIMPLE_PASSWD, 16));
|
||||
memcpy(key, MY_ENCRYPTION_SIMPLE_PASSWD, strnlen(MY_ENCRYPTION_SIMPLE_PASSWD, 16));
|
||||
#else
|
||||
hwReadConfigBlock(&key, reinterpret_cast<void*>EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS, 16);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user