Re: AES Encryption Took Too Long on Arm64 Embedded Machine

Catherine Issabel <[email protected]> Thu, 2 Nov 2023 11:25:18 -0700 (PDT)
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <[email protected]>
------=_Part_6510_1893345423.1698949518906
Content-Type: multipart/alternative; 
	boundary="----=_Part_6511_1504996862.1698949518906"

------=_Part_6511_1504996862.1698949518906
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


$500 million dollars available only for good and trusted receiver or=20
mandate=20
Kindly contact the sender for more information:+1 (336) 345-9681
On Friday, May 12, 2023 at 7:09:38=E2=80=AFPM UTC+1 Jeffrey Walton wrote:

> On Fri, May 12, 2023 at 1:09=E2=80=AFPM Dwight Kulkarni <dwi...@realtime-=
7.com>=20
> wrote:
> >
> > Update: It seems to be an issue with CFB mode. If I switch to ECB: 12 m=
s=20
> to process the workload.
> >
> > in encrypt aes
> > Encrypted 1at: 05/12/2023 17:06:54.838
> > Encrypted 2at: 05/12/2023 17:06:54.838
> > Encrypted 3at: 05/12/2023 17:06:54.838
> > returning cipher
> > Encrypted 4at: 05/12/2023 17:06:54.850
>
> Yeah, CFB mode is a hard mode in software. The software is effectively
> providing a linear feedback shift register, and it does a lot of
> [non-accelerated] bit twiddling. That's why it needs 4+ cycles to
> process a byte.
>
> I think you would have better results with GCM mode. First, GCM mode
> is an authenticated encryption mode, so you get authenticity
> assurances over the ciphertext. Second, you get hardware acceleration
> with both the bulk cipher encryption (AES), and the mac over the
> ciphertext (GMAC).
>
> Also see https://www.cryptopp.com/wiki/Authenticated_Encryption .
>
> Jeff
>

--=20
You received this message because you are subscribed to the Google Groups "=
Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/=
cryptopp-users/3bd37ee9-859d-41f2-841a-9b5cf32e14dcn%40googlegroups.com.

------=_Part_6511_1504996862.1698949518906
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<br />$500 million dollars available only for good and trusted receiver or =
mandate <br />Kindly contact the sender for more information:+1 (336) 345-9=
681<br /><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">=
On Friday, May 12, 2023 at 7:09:38=E2=80=AFPM UTC+1 Jeffrey Walton wrote:<b=
r/></div><blockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; bo=
rder-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Fri, May 12=
, 2023 at 1:09=E2=80=AFPM Dwight Kulkarni &lt;<a href data-email-masked rel=
=3D"nofollow">[email protected]</a>&gt; wrote:
<br>&gt;
<br>&gt; Update: It seems to be an issue with CFB mode. If I switch to ECB:=
 12 ms to process the workload.
<br>&gt;
<br>&gt;  in encrypt aes
<br>&gt;  Encrypted 1at: 05/12/2023 17:06:54.838
<br>&gt;  Encrypted 2at: 05/12/2023 17:06:54.838
<br>&gt;  Encrypted 3at: 05/12/2023 17:06:54.838
<br>&gt;  returning cipher
<br>&gt;  Encrypted 4at: 05/12/2023 17:06:54.850
<br>
<br>Yeah, CFB mode is a hard mode in software. The software is effectively
<br>providing a linear feedback shift register, and it does a lot of
<br>[non-accelerated] bit twiddling. That&#39;s why it needs 4+ cycles to
<br>process a byte.
<br>
<br>I think you would have better results with GCM mode. First, GCM mode
<br>is an authenticated encryption mode, so you get authenticity
<br>assurances over the ciphertext. Second, you get hardware acceleration
<br>with both the bulk cipher encryption (AES), and the mac over the
<br>ciphertext (GMAC).
<br>
<br>Also see <a href=3D"https://www.cryptopp.com/wiki/Authenticated_Encrypt=
ion" target=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://www=
.google.com/url?hl=3Den&amp;q=3Dhttps://www.cryptopp.com/wiki/Authenticated=
_Encryption&amp;source=3Dgmail&amp;ust=3D1699035892901000&amp;usg=3DAOvVaw1=
A-5-VvaveyacBzCQcBhU_">https://www.cryptopp.com/wiki/Authenticated_Encrypti=
on</a> .
<br>
<br>Jeff
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Crypto++ Users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">cryp=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/cryptopp-users/3bd37ee9-859d-41f2-841a-9b5cf32e14dcn%40googlegro=
ups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d=
/msgid/cryptopp-users/3bd37ee9-859d-41f2-841a-9b5cf32e14dcn%40googlegroups.=
com</a>.<br />

------=_Part_6511_1504996862.1698949518906--

------=_Part_6510_1893345423.1698949518906--