You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though QEMU does not implement the cortex M4 DWT cycle counter, real hardware often does.
I have successfully tested the commented out cycle counter code from qemu-test on a real STM32F411 board. Of course, the cycle count for sign() is not constant, as the message length varies.
So, now it would be nice to have a feature in salty to enable cycle counting in 'the right places'.
As a starting point, dedicated tests for low level calls would be fine, too.
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
enabled cycle counter
keypair.sign took 5539346 cycles
keypair.sign took 5539196 cycles
keypair.sign took 5539230 cycles
keypair.sign took 5539254 cycles
keypair.sign took 5873812 cycles
keypair.sign took 5564848 cycles
All tests passed, including RFC 8032 test vectors!
(As a quick test, I wrapped all regular sign() calls with the counting code.)
The text was updated successfully, but these errors were encountered:
Even though QEMU does not implement the cortex M4 DWT cycle counter, real hardware often does.
I have successfully tested the commented out cycle counter code from
qemu-test
on a real STM32F411 board. Of course, the cycle count forsign()
is not constant, as the message length varies.So, now it would be nice to have a feature in salty to enable cycle counting in 'the right places'.
As a starting point, dedicated tests for low level calls would be fine, too.
(As a quick test, I wrapped all regular
sign()
calls with the counting code.)The text was updated successfully, but these errors were encountered: