wt., 1 cze 2021 o 08:37 BERTRAND Joël <joel.bertr...@systella.fr>
napisał(a):

> RSA doesn't run as expected. With expopent=3 and length=512, program
> doesn't crash but after four hours (@ 16 MHz on simavr), gdb shows that
> program stays in RSA subroutines and doesn't return to main routine.
> Something is probably broken somewhere.
>

try to replace in the example above:
  /* add your fix here */
with:
  bigint_adjust(&data);
  bigint_adjust(&public->exponent);
  bigint_adjust(&public->modulus);

The computation takes 4 seconds on my laptop.
Note that the "I" value changes (from I=0.. to):
   BIGINT: 0x40f5..
   L=14..
   I=6..

I've tried to find a "HOWTO use avr-crypto-lib" documentation,
but I couldn't find any, which is a little worrying (maybe I didn't try
hard enough).
If there is no documentation reading the source code and test code is an
option.



>
> I have found a uECC library but I don't understand how use this library
> to encrypt data (I think I have understand how I can sign data).
>
> Best regards,
>
> JB
>

Reply via email to