Re: avr-crypto-lib

bg <[email protected]> Tue, 1 Jun 2021 16:02:31 +0200
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--DjU0kkEWUhaCqV8TFN6WlmGKJDrTseJ3a
Content-Type: multipart/mixed; boundary="Gv7eTQLnsZ813vzCeVUCXivUbsbUMBknh";
 protected-headers="v1"
From: bg <[email protected]>
To: =?UTF-8?B?UGF3ZcWCIFNp?= <[email protected]>,
 =?UTF-8?Q?BERTRAND_Jo=c3=abl?= <[email protected]>
Cc: AVR GCC List <[email protected]>
Message-ID: <[email protected]>
Subject: Re: avr-crypto-lib
References: <[email protected]>
 <CAPgZLFZKnxx_7eMUuDDJ=EcANMD_=d_3eP+YyGw26TkSq7aVmQ@mail.gmail.com>
 <[email protected]>
 <CAPgZLFaU1bmNobpK6LMs29po3FOqrmfFjYLhFPVe-FT6yCz-XQ@mail.gmail.com>
In-Reply-To: <CAPgZLFaU1bmNobpK6LMs29po3FOqrmfFjYLhFPVe-FT6yCz-XQ@mail.gmail.com>

--Gv7eTQLnsZ813vzCeVUCXivUbsbUMBknh
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable


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

1) Sorry for the delayed reply.

2) I'm somewhat lacking the time to improve and document avr-crypto-lib (=
this also caused item 1)

3) RSA was newer really stable, or of useable speed (even with 1024 bit k=
eys). Also the current implementation is lacking some important optimizat=
ions.

4) I used the VLA additions of C99 to avoid issues with heap allocation, =
but they bring some problems of their own.

5) You may find https://munacl.cryptojedi.org/atmega.shtml helpful.

I hope to find some spare time to get some stuff better documented and im=
proved (or remove what can't be fixed).

For short: I doubt that RSA on an AVR could be brought to a productive us=
e (maybe except for some cases where you are willing to wait minutes).

Best regards,
~  bg

--=20
bg nerilex
Daniel Otte
E-Mail: [email protected]
XMPP/Jabber: [email protected]
Matrix: @bg:nerilex.org
Mastodon: https://chaos.social/@bg
Phone: +49-152-03012876
Fingerprint: CB4E 915F ACAD EEC2 0D34  D266 2978 788D 0DB2 E18E



--Gv7eTQLnsZ813vzCeVUCXivUbsbUMBknh--

--DjU0kkEWUhaCqV8TFN6WlmGKJDrTseJ3a
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEy06RX6yt7sINNNJmKXh4jQ2y4Y4FAmC2PfcFAwAAAAAACgkQKXh4jQ2y4Y6F
GAgAqTa53Fzi0SBh503dJsrLBLUHPlDL8lp+fy4wxQ3R2pI/BdZX5+tz1TN3wF4U+ZvT1UtwvsMX
xu/17w3/Bu7+alAbUd3sUk5lxnutXzLUzeN+ypZP6/TD06JzsnTK3PNgnS24ZLohR29tftqlMnmB
4tKu+F2AkbI/UbpX0r80ivzWWOZ7gaqLZ2RxdHLeXhWWGOmZl5OW0Tjf4AGhe4HmtbvIyiJAlXsA
T8Uo1mgczeecSttgJsPI1UCZcn7A+AuJY63O2lJbpnO7+hHLkxS7mw4LSeUnoQnuY+tWjDs4KoxZ
t9l5J1bi1Im26lfpdUvJgrTSogcoZ2PZrwHYWJwJvA==
=r91t
-----END PGP SIGNATURE-----

--DjU0kkEWUhaCqV8TFN6WlmGKJDrTseJ3a--