How to set plaintext value?

Maybe I’m misunderstanding how ChipWhisperer Lite works, but I am setting these parameters:

cap.setParameter(['Key/Text Pattern', 'Fixed Plaintext', True])
cap.setParameter(['Key/Text Pattern', 'Fixed Plaintext Value', myPlainText])
cap.setParameter(['Key/Text Pattern', 'Fixed Plaintext Key', myPlainText])
cap.setParameter(['Key/Text Pattern', 'Fixed Encryption Key', myKey])

However, the textin.npy file has values like:


Why is ChipWhisperer Lite encrypting random text and not my specified plaintext?
Thank you.


Hmm… will check that. There is a huge update to the GIT repo right now, so it may have introduced bugs. I think your understanding is correct in how it “should” work, but something went wrong…



For what it’s worth, I’m using version 0.12RC1 from the website, not code pulled from the repo. Also, the CWCapture.pyw app shows the proper key and text values, despite not being in textin.npy.

Sorry on the slow response - I was trying to chase this down in the old version and still didn’t have success, is it still an issue? Is there a chance you can try a newer version, I’m not sure why this wouldn’t work as has been used for some time…


It’s working, I realised I had the wrong parameter. This ended up fixing it.

cap.setParameter(['Key/Text Pattern', 'Plaintext', 'Fixed'])

I actually have the same problem. I try to use the same fixed list of plaintexts with different encryption keys.
However, I don’t manage to feed the capture process with a list contained in a textin.npy. Is there a simple way to do that thanks to the configuration files (.cfg) or do we need to change the python capture script ?



Hi Pam,

I don’t think the ChipWhisperer Capture software can use a list of fixed plaintexts. The options are to use a single fixed plaintext of your choice or to use a random plaintext on every iteration. The textin.npy file is there so that you can tell which random plaintexts were used, which lets you implement side-channel attacks (in the ChipWhisperer Analyzer program or in your own Python scripts).

Basically, the Capture software supports known plaintext attacks, but not chosen plaintext attacks. Does that make sense?

Hi Greg, how are you? :slight_smile:

Actually its easy to do what he wants. He just need to create a new file, similar to:

It needs to extend AcqKeyTextPattern_Base and implement the relevant methods. Take a look at these links for more information:

Hey Adriel - I’m glad to be back!

This is definitely possible - I just mean that it’s not implemented yet! Feel free (Pam or anyone else) to add this feature to the Capture software :slight_smile: