all repos — TinyCrypT @ 9f8c75e714c24a092ac14d4b964558c34ef1ff84

Short and sweet classical cryptographic primitives

45% of Bernstein et. al.'s performance
Juniper Beatitudes [email protected]
Mon, 05 Jan 2026 09:09:30 -0600
commit

9f8c75e714c24a092ac14d4b964558c34ef1ff84

parent

e5b1c87db934dfdcc965404d53ea3b2d4adc4134

1 files changed, 31 insertions(+), 0 deletions(-)

jump to
A test.c

@@ -0,0 +1,31 @@

+#include "tinycrypt/ed25519.h" +#include <stdint.h> + +static uint8_t SK4[] = { + 0x6d, 0xf9, 0x34, 0x0c, 0x13, 0x8c, 0xc1, 0x88, 0xb5, 0xfe, 0x44, + 0x64, 0xeb, 0xaa, 0x3f, 0x7f, 0xc2, 0x06, 0xa2, 0xd5, 0x5c, 0x34, + 0x34, 0x70, 0x7e, 0x74, 0xc9, 0xfc, 0x04, 0xe2, 0x0e, 0xbb, +}; +static uint8_t PK4[] = { + 0xc0, 0xda, 0xc1, 0x02, 0xc4, 0x53, 0x31, 0x86, 0xe2, 0x5d, 0xc4, + 0x31, 0x28, 0x47, 0x23, 0x53, 0xea, 0xab, 0xdb, 0x87, 0x8b, 0x15, + 0x2a, 0xeb, 0x8e, 0x00, 0x1f, 0x92, 0xd9, 0x02, 0x33, 0xa7, +}; +static uint8_t MSG4[] = { + 0x5f, + 0x4c, + 0x89, + 0x89, +}; + +int +main (int argc, char **argv) +{ + uint8_t signature[64]; + uint8_t working_buf[sizeof (MSG4) + 64]; + for (unsigned int i = 0; i < 10000; ++i) + { + tct_ed25519_sign (MSG4, sizeof (MSG4), SK4, PK4, working_buf, signature); + } + return 0; +}