Running AES-128 in CW305 at 100MHz

I want to run the default aes-128 in CW305 at 50MHz-100MHz frequency. When I change the frequency using target.pll.pll_outfreq_set(100E6, 1), the encryption goes well for sometime but after few iterations, I see errors as follows:

Is there any way to avoid that? . For my purpose, its okay for me if I can not recevie the trace, but I need the encryption running at 100MHz, I am probing with oscilloscope.

On the cw-lite FPGA bitfile that’s currently on the develop branch, I’m able to capture reliably well beyond 105 MHz. Perhaps you’re using an older release with a different bitfile that doesn’t perform as well? It was last updated here, 4 months ago.

But if you’re not using cw-lite to capture the trace, then this is irrelevant; simply remove the cw-lite from your setup and use the CW305 in standalone mode with your other oscilloscope.

@jpthibault if i need to ignore cw-lite scope then I think i will have to get rid of scope definition defined in this notebook. If so, how do i send plaintext and receive encrypted text using ret = cw.capture_trace(scope, target, text, knownkey)

I can use some other UART module but is there any way to use the same/similar python code we are using to send and receive data to/from CW305, by just ignoring scope? I think i can not use the function ret() when I am trying to use cw305 without cw-lite.

@jpthibault I have found a way to communicate, using the functions defined in CW305.py (such as fpga_read, fpga_write) and avoiding arm(). But I am having some confusion regarding the cw305_aes_defines.v.

  1. what is the difference between REG_CRYPT_TEXTIN and REG_CRYPT_CIPHERIN?

  2. Can you take a look at the following sequence if I am doing it correctly:
    set_key in REG_CRYPT_KEY->set_plaintext in REG_CRYPT_TEXTIN->set REG_CRYPT_GO to 1-> check is_done() → read REG_CRYPT_CIPHEROUT.

  3. I saw the explanation of REG_CRYPT_GO somewhere but can’t find again. if possible can you please explain the behavior of this reg in brief?

It’s quite straightforward: take out the scope object from your notebook, then look at what cw.capture_trace() does: chipwhisperer/software/chipwhisperer/__init__.py at develop · newaetech/chipwhisperer · GitHub

Make your own custom capture function from capture_trace() by taking out the scope calls there and you’re basically done.

The CW305 whitepaper is probably where you saw the REG_CRYPT_GO explanation. CW305.py handles all this for you, scope or no scope.

It should also be quite straightforward to understand the register definitions from the source code.