-void testrun_selfenc(uint8_t* key, uint8_t* buffer){
- present_ctx_t ctx;
- uart_putstr_P(PSTR("\r\nkey : "));
- uart_hexdump(key, 10);
- uart_putstr_P(PSTR("\r\nplain : "));
- uart_hexdump(buffer, 8);
- present_init(key, 80, &ctx);
- present_enc(buffer, &ctx);
- uart_putstr_P(PSTR("\r\ncipher: "));
- uart_hexdump(buffer, 8);
- present_dec(buffer, &ctx);
- uart_putstr_P(PSTR("\r\nplain : "));
- uart_hexdump(buffer, 8);
- uart_putstr_P(PSTR("\r\n"));
+void testrun_selfenc_128(uint8_t *key, uint8_t *buffer){
+
+ present128_ctx_t ctx;
+ cli_putstr_P(PSTR("\r\nkey : "));
+ cli_hexdump(key, 16);
+ cli_putstr_P(PSTR("\r\nplain : "));
+ cli_hexdump(buffer, 8);
+ present128_init(key, 128, &ctx);
+ present128_enc(buffer, &ctx);
+ cli_putstr_P(PSTR("\r\ncipher: "));
+ cli_hexdump(buffer, 8);
+ present128_dec(buffer, &ctx);
+ cli_putstr_P(PSTR("\r\nplain : "));
+ cli_hexdump(buffer, 8);
+ cli_putstr_P(PSTR("\r\n"));