I want to verify if my trigger gives me the correct duration of an AES-128 execution in a specific chip; I need only to have the duration of an AES block encrypt without any other functionality.

The frequency of the CPU is 128 MHZ, the frequency of the AES execution is 64 Mhz.

How can I calculate the duration of an execution of AES in order to verify with what I found with my oscilloscope?

  • 1
    $\begingroup$ If you don't tell us the exact chip, nobody will be able to give you a sensible answer. I know about smart cards where the AES-128 encryption takes 17 clock cycles and others where it takes more than 600 cycles. $\endgroup$ Oct 21 '16 at 9:33

The duration will depend on the chip and on the implementation.

In a good implementation, the duration of encryption is independent of the combination of the secret key and the message to encrypt (otherwise a so-called timing attack to gain knowledge on the key and/or the message is possible).

You need a model of the chip and its cache and the assembly code to do some real estimates (usually giving you a range of minimal and maximal cycles needed). For tight bounds there are commercial offers, e.g., by Absint. It is a feasible, but not a trivial task.

  • 3
    $\begingroup$ Note: For AES the execution should be independent of the key value (if timing attacks are not possible) for a specific key size (this is kind of implicit in the answer as it is for AES-128). $\endgroup$
    – Maarten Bodewes
    Oct 21 '16 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.