How to customize input and output length?

Hi.

I need to implement a symmetric crypto which has 64-bit input and output and 128-bit key.
So, I change ‘simpleserial-aes.c’ like below:

uint8_t get_pt(uint8_t* pt)
{
	ENC(pt); /* encrypting the data block */

	simpleserial_put('r', 8, pt);
	return 0x00;
}

int main(void)
{
	uint8_t tmp[KEY_LENGTH] = {DEFAULT_KEY};

    platform_init();
    init_uart();
    trigger_setup();

	ROUND_KEY_GEN(tmp);

	simpleserial_init();
    simpleserial_addcmd('k', 16, get_key);
    simpleserial_addcmd('p', 8, get_pt);
    while(1)
        simpleserial_get();
}

Moreover, I changed jupyter notebook.

How can I solve this problem?

Try changing target.setOutuptLen = 8 to target.output_len = 8. As far as I can tell, setOutputLen and setTextLen are not properties, values, or methods of SimpleSerial.

Alex

I changed as you told me.

target.textlength = 8
target.output_len = 8

However, the problem does not solved.
Isn’t there any example to change text length?

I’d recommend just bypassing capture trace and doing the steps (sending key, arming, sending plaintext, capturing, creating trace) of capture_trace instead.

Alex