This adds a ChibiOS patch file, similar to the efl driver for HMACSHA256
and turns on the necessary flags in halconf.h and mcuconf.h to use it in
the app_control project. It also adds a cli test that runs through the
RFC 4231 test cases for HMAC, which can also serve as an example of
use.
Note that out must be 32 bytes, that key must still exist in the same
place at the time Final() is called, and, except for the last call to
Update(), data must be a multiple of the word length (4 bytes). Also
note that the driver does not yet implement DMA.
The test can be run from the C3 CLI by issuing hmac as a command.
If the driver were to be submitted upstream it should probably be split
into two parts, the first of which is the configuration changes
necessary to get ChibiOS to compile when USE_CRYP1 is FALSE and
USE_HASH1 is TRUE
This adds a ChibiOS patch file, similar to the efl driver for HMACSHA256 and turns on the necessary flags in halconf.h and mcuconf.h to use it in the app_control project. It also adds a cli test that runs through the RFC 4231 test cases for HMAC, which can also serve as an example of use.
Typical usage looks like:
Note that
out
must be 32 bytes, thatkey
must still exist in the same place at the time Final() is called, and, except for the last call to Update(),data
must be a multiple of the word length (4 bytes). Also note that the driver does not yet implement DMA.The test can be run from the C3 CLI by issuing
hmac
as a command.If the driver were to be submitted upstream it should probably be split into two parts, the first of which is the configuration changes necessary to get ChibiOS to compile when USE_CRYP1 is FALSE and USE_HASH1 is TRUE