newaetech / chipwhisperer

ChipWhisperer - the complete open-source toolchain for side-channel power analysis and glitching attacks
http://chipwhisperer.com
Other
1.13k stars 285 forks source link

Configure target output length #264

Closed adelapie closed 4 years ago

adelapie commented 4 years ago

Hello,

Modifying a target to change the ciphertext length e.g.

target.setOutputLen(8)

does not work since line 294 in https://github.com/newaetech/chipwhisperer/blob/develop/software/chipwhisperer/__init__.py says:

response = target.simpleserial_read('r', 16, ack=ack) so it always captures 16 bytes. Perhaps should it be like response = target.simpleserial_read('r', target.outputLen(), ack=ack) instead ?

alex-dewar commented 4 years ago

Fixed in ca96aaf543bed67b43296fbd59af4b0549f5be2d. Output length can now be changed by accessing target.output_len (i.e. target.output_len = 8).