Hardware assisted AES crypto support

Post Reply
User avatar
venkatbo
Posts: 514
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 3 times
Contact:

Hardware assisted AES crypto support

Unread post by venkatbo » Sat Mar 23, 2019 1:35 am

There is a blurb in the following Feb 1st cnx article:
https://www.google.com/amp/s/www.cnx-so ... marks/amp/
that implies the cryto engine in N2's SOC may not be fully funtioning... any truth to that, wrt AES instructions, etc?.

User avatar
mad_ady
Posts: 5843
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 73 times
Been thanked: 41 times
Contact:

Re: Hardware assisted AES crypto support

Unread post by mad_ady » Sat Mar 23, 2019 1:44 am

How would one test?

User avatar
tobetter
Posts: 3288
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 17 times
Been thanked: 71 times
Contact:

Re: Hardware assisted AES crypto support

Unread post by tobetter » Sat Mar 23, 2019 1:50 am

The AES score in the article says the Single-Core Score is 63 and Multi-Core Score is 243, ODROID-N2 is marked 872 and 2927 recently after applying AES patches to Linux kernel 4.9.y.

Please find more detail regarding the same performance test.
https://browser.geekbench.com/v4/cpu/se ... q=odroidn2
Attachments
ODROID-N2-AES.png
ODROID-N2-AES.png (36.92 KiB) Viewed 461 times

User avatar
venkatbo
Posts: 514
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Hardware assisted AES crypto support

Unread post by venkatbo » Sat Mar 23, 2019 5:50 am

Good 10-fold increases... nice.

newbie06
Posts: 7
Joined: Fri Feb 01, 2019 8:15 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Hardware assisted AES crypto support

Unread post by newbie06 » Sun Mar 24, 2019 12:02 am

tobetter wrote:
Sat Mar 23, 2019 1:50 am
The AES score in the article says the Single-Core Score is 63 and Multi-Core Score is 243, ODROID-N2 is marked 872 and 2927 recently after applying AES patches to Linux kernel 4.9.y.

Please find more detail regarding the same performance test.
https://browser.geekbench.com/v4/cpu/se ... q=odroidn2
Are you sure it's due to a kernel patch? The result posted on CNX was with Geekbench 4.0.4 which did not support AES instructions for 32-bit ARM. This support was added with version 4.1.0. See this: https://www.primatelabs.com/release/geekbench4/

User avatar
tobetter
Posts: 3288
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 17 times
Been thanked: 71 times
Contact:

Re: Hardware assisted AES crypto support

Unread post by tobetter » Sun Mar 24, 2019 3:40 am

newbie06 wrote:
Sun Mar 24, 2019 12:02 am
tobetter wrote:
Sat Mar 23, 2019 1:50 am
The AES score in the article says the Single-Core Score is 63 and Multi-Core Score is 243, ODROID-N2 is marked 872 and 2927 recently after applying AES patches to Linux kernel 4.9.y.

Please find more detail regarding the same performance test.
https://browser.geekbench.com/v4/cpu/se ... q=odroidn2
Are you sure it's due to a kernel patch? The result posted on CNX was with Geekbench 4.0.4 which did not support AES instructions for 32-bit ARM. This support was added with version 4.1.0. See this: https://www.primatelabs.com/release/geekbench4/
Does this mean that Geekbench 4.0.4 support AES instructions for ARM64?
Your comment seems very reasonable which I have not noticed.
This link is been performed Geekbench 4.0.4 which you are saying AES instructions are not supported but it marked 1266 and 3753, and this comes later a patch is applied. Previously I've seen the same score which is shown in CNT article.
https://browser.geekbench.com/v4/cpu/12094230

newbie06
Posts: 7
Joined: Fri Feb 01, 2019 8:15 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Hardware assisted AES crypto support

Unread post by newbie06 » Sun Mar 24, 2019 7:59 am

tobetter wrote:
Sun Mar 24, 2019 3:40 am
newbie06 wrote:
Sun Mar 24, 2019 12:02 am
tobetter wrote:
Sat Mar 23, 2019 1:50 am
The AES score in the article says the Single-Core Score is 63 and Multi-Core Score is 243, ODROID-N2 is marked 872 and 2927 recently after applying AES patches to Linux kernel 4.9.y.

Please find more detail regarding the same performance test.
https://browser.geekbench.com/v4/cpu/se ... q=odroidn2
Are you sure it's due to a kernel patch? The result posted on CNX was with Geekbench 4.0.4 which did not support AES instructions for 32-bit ARM. This support was added with version 4.1.0. See this: https://www.primatelabs.com/release/geekbench4/
Does this mean that Geekbench 4.0.4 support AES instructions for ARM64?
Your comment seems very reasonable which I have not noticed.
Yes. If for instance you look at this result for a SoC using a Cortex-A73, you'll see that the AES score is high which shows that GB 4.0.4 is using the AES instructions: https://browser.geekbench.com/v4/cpu/9723714
This link is been performed Geekbench 4.0.4 which you are saying AES instructions are not supported but it marked 1266 and 3753, and this comes later a patch is applied. Previously I've seen the same score which is shown in CNT article.
https://browser.geekbench.com/v4/cpu/12094230
I'm not sure I understand what you mean. The AES score is very low on the link you quote because the AES benchmark was done 100% in software rather than using AArch32 AES instructions.

User avatar
tobetter
Posts: 3288
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 17 times
Been thanked: 71 times
Contact:

Re: Hardware assisted AES crypto support

Unread post by tobetter » Sun Mar 24, 2019 2:09 pm

@newbie06, indeed your comment is reasonable while my understanding of AES Android support is wrong.
I've received one patch from AMLogic regarding AES improvement while discussing the Geenbench AES score and after the patch, the score is significantly improved and other AES quick test was either. Actually, I didn't get why the patch can improve the performance since it's not a code change, but that happens.
Anyway, the good thing is that we have better AES scores and other AES performance test marks reasonable.
Sorry, if I made a confusion.

newbie06
Posts: 7
Joined: Fri Feb 01, 2019 8:15 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Hardware assisted AES crypto support

Unread post by newbie06 » Sun Mar 24, 2019 11:16 pm

tobetter wrote:
Sun Mar 24, 2019 2:09 pm
@newbie06, indeed your comment is reasonable while my understanding of AES Android support is wrong.
I've received one patch from AMLogic regarding AES improvement while discussing the Geenbench AES score and after the patch, the score is significantly improved and other AES quick test was either. Actually, I didn't get why the patch can improve the performance since it's not a code change, but that happens.
Anyway, the good thing is that we have better AES scores and other AES performance test marks reasonable.
Sorry, if I made a confusion.
That's quite intriguing!

Can you share the patch? Does it improve score only for Geekbench 4.0.4? Does it improve score only for 32-bit Geekbench?

The only explanation I can think of at the moment, is that their kernel/libs failed at letting apps know they are running with a CPU with AES hardware support (through hwcaps). But in that case, that'd not affect Geekbench 4.0.4 32-bit anyway.

PS - When I say AES hardware, I mean ARM AES instructions :)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests