Added SHA command to ATSHA204 backend driver
The SHA command is available in ATSHA204A variants of the chip and can be used to calculate SHA256 digests of arbitrary data. This enables us to strengthen the quality of the signatures by salting signatures with node-specific data and improving the quality of random data.
This commit is contained in:
@@ -31,10 +31,11 @@ private:
|
||||
unsigned long timestamp;
|
||||
bool verification_ongoing;
|
||||
uint8_t current_nonce[NONCE_NUMIN_SIZE_PASSTHROUGH];
|
||||
uint8_t temp_message[32];
|
||||
uint8_t temp_message[SHA_MSG_SIZE];
|
||||
uint8_t rx_buffer[SHA204_RSP_SIZE_MAX];
|
||||
uint8_t tx_buffer[SHA204_CMD_SIZE_MAX];
|
||||
bool calculateSignature(MyMessage &msg);
|
||||
uint8_t* sha256(const uint8_t* data, size_t sz);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user