mbox series

[PATCHv1,0/3] Enable crypto module on Amlogic GXBB SoC platform

Message ID 20191211084112.971-1-linux.amoon@gmail.com
Headers show
Series Enable crypto module on Amlogic GXBB SoC platform | expand

Message

Anand Moon Dec. 11, 2019, 8:41 a.m. UTC
Below changes enable cryto module on Amlogic GXBB SoC.

I was realy happy to get this feature working on Odroid C2 SBC.
I will try on other SBC in the future.

Tested with loading tcrypt module.
# sudo modprobe tcrypt sec=1 mode=200
[sudo] password for alarm:
[  903.867059] tcrypt:
[  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
[  903.870265] tcrypt: test 0 (128 bit key, 16 byte blocks): 1922107 operations in 1 seconds (30753712 bytes)
[  904.872802] tcrypt: test 1 (128 bit key, 64 byte blocks): 679032 operations in 1 seconds (43458048 bytes)
[  905.872717] tcrypt: test 2 (128 bit key, 256 byte blocks): 190190 operations in 1 seconds (48688640 bytes)
[  906.872793] tcrypt: test 3 (128 bit key, 1024 byte blocks): 49014 operations in 1 seconds (50190336 bytes)
[  907.872808] tcrypt: test 4 (128 bit key, 1472 byte blocks): 34342 operations in 1 seconds (50551424 bytes)
[  908.876828] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6199 operations in 1 seconds (50782208 bytes)

-Anand

Anand Moon (3):
  arm64: dts: amlogic: adds crypto hardware node for GXBB SoCs
  dt-bindings: crypto: Add compatible string for amlogic GXBB SoC
  crypto: amlogic: Add new compatible string for amlogic GXBB SoC

 .../devicetree/bindings/crypto/amlogic,gxl-crypto.yaml |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi            | 10 ++++++++++
 drivers/crypto/amlogic/amlogic-gxl-core.c              |  1 +
 3 files changed, 12 insertions(+)

Comments

Neil Armstrong Dec. 11, 2019, 8:53 a.m. UTC | #1
hi,


On 11/12/2019 09:41, Anand Moon wrote:
> Below changes enable cryto module on Amlogic GXBB SoC.
> 
> I was realy happy to get this feature working on Odroid C2 SBC.
> I will try on other SBC in the future.
> 
> Tested with loading tcrypt module.
> # sudo modprobe tcrypt sec=1 mode=200
> [sudo] password for alarm:
> [  903.867059] tcrypt:
> [  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
> [  903.870265] tcrypt: test 0 (128 bit key, 16 byte blocks): 1922107 operations in 1 seconds (30753712 bytes)
> [  904.872802] tcrypt: test 1 (128 bit key, 64 byte blocks): 679032 operations in 1 seconds (43458048 bytes)
> [  905.872717] tcrypt: test 2 (128 bit key, 256 byte blocks): 190190 operations in 1 seconds (48688640 bytes)
> [  906.872793] tcrypt: test 3 (128 bit key, 1024 byte blocks): 49014 operations in 1 seconds (50190336 bytes)
> [  907.872808] tcrypt: test 4 (128 bit key, 1472 byte blocks): 34342 operations in 1 seconds (50551424 bytes)
> [  908.876828] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6199 operations in 1 seconds (50782208 bytes)
> 
> -Anand
> 
> Anand Moon (3):
>   arm64: dts: amlogic: adds crypto hardware node for GXBB SoCs
>   dt-bindings: crypto: Add compatible string for amlogic GXBB SoC
>   crypto: amlogic: Add new compatible string for amlogic GXBB SoC
> 
>  .../devicetree/bindings/crypto/amlogic,gxl-crypto.yaml |  1 +
>  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi            | 10 ++++++++++
>  drivers/crypto/amlogic/amlogic-gxl-core.c              |  1 +
>  3 files changed, 12 insertions(+)
> 

Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
vendor BSPs, in Linux, U-Boot and ATF chain.

Could you run more tests to be sure it's really functional ?

Neil
Herbert Xu Dec. 11, 2019, 9:27 a.m. UTC | #2
On Wed, Dec 11, 2019 at 09:53:56AM +0100, Neil Armstrong wrote:
> 
> On 11/12/2019 09:41, Anand Moon wrote:
> > [sudo] password for alarm:
> > [  903.867059] tcrypt:
> > [  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
> 
> Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
> vendor BSPs, in Linux, U-Boot and ATF chain.
> 
> Could you run more tests to be sure it's really functional ?

Well as you can see from the tcrypt output, it's actually using
aes-arm64 which is certainly not the amlogic driver.  Presumably
the amlogic driver failed to load/register.

Cheers,
Neil Armstrong Dec. 11, 2019, 9:32 a.m. UTC | #3
On 11/12/2019 10:27, Herbert Xu wrote:
> On Wed, Dec 11, 2019 at 09:53:56AM +0100, Neil Armstrong wrote:
>>
>> On 11/12/2019 09:41, Anand Moon wrote:
>>> [sudo] password for alarm:
>>> [  903.867059] tcrypt:
>>> [  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
>>
>> Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
>> vendor BSPs, in Linux, U-Boot and ATF chain.
>>
>> Could you run more tests to be sure it's really functional ?
> 
> Well as you can see from the tcrypt output, it's actually using
> aes-arm64 which is certainly not the amlogic driver.  Presumably
> the amlogic driver failed to load/register.

Nice catch... thanks Herbert.

Neil

> 
> Cheers,
>
Anand Moon Dec. 11, 2019, 9:37 a.m. UTC | #4
Hi Neil,

On Wed, 11 Dec 2019 at 14:23, Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> hi,
>
>
> On 11/12/2019 09:41, Anand Moon wrote:
> > Below changes enable cryto module on Amlogic GXBB SoC.
> >
> > I was realy happy to get this feature working on Odroid C2 SBC.
> > I will try on other SBC in the future.
> >
> > Tested with loading tcrypt module.
> > # sudo modprobe tcrypt sec=1 mode=200
> > [sudo] password for alarm:
> > [  903.867059] tcrypt:
> > [  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
> > [  903.870265] tcrypt: test 0 (128 bit key, 16 byte blocks): 1922107 operations in 1 seconds (30753712 bytes)
> > [  904.872802] tcrypt: test 1 (128 bit key, 64 byte blocks): 679032 operations in 1 seconds (43458048 bytes)
> > [  905.872717] tcrypt: test 2 (128 bit key, 256 byte blocks): 190190 operations in 1 seconds (48688640 bytes)
> > [  906.872793] tcrypt: test 3 (128 bit key, 1024 byte blocks): 49014 operations in 1 seconds (50190336 bytes)
> > [  907.872808] tcrypt: test 4 (128 bit key, 1472 byte blocks): 34342 operations in 1 seconds (50551424 bytes)
> > [  908.876828] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6199 operations in 1 seconds (50782208 bytes)
> >
> > -Anand
> >
> > Anand Moon (3):
> >   arm64: dts: amlogic: adds crypto hardware node for GXBB SoCs
> >   dt-bindings: crypto: Add compatible string for amlogic GXBB SoC
> >   crypto: amlogic: Add new compatible string for amlogic GXBB SoC
> >
> >  .../devicetree/bindings/crypto/amlogic,gxl-crypto.yaml |  1 +
> >  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi            | 10 ++++++++++
> >  drivers/crypto/amlogic/amlogic-gxl-core.c              |  1 +
> >  3 files changed, 12 insertions(+)
> >
>
> Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
> vendor BSPs, in Linux, U-Boot and ATF chain.

Sorry I was not aware of this. :$

>
> Could you run more tests to be sure it's really functional ?
>
> Neil

From the public datasheet for Odroid C2 [0] S905_Public_Datasheet_V1.1.4.pdf
Chapter 27.1 : "crypto engine is one encrypt/decrypt function accelerator"

AES block cipher with 128/192/256 Bits keys, standard 16 bytes block
size and streaming ECB, CBC and CTR modes
DES/TDES block cipher with ECB and CBC modes supporting 64 Bits key
for DES and 192 Bits key for 3DES
Hardware key-ladder operation and DVB-CSA for transport stream encryption
Built-in hardware True Random Number Generator (TRNG), CRC and
SHA-1/SHA-2 (SHA-224/SHA-256) engine

But in my testing I did not see any count increment in /proc/interrupts

 32:          0          0          0          0     GICv2 201 Level     ppmmu2
 33:          0          0          0          0     GICv2  35 Edge      meson
 34:          0          0          0          0     GICv2  89 Edge
  dw_hdmi_top_irq, c883a000.hdmi-tx
 35:          0          0          0          0     GICv2 220 Edge
  gxl-crypto
 36:          0          0          0          0     GICv2 221 Edge
  gxl-crypto

[0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf

Attach is the some testing. *But not sure this is Hardware Accelerated.* :<

-Anand
# sudo modprobe tcrypt sec=1 mode=200
[sudo] password for alarm:
[  384.901049] tcrypt:
[  384.901049] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
[  384.904181] tcrypt: test 0 (128 bit key, 16 byte blocks): 1877504 operations in 1 seconds (30040064 bytes)
[  385.904322] tcrypt: test 1 (128 bit key, 64 byte blocks): 667190 operations in 1 seconds (42700160 bytes)
[  386.908223] tcrypt: test 2 (128 bit key, 256 byte blocks): 186089 operations in 1 seconds (47638784 bytes)
[  387.908341] tcrypt: test 3 (128 bit key, 1024 byte blocks): 48142 operations in 1 seconds (49297408 bytes)
[  388.912326] tcrypt: test 4 (128 bit key, 1472 byte blocks): 33605 operations in 1 seconds (49466560 bytes)
[  389.916322] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6075 operations in 1 seconds (49766400 bytes)
[  390.920350] tcrypt: test 6 (192 bit key, 16 byte blocks): 1681618 operations in 1 seconds (26905888 bytes)
[  391.924306] tcrypt: test 7 (192 bit key, 64 byte blocks): 572487 operations in 1 seconds (36639168 bytes)
[  392.924229] tcrypt: test 8 (192 bit key, 256 byte blocks): 158200 operations in 1 seconds (40499200 bytes)
[  393.924325] tcrypt: test 9 (192 bit key, 1024 byte blocks): 40774 operations in 1 seconds (41752576 bytes)
[  394.928323] tcrypt: test 10 (192 bit key, 1472 byte blocks): 28442 operations in 1 seconds (41866624 bytes)
[  395.932438] tcrypt: test 11 (192 bit key, 8192 byte blocks): 5110 operations in 1 seconds (41861120 bytes)
[  396.936356] tcrypt: test 12 (256 bit key, 16 byte blocks): 1544471 operations in 1 seconds (24711536 bytes)
[  397.940415] tcrypt: test 13 (256 bit key, 64 byte blocks): 508196 operations in 1 seconds (32524544 bytes)
[  398.944314] tcrypt: test 14 (256 bit key, 256 byte blocks): 138350 operations in 1 seconds (35417600 bytes)
[  399.948417] tcrypt: test 15 (256 bit key, 1024 byte blocks): 35362 operations in 1 seconds (36210688 bytes)
[  400.952430] tcrypt: test 16 (256 bit key, 1472 byte blocks): 24655 operations in 1 seconds (36292160 bytes)
[  401.956447] tcrypt: test 17 (256 bit key, 8192 byte blocks): 4453 operations in 1 seconds (36478976 bytes)
[  402.960408] tcrypt:
[  402.960408] testing speed of async ecb(aes) (ecb(aes-arm64)) decryption
[  402.969098] tcrypt: test 0 (128 bit key, 16 byte blocks): 1890540 operations in 1 seconds (30248640 bytes)
[  403.972318] tcrypt: test 1 (128 bit key, 64 byte blocks): 679436 operations in 1 seconds (43483904 bytes)
[  404.976233] tcrypt: test 2 (128 bit key, 256 byte blocks): 190826 operations in 1 seconds (48851456 bytes)
[  405.976319] tcrypt: test 3 (128 bit key, 1024 byte blocks): 49490 operations in 1 seconds (50677760 bytes)
[  406.980341] tcrypt: test 4 (128 bit key, 1472 byte blocks): 34562 operations in 1 seconds (50875264 bytes)
[  407.984339] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6224 operations in 1 seconds (50987008 bytes)
[  408.988289] tcrypt: test 6 (192 bit key, 16 byte blocks): 1717604 operations in 1 seconds (27481664 bytes)
[  409.988314] tcrypt: test 7 (192 bit key, 64 byte blocks): 594595 operations in 1 seconds (38054080 bytes)
[  410.988236] tcrypt: test 8 (192 bit key, 256 byte blocks): 165116 operations in 1 seconds (42269696 bytes)
[  411.988338] tcrypt: test 9 (192 bit key, 1024 byte blocks): 42620 operations in 1 seconds (43642880 bytes)
[  412.992339] tcrypt: test 10 (192 bit key, 1472 byte blocks): 29735 operations in 1 seconds (43769920 bytes)
[  413.996418] tcrypt: test 11 (192 bit key, 8192 byte blocks): 5341 operations in 1 seconds (43753472 bytes)
[  415.000385] tcrypt: test 12 (256 bit key, 16 byte blocks): 1583219 operations in 1 seconds (25331504 bytes)
[  416.004412] tcrypt: test 13 (256 bit key, 64 byte blocks): 526675 operations in 1 seconds (33707200 bytes)
[  417.008337] tcrypt: test 14 (256 bit key, 256 byte blocks): 143999 operations in 1 seconds (36863744 bytes)
[  418.012424] tcrypt: test 15 (256 bit key, 1024 byte blocks): 36859 operations in 1 seconds (37743616 bytes)
[  419.016425] tcrypt: test 16 (256 bit key, 1472 byte blocks): 25704 operations in 1 seconds (37836288 bytes)
[  420.020444] tcrypt: test 17 (256 bit key, 8192 byte blocks): 4635 operations in 1 seconds (37969920 bytes)
[  421.036729] tcrypt:
[  421.036729] testing speed of async cbc(aes) (cbc(aes-arm64)) encryption
[  421.039861] tcrypt: test 0 (128 bit key, 16 byte blocks): 1784200 operations in 1 seconds (28547200 bytes)
[  422.040331] tcrypt: test 1 (128 bit key, 64 byte blocks): 625414 operations in 1 seconds (40026496 bytes)
[  423.044246] tcrypt: test 2 (128 bit key, 256 byte blocks): 173953 operations in 1 seconds (44531968 bytes)
[  424.044348] tcrypt: test 3 (128 bit key, 1024 byte blocks): 44977 operations in 1 seconds (46056448 bytes)
[  425.048334] tcrypt: test 4 (128 bit key, 1472 byte blocks): 31386 operations in 1 seconds (46200192 bytes)
[  426.052346] tcrypt: test 5 (128 bit key, 8192 byte blocks): 5664 operations in 1 seconds (46399488 bytes)
[  427.056395] tcrypt: test 6 (192 bit key, 16 byte blocks): 1612521 operations in 1 seconds (25800336 bytes)
[  428.060330] tcrypt: test 7 (192 bit key, 64 byte blocks): 542315 operations in 1 seconds (34708160 bytes)
[  429.060253] tcrypt: test 8 (192 bit key, 256 byte blocks): 149436 operations in 1 seconds (38255616 bytes)
[  430.060346] tcrypt: test 9 (192 bit key, 1024 byte blocks): 38477 operations in 1 seconds (39400448 bytes)
[  431.064346] tcrypt: test 10 (192 bit key, 1472 byte blocks): 26838 operations in 1 seconds (39505536 bytes)
[  432.068443] tcrypt: test 11 (192 bit key, 8192 byte blocks): 4818 operations in 1 seconds (39469056 bytes)
[  433.072385] tcrypt: test 12 (256 bit key, 16 byte blocks): 1480227 operations in 1 seconds (23683632 bytes)
[  434.076429] tcrypt: test 13 (256 bit key, 64 byte blocks): 483284 operations in 1 seconds (30930176 bytes)
[  435.080339] tcrypt: test 14 (256 bit key, 256 byte blocks): 131557 operations in 1 seconds (33678592 bytes)
[  436.084426] tcrypt: test 15 (256 bit key, 1024 byte blocks): 33620 operations in 1 seconds (34426880 bytes)
[  437.088434] tcrypt: test 16 (256 bit key, 1472 byte blocks): 23442 operations in 1 seconds (34506624 bytes)
[  438.092438] tcrypt: test 17 (256 bit key, 8192 byte blocks): 4227 operations in 1 seconds (34627584 bytes)
[  439.096564] tcrypt:
[  439.096564] testing speed of async cbc(aes) (cbc(aes-arm64)) decryption
[  439.105257] tcrypt: test 0 (128 bit key, 16 byte blocks): 1720992 operations in 1 seconds (27535872 bytes)
[  440.108343] tcrypt: test 1 (128 bit key, 64 byte blocks): 627860 operations in 1 seconds (40183040 bytes)
[  441.112259] tcrypt: test 2 (128 bit key, 256 byte blocks): 176810 operations in 1 seconds (45263360 bytes)
[  442.112360] tcrypt: test 3 (128 bit key, 1024 byte blocks): 45973 operations in 1 seconds (47076352 bytes)
[  443.116362] tcrypt: test 4 (128 bit key, 1472 byte blocks): 32147 operations in 1 seconds (47320384 bytes)
[  444.120381] tcrypt: test 5 (128 bit key, 8192 byte blocks): 5803 operations in 1 seconds (47538176 bytes)
[  445.124299] tcrypt: test 6 (192 bit key, 16 byte blocks): 1558792 operations in 1 seconds (24940672 bytes)
[  446.124360] tcrypt: test 7 (192 bit key, 64 byte blocks): 546578 operations in 1 seconds (34980992 bytes)
[  447.128265] tcrypt: test 8 (192 bit key, 256 byte blocks): 151914 operations in 1 seconds (38889984 bytes)
[  448.128357] tcrypt: test 9 (192 bit key, 1024 byte blocks): 39255 operations in 1 seconds (40197120 bytes)
[  449.132376] tcrypt: test 10 (192 bit key, 1472 byte blocks): 27396 operations in 1 seconds (40326912 bytes)
[  450.136438] tcrypt: test 11 (192 bit key, 8192 byte blocks): 4918 operations in 1 seconds (40288256 bytes)
[  451.140545] tcrypt: test 12 (256 bit key, 16 byte blocks): 1436091 operations in 1 seconds (22977456 bytes)
[  452.144443] tcrypt: test 13 (256 bit key, 64 byte blocks): 484903 operations in 1 seconds (31033792 bytes)
[  453.148351] tcrypt: test 14 (256 bit key, 256 byte blocks): 133471 operations in 1 seconds (34168576 bytes)
[  454.152444] tcrypt: test 15 (256 bit key, 1024 byte blocks): 34219 operations in 1 seconds (35040256 bytes)
[  455.156447] tcrypt: test 16 (256 bit key, 1472 byte blocks): 23861 operations in 1 seconds (35123392 bytes)
[  456.160492] tcrypt: test 17 (256 bit key, 8192 byte blocks): 4304 operations in 1 seconds (35258368 bytes)
[  457.176263] tcrypt: failed to load transform for lrw(aes): -2
[  457.188096] tcrypt: failed to load transform for lrw(aes): -2
[  457.200097] tcrypt: failed to load transform for xts(aes): -2
[  457.212102] tcrypt: failed to load transform for xts(aes): -2
[  457.224067] tcrypt: failed to load transform for cts(cbc(aes)): -2
[  457.236390] tcrypt: failed to load transform for cts(cbc(aes)): -2
[  457.236944] tcrypt:
[  457.236944] testing speed of async ctr(aes) (ctr-aes-neonbs) encryption
[  457.245668] tcrypt: test 0 (128 bit key, 16 byte blocks): 564743 operations in 1 seconds (9035888 bytes)
[  458.248185] tcrypt: test 1 (128 bit key, 64 byte blocks): 557690 operations in 1 seconds (35692160 bytes)
[  459.248274] tcrypt: test 2 (128 bit key, 256 byte blocks): 300277 operations in 1 seconds (76870912 bytes)
[  460.248355] tcrypt: test 3 (128 bit key, 1024 byte blocks): 81277 operations in 1 seconds (83227648 bytes)
[  461.252368] tcrypt: test 4 (128 bit key, 1472 byte blocks): 54691 operations in 1 seconds (80505152 bytes)
[  462.256378] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10223 operations in 1 seconds (83746816 bytes)
[  463.260420] tcrypt: test 6 (192 bit key, 16 byte blocks): 490239 operations in 1 seconds (7843824 bytes)
[  464.264182] tcrypt: test 7 (192 bit key, 64 byte blocks): 483660 operations in 1 seconds (30954240 bytes)
[  465.264268] tcrypt: test 8 (192 bit key, 256 byte blocks): 257253 operations in 1 seconds (65856768 bytes)
[  466.264354] tcrypt: test 9 (192 bit key, 1024 byte blocks): 68568 operations in 1 seconds (70213632 bytes)
[  467.264369] tcrypt: test 10 (192 bit key, 1472 byte blocks): 46270 operations in 1 seconds (68109440 bytes)
[  468.268457] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8647 operations in 1 seconds (70836224 bytes)
[  469.272409] tcrypt: test 12 (256 bit key, 16 byte blocks): 432474 operations in 1 seconds (6919584 bytes)
[  470.276272] tcrypt: test 13 (256 bit key, 64 byte blocks): 426459 operations in 1 seconds (27293376 bytes)
[  471.276374] tcrypt: test 14 (256 bit key, 256 byte blocks): 226683 operations in 1 seconds (58030848 bytes)
[  472.280463] tcrypt: test 15 (256 bit key, 1024 byte blocks): 59935 operations in 1 seconds (61373440 bytes)
[  473.284465] tcrypt: test 16 (256 bit key, 1472 byte blocks): 40300 operations in 1 seconds (59321600 bytes)
[  474.288465] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7537 operations in 1 seconds (61743104 bytes)
[  475.292462] tcrypt:
[  475.292462] testing speed of async ctr(aes) (ctr-aes-neonbs) decryption
[  475.301157] tcrypt: test 0 (128 bit key, 16 byte blocks): 564970 operations in 1 seconds (9039520 bytes)
[  476.304200] tcrypt: test 1 (128 bit key, 64 byte blocks): 557619 operations in 1 seconds (35687616 bytes)
[  477.304276] tcrypt: test 2 (128 bit key, 256 byte blocks): 300072 operations in 1 seconds (76818432 bytes)
[  478.304377] tcrypt: test 3 (128 bit key, 1024 byte blocks): 81259 operations in 1 seconds (83209216 bytes)
[  479.308379] tcrypt: test 4 (128 bit key, 1472 byte blocks): 54690 operations in 1 seconds (80503680 bytes)
[  480.312380] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10218 operations in 1 seconds (83705856 bytes)
[  481.316446] tcrypt: test 6 (192 bit key, 16 byte blocks): 490189 operations in 1 seconds (7843024 bytes)
[  482.320197] tcrypt: test 7 (192 bit key, 64 byte blocks): 483675 operations in 1 seconds (30955200 bytes)
[  483.320282] tcrypt: test 8 (192 bit key, 256 byte blocks): 257068 operations in 1 seconds (65809408 bytes)
[  484.320384] tcrypt: test 9 (192 bit key, 1024 byte blocks): 68848 operations in 1 seconds (70500352 bytes)
[  485.324370] tcrypt: test 10 (192 bit key, 1472 byte blocks): 46276 operations in 1 seconds (68118272 bytes)
[  486.328464] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8647 operations in 1 seconds (70836224 bytes)
[  487.332484] tcrypt: test 12 (256 bit key, 16 byte blocks): 432371 operations in 1 seconds (6917936 bytes)
[  488.336290] tcrypt: test 13 (256 bit key, 64 byte blocks): 427577 operations in 1 seconds (27364928 bytes)
[  489.336384] tcrypt: test 14 (256 bit key, 256 byte blocks): 226940 operations in 1 seconds (58096640 bytes)
[  490.340475] tcrypt: test 15 (256 bit key, 1024 byte blocks): 60023 operations in 1 seconds (61463552 bytes)
[  491.344472] tcrypt: test 16 (256 bit key, 1472 byte blocks): 40299 operations in 1 seconds (59320128 bytes)
[  492.348464] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7535 operations in 1 seconds (61726720 bytes)
[  493.364241] tcrypt: failed to load transform for cfb(aes): -2
[  493.376530] tcrypt: failed to load transform for cfb(aes): -2


[alarm@alarm ~]$ cat /proc/crypto
name         : cbc(aes)
driver       : cbc(aes-arm64)
module       : kernel
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : ecb(aes)
driver       : ecb(aes-arm64)
module       : kernel
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 16

name         : xts(aes)
driver       : xts-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 32
max keysize  : 64
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : ctr(aes)
driver       : ctr-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : cbc(aes)
driver       : cbc-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : ecb(aes)
driver       : ecb-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 16

name         : __xts(aes)
driver       : __xts-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 32
max keysize  : 64
ivsize       : 16
chunksize    : 16
walksize     : 128

name         : ctr(aes)
driver       : ctr-aes-neonbs
module       : aes_neon_bs
priority     : 249
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : no
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 128

name         : __ctr(aes)
driver       : __ctr-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 128

name         : __cbc(aes)
driver       : __cbc-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 128

name         : __ecb(aes)
driver       : __ecb-aes-neonbs
module       : aes_neon_bs
priority     : 250
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 128

name         : essiv(cbc(aes),sha256)
driver       : essiv-cbc-aes-sha256-neon
module       : aes_neon_blk
priority     : 201
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : cts(cbc(aes))
driver       : cts-cbc-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : xts(aes)
driver       : xts-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 32
max keysize  : 64
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : ctr(aes)
driver       : ctr-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : cbc(aes)
driver       : cbc-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : ecb(aes)
driver       : ecb-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 16

name         : cbcmac(aes)
driver       : cbcmac-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 16

name         : xcbc(aes)
driver       : xcbc-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 16
digestsize   : 16

name         : cmac(aes)
driver       : cmac-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 16
digestsize   : 16

name         : __essiv(cbc(aes),sha256)
driver       : __essiv-cbc-aes-sha256-neon
module       : aes_neon_blk
priority     : 201
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : __cts(cbc(aes))
driver       : __cts-cbc-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 32

name         : __xts(aes)
driver       : __xts-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 32
max keysize  : 64
ivsize       : 16
chunksize    : 16
walksize     : 32

name         : ctr(aes)
driver       : ctr-aes-neon
module       : aes_neon_blk
priority     : 199
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : no
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : __ctr(aes)
driver       : __ctr-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 1
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : __cbc(aes)
driver       : __cbc-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : __ecb(aes)
driver       : __ecb-aes-neon
module       : aes_neon_blk
priority     : 200
refcnt       : 1
selftest     : passed
internal     : yes
type         : skcipher
async        : no
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 16

name         : crct10dif
driver       : crct10dif-arm64-neon
module       : crct10dif_ce
priority     : 100
refcnt       : 2
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 2

name         : ecb(aes)
driver       : ecb-aes-gxl
module       : kernel
priority     : 400
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 0
chunksize    : 16
walksize     : 16

name         : cbc(aes)
driver       : cbc-aes-gxl
module       : kernel
priority     : 400
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

name         : jitterentropy_rng
driver       : jitterentropy_rng
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : aes
driver       : aes-arm64
module       : kernel
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : sha224
driver       : sha224-arm64-neon
module       : kernel
priority     : 150
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 28

name         : sha256
driver       : sha256-arm64-neon
module       : kernel
priority     : 150
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 32

name         : sha224
driver       : sha224-arm64
module       : kernel
priority     : 125
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 28

name         : sha256
driver       : sha256-arm64
module       : kernel
priority     : 125
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 32

name         : ghash
driver       : ghash-neon
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 16
digestsize   : 16

name         : stdrng
driver       : drbg_nopr_hmac_sha256
module       : kernel
priority     : 207
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_nopr_hmac_sha512
module       : kernel
priority     : 206
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_nopr_hmac_sha384
module       : kernel
priority     : 205
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_nopr_hmac_sha1
module       : kernel
priority     : 204
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_pr_hmac_sha256
module       : kernel
priority     : 203
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_pr_hmac_sha512
module       : kernel
priority     : 202
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_pr_hmac_sha384
module       : kernel
priority     : 201
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : drbg_pr_hmac_sha1
module       : kernel
priority     : 200
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 0

name         : stdrng
driver       : ansi_cprng
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : rng
seedsize     : 48

name         : crct10dif
driver       : crct10dif-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 2

name         : crc32c
driver       : crc32c-generic
module       : kernel
priority     : 100
refcnt       : 3
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 4

name         : zlib-deflate
driver       : zlib-deflate-scomp
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : scomp

name         : deflate
driver       : deflate-scomp
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : scomp

name         : deflate
driver       : deflate-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : compression

name         : aes
driver       : aes-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : sha224
driver       : sha224-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 28

name         : sha256
driver       : sha256-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 32

name         : sha1
driver       : sha1-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 64
digestsize   : 20

name         : ecb(cipher_null)
driver       : ecb-cipher_null
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : no
blocksize    : 1
min keysize  : 0
max keysize  : 0
ivsize       : 0
chunksize    : 1
walksize     : 1

name         : digest_null
driver       : digest_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : shash
blocksize    : 1
digestsize   : 0

name         : compress_null
driver       : compress_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : compression

name         : cipher_null
driver       : cipher_null-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
internal     : no
type         : cipher
blocksize    : 1
min keysize  : 0
max keysize  : 0

name         : rsa
driver       : rsa-generic
module       : kernel
priority     : 100
refcnt       : 1
selftest     : passed
internal     : no
type         : akcipher


openssl speed md5 sha1 sha256 sha512 des des-ede3 aes-128-cbc aes-192-cbc aes-256-cbc rsa2048 dsa2048 | tee /tmp/sslspeed
echo "|" `awk 'match($0,/r[0-9]+/) {print substr($0,RSTART,RLENGTH)}' /etc/banner` `awk -v FS=": " -v ORS="" '/(Processor|BogoMIPS|Hardware|machine|cpu model|system type)/ { print "| " $2 " " } END { print "" }' /proc/cpuinfo` `awk -v ORS="" '$1 ~ /OpenSSL/ {print "| " $2 " |"} $1 ~ /(md5|sha)/ {print "  " $5 " |"} $1 ~ /(des|aes)/ {b = b "  " $6 " |"} $1 ~ /(rsa|dsa)/ {print b "  " $6 " | " $7 " | ";b=""} END { print "" }' /tmp/sslspeed | sed 's/\.\(..\)k/\10/g'`
echo 

6017051 md5's in 2.99s
Doing md5 for 3s on 64 size blocks: 3747162 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 1759645 md5's in 2.99s
Doing md5 for 3s on 1024 size blocks: 560895 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 76613 md5's in 3.00s
Doing md5 for 3s on 16384 size blocks: 38552 md5's in 2.99s
Doing sha1 for 3s on 16 size blocks: 5302800 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 3306365 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 1584946 sha1's in 2.99s
Doing sha1 for 3s on 1024 size blocks: 513369 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 70336 sha1's in 3.00s
Doing sha1 for 3s on 16384 size blocks: 35404 sha1's in 2.99s
Doing sha256 for 3s on 16 size blocks: 3357872 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 1929438 sha256's in 2.99s
Doing sha256 for 3s on 256 size blocks: 869289 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 274438 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 37155 sha256's in 2.99s
Doing sha256 for 3s on 16384 size blocks: 18682 sha256's in 3.00s
Doing sha512 for 3s on 16 size blocks: 2799557 sha512's in 3.00s
Doing sha512 for 3s on 64 size blocks: 2783520 sha512's in 2.99s
Doing sha512 for 3s on 256 size blocks: 1105915 sha512's in 3.00s
Doing sha512 for 3s on 1024 size blocks: 397144 sha512's in 3.00s
Doing sha512 for 3s on 8192 size blocks: 56976 sha512's in 2.99s
Doing sha512 for 3s on 16384 size blocks: 28777 sha512's in 3.00s
Doing des cbc for 3s on 16 size blocks: 4738723 des cbc's in 2.99s
Doing des cbc for 3s on 64 size blocks: 1281858 des cbc's in 3.00s
Doing des cbc for 3s on 256 size blocks: 327964 des cbc's in 3.00s
Doing des cbc for 3s on 1024 size blocks: 82477 des cbc's in 2.99s
Doing des cbc for 3s on 8192 size blocks: 10327 des cbc's in 3.00s
Doing des cbc for 3s on 16384 size blocks: 5164 des cbc's in 3.00s
Doing des ede3 for 3s on 16 size blocks: 1798759 des ede3's in 3.00s
Doing des ede3 for 3s on 64 size blocks: 463662 des ede3's in 2.99s
Doing des ede3 for 3s on 256 size blocks: 116943 des ede3's in 3.00s
Doing des ede3 for 3s on 1024 size blocks: 29298 des ede3's in 2.99s
Doing des ede3 for 3s on 8192 size blocks: 3665 des ede3's in 3.00s
Doing des ede3 for 3s on 16384 size blocks: 1833 des ede3's in 3.00s
Doing aes-128 cbc for 3s on 16 size blocks: 10693352 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 2904495 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 256 size blocks: 747016 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 187873 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 8192 size blocks: 23552 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 16384 size blocks: 11785 aes-128 cbc's in 3.00s
Doing aes-192 cbc for 3s on 16 size blocks: 9372353 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 64 size blocks: 2519655 aes-192 cbc's in 2.99s
Doing aes-192 cbc for 3s on 256 size blocks: 645518 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 1024 size blocks: 162204 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 8192 size blocks: 20339 aes-192 cbc's in 2.99s
Doing aes-192 cbc for 3s on 16384 size blocks: 10170 aes-192 cbc's in 3.00s
Doing aes-256 cbc for 3s on 16 size blocks: 8351975 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 2230407 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 256 size blocks: 569997 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 1024 size blocks: 143151 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 8192 size blocks: 17939 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 16384 size blocks: 8970 aes-256 cbc's in 3.00s
Doing 2048 bits private rsa's for 10s: 1399 2048 bits private RSA's in 9.99s
Doing 2048 bits public rsa's for 10s: 53024 2048 bits public RSA's in 9.99s
Doing 2048 bits sign dsa's for 10s: 3820 2048 bits DSA signs in 9.98s
Doing 2048 bits verify dsa's for 10s: 4173 2048 bits DSA verify in 9.99s
OpenSSL 1.1.1d  10 Sep 2019
built on: Wed Sep 11 18:07:42 2019 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) idea(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5              32198.27k    79939.46k   150658.57k   191452.16k   209204.57k   211249.49k
sha1             28281.60k    70535.79k   135701.06k   175229.95k   192064.17k   193999.71k
des cbc          25357.72k    27346.30k    27986.26k    28246.30k    28199.59k    28202.33k
des ede3          9593.38k     9924.54k     9979.14k    10033.83k    10007.89k    10010.62k
aes-128 cbc      57031.21k    62169.79k    63745.37k    64127.32k    64527.75k    64361.81k
aes-192 cbc      49985.88k    53932.41k    55084.20k    55365.63k    55724.78k    55541.76k
aes-256 cbc      44543.87k    47741.15k    48639.74k    48862.21k    49149.26k    48988.16k
sha256           17908.65k    41299.01k    74179.33k    93674.84k   101797.24k   102028.63k
sha512           14930.97k    59580.36k    94371.41k   135558.49k   156102.81k   157160.79k
                  sign    verify    sign/s verify/s
rsa 2048 bits 0.007141s 0.000188s    140.0   5307.7
                  sign    verify    sign/s verify/s
dsa 2048 bits 0.002613s 0.002394s    382.8    417.7
/g'` " | " $7 " | ";b=""} END { print "" }' /tmp/sslspeed | sed 's/\.\(..\)k/\10/
awk: fatal: cannot open file `/etc/banner' for reading (No such file or directory)
| | 48.00 | 48.00 | 48.00 | 48.00 | 1.1.1d | 192044030 | 175338500 | 93675520 | 135603200 | 28157270 | 10017790 | 64203090 | 55428780 | 48919210 | 140.0 | 5308.2 | 382.6 | 410.8 |
[root@alarm ~]# echo
Herbert Xu Dec. 11, 2019, 9:50 a.m. UTC | #5
On Wed, Dec 11, 2019 at 03:07:53PM +0530, Anand Moon wrote:
>
> name         : ecb(aes)
> driver       : ecb-aes-gxl
> module       : kernel
> priority     : 400
> refcnt       : 1
> selftest     : passed
> internal     : no
> type         : skcipher
> async        : yes
> blocksize    : 16
> min keysize  : 16
> max keysize  : 32
> ivsize       : 0
> chunksize    : 16
> walksize     : 16
> 
> name         : cbc(aes)
> driver       : cbc-aes-gxl
> module       : kernel
> priority     : 400
> refcnt       : 1
> selftest     : passed
> internal     : no
> type         : skcipher
> async        : yes
> blocksize    : 16
> min keysize  : 16
> max keysize  : 32
> ivsize       : 16
> chunksize    : 16
> walksize     : 16

Oh so you did actually get them loaded.  You need to run tcrypt with
mode=500 instead of 200 to test the async ciphers.  Does that work?

Thanks,
Anand Moon Dec. 11, 2019, 10:05 a.m. UTC | #6
Hi Herbert,

On Wed, 11 Dec 2019 at 14:57, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Wed, Dec 11, 2019 at 09:53:56AM +0100, Neil Armstrong wrote:
> >
> > On 11/12/2019 09:41, Anand Moon wrote:
> > > [sudo] password for alarm:
> > > [  903.867059] tcrypt:
> > > [  903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
> >
> > Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
> > vendor BSPs, in Linux, U-Boot and ATF chain.
> >
> > Could you run more tests to be sure it's really functional ?
>
> Well as you can see from the tcrypt output, it's actually using
> aes-arm64 which is certainly not the amlogic driver.  Presumably
> the amlogic driver failed to load/register.
>
> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Yes I think so you are correct.no Hardware Accelerated crypto on GXBB.
Failed to load the module.

-Anand
Anand Moon Dec. 11, 2019, 10:33 a.m. UTC | #7
Hi Herbert,

On Wed, 11 Dec 2019 at 15:20, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Wed, Dec 11, 2019 at 03:07:53PM +0530, Anand Moon wrote:
> >
> > name         : ecb(aes)
> > driver       : ecb-aes-gxl
> > module       : kernel
> > priority     : 400
> > refcnt       : 1
> > selftest     : passed
> > internal     : no
> > type         : skcipher
> > async        : yes
> > blocksize    : 16
> > min keysize  : 16
> > max keysize  : 32
> > ivsize       : 0
> > chunksize    : 16
> > walksize     : 16
> >
> > name         : cbc(aes)
> > driver       : cbc-aes-gxl
> > module       : kernel
> > priority     : 400
> > refcnt       : 1
> > selftest     : passed
> > internal     : no
> > type         : skcipher
> > async        : yes
> > blocksize    : 16
> > min keysize  : 16
> > max keysize  : 32
> > ivsize       : 16
> > chunksize    : 16
> > walksize     : 16
>
> Oh so you did actually get them loaded.  You need to run tcrypt with
> mode=500 instead of 200 to test the async ciphers.  Does that work?
>
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

I get kernel panic, I will try to look into this much closely.

[alarm@alarm ~]$ sudo modprobe tcrypt sec=1 mode=500
[sudo] password for alarm:
[  754.382673] tcrypt:
[  754.382673] testing speed of async ecb(aes) (ecb-aes-gxl) encryption
[  754.385583] tcrypt: test 0 (128 bit key, 16 byte blocks):
[  754.385774] SError Interrupt on CPU1, code 0xbf000000 -- SError
[  754.385776] CPU: 1 PID: 121 Comm: da832000.crypto Not tainted
5.5.0-rc1-00012-g6794862a16ef-dirty #3
[  754.385778] Hardware name: Hardkernel ODROID-C2 (DT)
[  754.385779] pstate: 60000005 (nZCv daif -PAN -UAO)
[  754.385781] pc : wait_for_completion_interruptible_timeout+0x20/0x120
[  754.385782] lr : meson_handle_cipher_request+0x344/0x700
[  754.385783] sp : ffff800011e9bca0
[  754.385784] x29: ffff800011e9bca0 x28: 0000000000000040
[  754.385787] x27: 0000000000000010 x26: 0000000000000000
[  754.385789] x25: 0000000000000000 x24: 0000000005300080
[  754.385792] x23: 0000000000000002 x22: ffff00006d08aa00
[  754.385795] x21: ffff00007f68c4d0 x20: ffff00007f68c4c8
[  754.385797] x19: 000000000000007d x18: 00000000000000ab
[  754.385800] x17: 000000000000006c x16: 000000000000001b
[  754.385802] x15: 000000000000000c x14: 0000000000000010
[  754.385805] x13: 0000000000000000 x12: 0000000000000000
[  754.385808] x11: 0000000000000001 x10: ffff8000119d7e80
[  754.385810] x9 : 0000000000000000 x8 : ffff800011add000
[  754.385813] x7 : 0000000000000000 x6 : 0000000000000000
[  754.385815] x5 : 0000000000000000 x4 : 0000000080800010
[  754.385818] x3 : ffff800011acd000 x2 : 000000006d093002
[  754.385820] x1 : 000000000000007d x0 : ffff00007f68c4c8
[  754.385824] Kernel panic - not syncing: Asynchronous SError Interrupt
[  754.385825] CPU: 1 PID: 121 Comm: da832000.crypto Not tainted
5.5.0-rc1-00012-g6794862a16ef-dirty #3
[  754.385827] Hardware name: Hardkernel ODROID-C2 (DT)
[  754.385828] Call trace:
[  754.385829]  dump_backtrace+0x0/0x188
[  754.385830]  show_stack+0x14/0x20
[  754.385831]  dump_stack+0xb4/0xfc
[  754.385832]  panic+0x158/0x320
[  754.385833]  nmi_panic+0x84/0x88
[  754.385834]  arm64_serror_panic+0x74/0x80
[  754.385835]  do_serror+0x80/0x138
[  754.385836]  el1_error+0x84/0x100
[  754.385838]  wait_for_completion_interruptible_timeout+0x20/0x120
[  754.385839]  meson_handle_cipher_request+0x344/0x700
[  754.385840]  crypto_pump_work+0x10c/0x228
[  754.385841]  kthread_worker_fn+0xa8/0x188
[  754.385842]  kthread+0xf0/0x120
[  754.385843]  ret_from_fork+0x10/0x18
[  754.385862] SMP: stopping secondary CPUs
[  754.385863] Kernel Offset: disabled
[  754.385864] CPU features: 0x00002,24002004
[  754.385865] Memory Limit: none

-Anand
Anand Moon Dec. 11, 2019, 10:41 a.m. UTC | #8
Hi Neil,

On Wed, 11 Dec 2019 at 14:11, Anand Moon <linux.amoon@gmail.com> wrote:
>
> This patch adds the crypto hardware node for all GXBB SoCs.
>
> Cc: Corentin Labbe <clabbe@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> Tested on Odroid C2 GXBB
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> index 0cb40326b0d3..bac8fbfd4f01 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> @@ -14,6 +14,16 @@ / {
>         compatible = "amlogic,meson-gxbb";
>
>         soc {
> +               crypto: crypto@c883e000 {

My mistake I got this reg value wrong, as per the
"S905_Public_Datasheet_V1.1.4" [0]
it should be *0xda832000 + offset*4*
I changes this at my end but I get kernel panic on loading the module.

# sudo modprobe tcrypt sec=1 mode=500

It's looks like the crypto node is wrongly configured.

> +                       compatible = "amlogic,gxbb-crypto";
> +                       reg = <0x0 0xc883e000 0x0 0x36>;
> +                       interrupts = <GIC_SPI 188 IRQ_TYPE_EDGE_RISING>,
> +                                    <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
> +                       clocks = <&clkc CLKID_BLKMV>;
> +                       clock-names = "blkmv";
> +                       status = "okay";
> +               };
> +
>                 usb0_phy: phy@c0000000 {
>                         compatible = "amlogic,meson-gxbb-usb2-phy";
>                         #phy-cells = <0>;
> --
> 2.24.0
>

[0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf

-Anand
Anand Moon Dec. 11, 2019, 12:15 p.m. UTC | #9
Hi Herbert / Neil,

On Wed, 11 Dec 2019 at 15:20, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Wed, Dec 11, 2019 at 03:07:53PM +0530, Anand Moon wrote:
> >
> > name         : ecb(aes)
> > driver       : ecb-aes-gxl
> > module       : kernel
> > priority     : 400
> > refcnt       : 1
> > selftest     : passed
> > internal     : no
> > type         : skcipher
> > async        : yes
> > blocksize    : 16
> > min keysize  : 16
> > max keysize  : 32
> > ivsize       : 0
> > chunksize    : 16
> > walksize     : 16
> >
> > name         : cbc(aes)
> > driver       : cbc-aes-gxl
> > module       : kernel
> > priority     : 400
> > refcnt       : 1
> > selftest     : passed
> > internal     : no
> > type         : skcipher
> > async        : yes
> > blocksize    : 16
> > min keysize  : 16
> > max keysize  : 32
> > ivsize       : 16
> > chunksize    : 16
> > walksize     : 16
>
> Oh so you did actually get them loaded.  You need to run tcrypt with
> mode=500 instead of 200 to test the async ciphers.  Does that work?
>
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Looks like I go this to move ahead after modified the dts crypto nodes.
Here is the output is this good enough results are their some more testcase.

[alarm@alarm ~]$ sudo modprobe tcrypt sec=1 mode=500
[sudo] password for alarm:
[   24.370009] tcrypt:
[   24.370009] testing speed of async ecb(aes) (ecb-aes-neonbs) encryption
[   24.373201] tcrypt: test 0 (128 bit key, 16 byte blocks): 558165
operations in 1 seconds (8930640 bytes)
[   25.374105] tcrypt: test 1 (128 bit key, 64 byte blocks): 553730
operations in 1 seconds (35438720 bytes)
[   26.374180] tcrypt: test 2 (128 bit key, 256 byte blocks): 304721
operations in 1 seconds (78008576 bytes)
[   27.374266] tcrypt: test 3 (128 bit key, 1024 byte blocks): 83420
operations in 1 seconds (85422080 bytes)
[   28.374276] tcrypt: test 4 (128 bit key, 1472 byte blocks): 56456
operations in 1 seconds (83103232 bytes)
[   29.378277] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10601
operations in 1 seconds (86843392 bytes)
[   30.382329] tcrypt: test 6 (192 bit key, 16 byte blocks): 487160
operations in 1 seconds (7794560 bytes)
[   31.386099] tcrypt: test 7 (192 bit key, 64 byte blocks):
[   31.774318] VCC3V3: disabling
[   32.382287] 482103 operations in 1 seconds (30854592 bytes)
[   32.382311] tcrypt: test 8 (192 bit key, 256 byte blocks): 262375
operations in 1 seconds (67168000 bytes)
[   33.386271] tcrypt: test 9 (192 bit key, 1024 byte blocks): 70597
operations in 1 seconds (72291328 bytes)
[   34.386290] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47700
operations in 1 seconds (70214400 bytes)
[   35.390382] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8950
operations in 1 seconds (73318400 bytes)
[   36.394332] tcrypt: test 12 (256 bit key, 16 byte blocks): 431367
operations in 1 seconds (6901872 bytes)
[   37.398181] tcrypt: test 13 (256 bit key, 64 byte blocks): 427335
operations in 1 seconds (27349440 bytes)
[   38.398266] tcrypt: test 14 (256 bit key, 256 byte blocks): 229875
operations in 1 seconds (58848000 bytes)
[   39.398369] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61743
operations in 1 seconds (63224832 bytes)
[   40.402378] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41497
operations in 1 seconds (61083584 bytes)
[   41.406389] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7788
operations in 1 seconds (63799296 bytes)
[   42.410414] tcrypt:
[   42.410414] testing speed of async ecb(aes) (ecb-aes-neonbs) decryption
[   42.419098] tcrypt: test 0 (128 bit key, 16 byte blocks): 505838
operations in 1 seconds (8093408 bytes)
[   43.422184] tcrypt: test 1 (128 bit key, 64 byte blocks): 501537
operations in 1 seconds (32098368 bytes)
[   44.423580] tcrypt: test 2 (128 bit key, 256 byte blocks): 273125
operations in 1 seconds (69920000 bytes)
[   45.424907] tcrypt: test 3 (128 bit key, 1024 byte blocks): 74316
operations in 1 seconds (76099584 bytes)
[   46.430065] tcrypt: test 4 (128 bit key, 1472 byte blocks): 50025
operations in 1 seconds (73636800 bytes)
[   47.435145] tcrypt: test 5 (128 bit key, 8192 byte blocks): 9391
operations in 1 seconds (76931072 bytes)
[   48.440096] tcrypt: test 6 (192 bit key, 16 byte blocks): 436414
operations in 1 seconds (6982624 bytes)
[   49.440916] tcrypt: test 7 (192 bit key, 64 byte blocks): 433857
operations in 1 seconds (27766848 bytes)
[   50.441889] tcrypt: test 8 (192 bit key, 256 byte blocks): 233073
operations in 1 seconds (59666688 bytes)
[   51.442803] tcrypt: test 9 (192 bit key, 1024 byte blocks): 62394
operations in 1 seconds (63891456 bytes)
[   52.443606] tcrypt: test 10 (192 bit key, 1472 byte blocks): 42109
operations in 1 seconds (61984448 bytes)
[   53.448434] tcrypt: test 11 (192 bit key, 8192 byte blocks): 7900
operations in 1 seconds (64716800 bytes)
[   54.453133] tcrypt: test 12 (256 bit key, 16 byte blocks): 386032
operations in 1 seconds (6176512 bytes)
[   55.457568] tcrypt: test 13 (256 bit key, 64 byte blocks): 382669
operations in 1 seconds (24490816 bytes)
[   56.458258] tcrypt: test 14 (256 bit key, 256 byte blocks): 204926
operations in 1 seconds (52461056 bytes)
[   57.462922] tcrypt: test 15 (256 bit key, 1024 byte blocks): 54382
operations in 1 seconds (55687168 bytes)
[   58.467448] tcrypt: test 16 (256 bit key, 1472 byte blocks): 36513
operations in 1 seconds (53747136 bytes)
[   59.471968] tcrypt: test 17 (256 bit key, 8192 byte blocks): 6851
operations in 1 seconds (56123392 bytes)
[   60.488714] tcrypt:
[   60.488714] testing speed of async cbc(aes) (cbc-aes-neonbs) encryption
[   60.491836] tcrypt: test 0 (128 bit key, 16 byte blocks): 1570796
operations in 1 seconds (25132736 bytes)
[   61.492766] tcrypt: test 1 (128 bit key, 64 byte blocks): 728564
operations in 1 seconds (46628096 bytes)
[   62.497077] tcrypt: test 2 (128 bit key, 256 byte blocks): 230454
operations in 1 seconds (58996224 bytes)
[   63.497552] tcrypt: test 3 (128 bit key, 1024 byte blocks): 61803
operations in 1 seconds (63286272 bytes)
[   64.497913] tcrypt: test 4 (128 bit key, 1472 byte blocks): 43483
operations in 1 seconds (64006976 bytes)
[   65.502251] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7890
operations in 1 seconds (64634880 bytes)
[   66.506530] tcrypt: test 6 (192 bit key, 16 byte blocks): 1458091
operations in 1 seconds (23329456 bytes)
[   67.506856] tcrypt: test 7 (192 bit key, 64 byte blocks): 636185
operations in 1 seconds (40715840 bytes)
[   68.507055] tcrypt: test 8 (192 bit key, 256 byte blocks): 194680
operations in 1 seconds (49838080 bytes)
[   69.507400] tcrypt: test 9 (192 bit key, 1024 byte blocks): 51911
operations in 1 seconds (53156864 bytes)
[   70.511658] tcrypt: test 10 (192 bit key, 1472 byte blocks): 36328
operations in 1 seconds (53474816 bytes)
[   71.515969] tcrypt: test 11 (192 bit key, 8192 byte blocks): 6542
operations in 1 seconds (53592064 bytes)
[   72.520232] tcrypt: test 12 (256 bit key, 16 byte blocks): 1368657
operations in 1 seconds (21898512 bytes)
[   73.524380] tcrypt: test 13 (256 bit key, 64 byte blocks): 568825
operations in 1 seconds (36404800 bytes)
[   74.528480] tcrypt: test 14 (256 bit key, 256 byte blocks): 170364
operations in 1 seconds (43613184 bytes)
[   75.532745] tcrypt: test 15 (256 bit key, 1024 byte blocks): 44820
operations in 1 seconds (45895680 bytes)
[   76.536921] tcrypt: test 16 (256 bit key, 1472 byte blocks): 31345
operations in 1 seconds (46139840 bytes)
[   77.541084] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5674
operations in 1 seconds (46481408 bytes)
[   78.545207] tcrypt:
[   78.545207] testing speed of async cbc(aes) (cbc-aes-neonbs) decryption
[   78.553895] tcrypt: test 0 (128 bit key, 16 byte blocks): 507079
operations in 1 seconds (8113264 bytes)
[   79.557077] tcrypt: test 1 (128 bit key, 64 byte blocks): 502559
operations in 1 seconds (32163776 bytes)
[   80.557292] tcrypt: test 2 (128 bit key, 256 byte blocks): 272698
operations in 1 seconds (69810688 bytes)
[   81.557499] tcrypt: test 3 (128 bit key, 1024 byte blocks): 73650
operations in 1 seconds (75417600 bytes)
[   82.557611] tcrypt: test 4 (128 bit key, 1472 byte blocks): 49556
operations in 1 seconds (72946432 bytes)
[   83.557737] tcrypt: test 5 (128 bit key, 8192 byte blocks): 9336
operations in 1 seconds (76480512 bytes)
[   84.561741] tcrypt: test 6 (192 bit key, 16 byte blocks): 437081
operations in 1 seconds (6993296 bytes)
[   85.561733] tcrypt: test 7 (192 bit key, 64 byte blocks): 434321
operations in 1 seconds (27796544 bytes)
[   86.561906] tcrypt: test 8 (192 bit key, 256 byte blocks): 232778
operations in 1 seconds (59591168 bytes)
[   87.562077] tcrypt: test 9 (192 bit key, 1024 byte blocks): 62394
operations in 1 seconds (63891456 bytes)
[   88.566148] tcrypt: test 10 (192 bit key, 1472 byte blocks): 41756
operations in 1 seconds (61464832 bytes)
[   89.566319] tcrypt: test 11 (192 bit key, 8192 byte blocks): 7862
operations in 1 seconds (64405504 bytes)
[   90.570354] tcrypt: test 12 (256 bit key, 16 byte blocks): 386709
operations in 1 seconds (6187344 bytes)
[   91.574264] tcrypt: test 13 (256 bit key, 64 byte blocks): 383279
operations in 1 seconds (24529856 bytes)
[   92.574409] tcrypt: test 14 (256 bit key, 256 byte blocks): 203918
operations in 1 seconds (52203008 bytes)
[   93.574554] tcrypt: test 15 (256 bit key, 1024 byte blocks): 54203
operations in 1 seconds (55503872 bytes)
[   94.578607] tcrypt: test 16 (256 bit key, 1472 byte blocks): 36379
operations in 1 seconds (53549888 bytes)
[   95.582670] tcrypt: test 17 (256 bit key, 8192 byte blocks): 6825
operations in 1 seconds (55910400 bytes)
[   96.598834] tcrypt: failed to load transform for lrw(aes): -2
[   96.611007] tcrypt: failed to load transform for lrw(aes): -2
[   96.623026] tcrypt:
[   96.623026] testing speed of async xts(aes) (xts-aes-neonbs) encryption
[   96.626152] tcrypt: test 0 (256 bit key, 16 byte blocks): 1049916
operations in 1 seconds (16798656 bytes)
[   97.626651] tcrypt: test 1 (256 bit key, 64 byte blocks): 628670
operations in 1 seconds (40234880 bytes)
[   98.626607] tcrypt: test 2 (256 bit key, 256 byte blocks): 272202
operations in 1 seconds (69683712 bytes)
[   99.626727] tcrypt: test 3 (256 bit key, 1024 byte blocks): 79299
operations in 1 seconds (81202176 bytes)
[  100.626771] tcrypt: test 4 (256 bit key, 1472 byte blocks): 54137
operations in 1 seconds (79689664 bytes)
[  101.630823] tcrypt: test 5 (256 bit key, 8192 byte blocks): 10295
operations in 1 seconds (84336640 bytes)
[  102.634876] tcrypt: test 6 (512 bit key, 16 byte blocks): 875909
operations in 1 seconds (14014544 bytes)
[  103.638777] tcrypt: test 7 (512 bit key, 64 byte blocks): 490152
operations in 1 seconds (31369728 bytes)
[  104.638802] tcrypt: test 8 (512 bit key, 256 byte blocks): 206655
operations in 1 seconds (52903680 bytes)
[  105.638913] tcrypt: test 9 (512 bit key, 1024 byte blocks): 59127
operations in 1 seconds (60546048 bytes)
[  106.642968] tcrypt: test 10 (512 bit key, 1472 byte blocks): 40065
operations in 1 seconds (58975680 bytes)
[  107.646785] tcrypt: test 11 (512 bit key, 8192 byte blocks): 7612
operations in 1 seconds (62357504 bytes)
[  108.650058] tcrypt:
[  108.650058] testing speed of async xts(aes) (xts-aes-neonbs) decryption
[  108.658747] tcrypt: test 0 (256 bit key, 16 byte blocks): 988257
operations in 1 seconds (15812112 bytes)
[  109.661062] tcrypt: test 1 (256 bit key, 64 byte blocks): 563062
operations in 1 seconds (36035968 bytes)
[  110.660328] tcrypt: test 2 (256 bit key, 256 byte blocks): 246292
operations in 1 seconds (63050752 bytes)
[  111.659706] tcrypt: test 3 (256 bit key, 1024 byte blocks): 70928
operations in 1 seconds (72630272 bytes)
[  112.663032] tcrypt: test 4 (256 bit key, 1472 byte blocks): 48127
operations in 1 seconds (70842944 bytes)
[  113.666338] tcrypt: test 5 (256 bit key, 8192 byte blocks): 9138
operations in 1 seconds (74858496 bytes)
[  114.669650] tcrypt: test 6 (512 bit key, 16 byte blocks): 809679
operations in 1 seconds (12954864 bytes)
[  115.668960] tcrypt: test 7 (512 bit key, 64 byte blocks): 433846
operations in 1 seconds (27766144 bytes)
[  116.668338] tcrypt: test 8 (512 bit key, 256 byte blocks): 185424
operations in 1 seconds (47468544 bytes)
[  117.667842] tcrypt: test 9 (512 bit key, 1024 byte blocks): 52298
operations in 1 seconds (53553152 bytes)
[  118.671236] tcrypt: test 10 (512 bit key, 1472 byte blocks): 35382
operations in 1 seconds (52082304 bytes)
[  119.674752] tcrypt: test 11 (512 bit key, 8192 byte blocks): 6715
operations in 1 seconds (55009280 bytes)
[  120.690195] tcrypt:
[  120.690195] testing speed of async cts(cbc(aes)) (cts-cbc-aes-neon)
encryption
[  120.693927] tcrypt: test 0 (128 bit key, 16 byte blocks): 1463922
operations in 1 seconds (23422752 bytes)
[  121.693576] tcrypt: test 1 (128 bit key, 64 byte blocks): 558509
operations in 1 seconds (35744576 bytes)
[  122.696941] tcrypt: test 2 (128 bit key, 256 byte blocks): 206901
operations in 1 seconds (52966656 bytes)
[  123.696534] tcrypt: test 3 (128 bit key, 1024 byte blocks): 59201
operations in 1 seconds (60621824 bytes)
[  124.700019] tcrypt: test 4 (128 bit key, 1472 byte blocks): 41776
operations in 1 seconds (61494272 bytes)
[  125.703545] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7668
operations in 1 seconds (62816256 bytes)
[  126.707049] tcrypt: test 6 (192 bit key, 16 byte blocks): 1364595
operations in 1 seconds (21833520 bytes)
[  127.706592] tcrypt: test 7 (192 bit key, 64 byte blocks): 503147
operations in 1 seconds (32201408 bytes)
[  128.710059] tcrypt: test 8 (192 bit key, 256 byte blocks): 177555
operations in 1 seconds (45454080 bytes)
[  129.709723] tcrypt: test 9 (192 bit key, 1024 byte blocks): 49679
operations in 1 seconds (50871296 bytes)
[  130.713290] tcrypt: test 10 (192 bit key, 1472 byte blocks): 34970
operations in 1 seconds (51475840 bytes)
[  131.716973] tcrypt: test 11 (192 bit key, 8192 byte blocks): 6367
operations in 1 seconds (52158464 bytes)
[  132.720614] tcrypt: test 12 (256 bit key, 16 byte blocks): 1283895
operations in 1 seconds (20542320 bytes)
[  133.724150] tcrypt: test 13 (256 bit key, 64 byte blocks): 457627
operations in 1 seconds (29288128 bytes)
[  134.727676] tcrypt: test 14 (256 bit key, 256 byte blocks): 156458
operations in 1 seconds (40053248 bytes)
[  135.731388] tcrypt: test 15 (256 bit key, 1024 byte blocks): 43053
operations in 1 seconds (44086272 bytes)
[  136.735034] tcrypt: test 16 (256 bit key, 1472 byte blocks): 30275
operations in 1 seconds (44564800 bytes)
[  137.738663] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5544
operations in 1 seconds (45416448 bytes)
[  138.742355] tcrypt:
[  138.742355] testing speed of async cts(cbc(aes)) (cts-cbc-aes-neon)
decryption
[  138.751641] tcrypt: test 0 (128 bit key, 16 byte blocks): 1346320
operations in 1 seconds (21541120 bytes)
[  139.753869] tcrypt: test 1 (128 bit key, 64 byte blocks): 490910
operations in 1 seconds (31418240 bytes)
[  140.757441] tcrypt: test 2 (128 bit key, 256 byte blocks): 187922
operations in 1 seconds (48108032 bytes)
[  141.757206] tcrypt: test 3 (128 bit key, 1024 byte blocks): 54591
operations in 1 seconds (55901184 bytes)
[  142.760888] tcrypt: test 4 (128 bit key, 1472 byte blocks): 38584
operations in 1 seconds (56795648 bytes)
[  143.764589] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7103
operations in 1 seconds (58187776 bytes)
[  144.768315] tcrypt: test 6 (192 bit key, 16 byte blocks): 1242700
operations in 1 seconds (19883200 bytes)
[  145.771971] tcrypt: test 7 (192 bit key, 64 byte blocks): 437461
operations in 1 seconds (27997504 bytes)
[  146.775577] tcrypt: test 8 (192 bit key, 256 byte blocks): 160197
operations in 1 seconds (41010432 bytes)
[  147.775393] tcrypt: test 9 (192 bit key, 1024 byte blocks): 45642
operations in 1 seconds (46737408 bytes)
[  148.779096] tcrypt: test 10 (192 bit key, 1472 byte blocks): 32063
operations in 1 seconds (47196736 bytes)
[  149.778946] tcrypt: test 11 (192 bit key, 8192 byte blocks): 5877
operations in 1 seconds (48144384 bytes)
[  150.782631] tcrypt: test 12 (256 bit key, 16 byte blocks): 1152081
operations in 1 seconds (18433296 bytes)
[  151.786402] tcrypt: test 13 (256 bit key, 64 byte blocks): 394347
operations in 1 seconds (25238208 bytes)
[  152.790040] tcrypt: test 14 (256 bit key, 256 byte blocks): 140441
operations in 1 seconds (35952896 bytes)
[  153.793884] tcrypt: test 15 (256 bit key, 1024 byte blocks): 39333
operations in 1 seconds (40276992 bytes)
[  154.797644] tcrypt: test 16 (256 bit key, 1472 byte blocks): 27695
operations in 1 seconds (40767040 bytes)
[  155.801405] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5092
operations in 1 seconds (41713664 bytes)
[  156.817348] tcrypt:
[  156.817348] testing speed of async ctr(aes) (ctr-aes-neonbs) encryption
[  156.820477] tcrypt: test 0 (128 bit key, 16 byte blocks): 558004
operations in 1 seconds (8928064 bytes)
[  157.820655] tcrypt: test 1 (128 bit key, 64 byte blocks): 552378
operations in 1 seconds (35352192 bytes)
[  158.820516] tcrypt: test 2 (128 bit key, 256 byte blocks): 301788
operations in 1 seconds (77257728 bytes)
[  159.820378] tcrypt: test 3 (128 bit key, 1024 byte blocks): 82386
operations in 1 seconds (84363264 bytes)
[  160.820178] tcrypt: test 4 (128 bit key, 1472 byte blocks): 55748
operations in 1 seconds (82061056 bytes)
[  161.823966] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10456
operations in 1 seconds (85655552 bytes)
[  162.827802] tcrypt: test 6 (192 bit key, 16 byte blocks): 487469
operations in 1 seconds (7799504 bytes)
[  163.831366] tcrypt: test 7 (192 bit key, 64 byte blocks): 481048
operations in 1 seconds (30787072 bytes)
[  164.831245] tcrypt: test 8 (192 bit key, 256 byte blocks): 259173
operations in 1 seconds (66348288 bytes)
[  165.831132] tcrypt: test 9 (192 bit key, 1024 byte blocks): 69847
operations in 1 seconds (71523328 bytes)
[  166.830942] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47193
operations in 1 seconds (69468096 bytes)
[  167.834846] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8846
operations in 1 seconds (72466432 bytes)
[  168.838559] tcrypt: test 12 (256 bit key, 16 byte blocks): 431442
operations in 1 seconds (6903072 bytes)
[  169.842284] tcrypt: test 13 (256 bit key, 64 byte blocks): 426738
operations in 1 seconds (27311232 bytes)
[  170.842187] tcrypt: test 14 (256 bit key, 256 byte blocks): 228219
operations in 1 seconds (58424064 bytes)
[  171.842107] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61173
operations in 1 seconds (62641152 bytes)
[  172.845937] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41113
operations in 1 seconds (60518336 bytes)
[  173.849750] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7708
operations in 1 seconds (63143936 bytes)
[  174.853539] tcrypt:
[  174.853539] testing speed of async ctr(aes) (ctr-aes-neonbs) decryption
[  174.862225] tcrypt: test 0 (128 bit key, 16 byte blocks): 559705
operations in 1 seconds (8955280 bytes)
[  175.865147] tcrypt: test 1 (128 bit key, 64 byte blocks): 552547
operations in 1 seconds (35363008 bytes)
[  176.865060] tcrypt: test 2 (128 bit key, 256 byte blocks): 301757
operations in 1 seconds (77249792 bytes)
[  177.864991] tcrypt: test 3 (128 bit key, 1024 byte blocks): 82715
operations in 1 seconds (84700160 bytes)
[  178.868853] tcrypt: test 4 (128 bit key, 1472 byte blocks): 55752
operations in 1 seconds (82066944 bytes)
[  179.872675] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10456
operations in 1 seconds (85655552 bytes)
[  180.876570] tcrypt: test 6 (192 bit key, 16 byte blocks): 487550
operations in 1 seconds (7800800 bytes)
[  181.880188] tcrypt: test 7 (192 bit key, 64 byte blocks): 481235
operations in 1 seconds (30799040 bytes)
[  182.880127] tcrypt: test 8 (192 bit key, 256 byte blocks): 259126
operations in 1 seconds (66336256 bytes)
[  183.880073] tcrypt: test 9 (192 bit key, 1024 byte blocks): 70129
operations in 1 seconds (71812096 bytes)
[  184.883927] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47194
operations in 1 seconds (69469568 bytes)
[  185.887877] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8844
operations in 1 seconds (72450048 bytes)
[  186.891622] tcrypt: test 12 (256 bit key, 16 byte blocks): 431432
operations in 1 seconds (6902912 bytes)
[  187.895391] tcrypt: test 13 (256 bit key, 64 byte blocks): 426730
operations in 1 seconds (27310720 bytes)
[  188.895339] tcrypt: test 14 (256 bit key, 256 byte blocks): 229104
operations in 1 seconds (58650624 bytes)
[  189.899295] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61172
operations in 1 seconds (62640128 bytes)
[  190.903168] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41112
operations in 1 seconds (60516864 bytes)
[  191.907041] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7708
operations in 1 seconds (63143936 bytes)
[  192.922753] tcrypt: failed to load transform for cfb(aes): -2
[  192.934617] tcrypt: failed to load transform for cfb(aes): -2
[  192.946539] tcrypt: failed to load transform for ofb(aes): -2
[  192.958443] tcrypt: failed to load transform for ofb(aes): -2
[  192.988254] tcrypt:
[  192.988254] testing speed of async rfc3686(ctr(aes))
(rfc3686(ctr-aes-neonbs)) encryption
[  192.992959] tcrypt: test 0 (160 bit key, 16 byte blocks): 530041
operations in 1 seconds (8480656 bytes)
[  193.994478] tcrypt: test 1 (160 bit key, 64 byte blocks): 522344
operations in 1 seconds (33430016 bytes)
[  194.994434] tcrypt: test 2 (160 bit key, 256 byte blocks): 287702
operations in 1 seconds (73651712 bytes)
[  195.994407] tcrypt: test 3 (160 bit key, 1024 byte blocks): 79702
operations in 1 seconds (81614848 bytes)
[  196.998278] tcrypt: test 4 (160 bit key, 1472 byte blocks): 53817
operations in 1 seconds (79218624 bytes)
[  198.002158] tcrypt: test 5 (160 bit key, 8192 byte blocks): 10108
operations in 1 seconds (82804736 bytes)
[  199.006049] tcrypt: test 6 (224 bit key, 16 byte blocks): 464064
operations in 1 seconds (7425024 bytes)
[  200.009707] tcrypt: test 7 (224 bit key, 64 byte blocks): 457134
operations in 1 seconds (29256576 bytes)
[  201.009682] tcrypt: test 8 (224 bit key, 256 byte blocks): 248692
operations in 1 seconds (63665152 bytes)
[  202.009639] tcrypt: test 9 (224 bit key, 1024 byte blocks): 67920
operations in 1 seconds (69550080 bytes)
[  203.013518] tcrypt: test 10 (224 bit key, 1472 byte blocks): 45775
operations in 1 seconds (67380800 bytes)
[  204.017482] tcrypt: test 11 (224 bit key, 8192 byte blocks): 8592
operations in 1 seconds (70385664 bytes)
[  205.021339] tcrypt: test 12 (288 bit key, 16 byte blocks): 411989
operations in 1 seconds (6591824 bytes)
[  206.025076] tcrypt: test 13 (288 bit key, 64 byte blocks): 406336
operations in 1 seconds (26005504 bytes)
[  207.025055] tcrypt: test 14 (288 bit key, 256 byte blocks): 219800
operations in 1 seconds (56268800 bytes)
[  208.029027] tcrypt: test 15 (288 bit key, 1024 byte blocks): 59172
operations in 1 seconds (60592128 bytes)
[  209.032912] tcrypt: test 16 (288 bit key, 1472 byte blocks): 39815
operations in 1 seconds (58607680 bytes)
[  210.036794] tcrypt: test 17 (288 bit key, 8192 byte blocks): 7473
operations in 1 seconds (61218816 bytes)
[  211.040655] tcrypt:
[  211.040655] testing speed of async rfc3686(ctr(aes))
(rfc3686(ctr-aes-neonbs)) decryption
[  211.050885] tcrypt: test 0 (160 bit key, 16 byte blocks): 530361
operations in 1 seconds (8485776 bytes)
[  212.052309] tcrypt: test 1 (160 bit key, 64 byte blocks): 522226
operations in 1 seconds (33422464 bytes)
[  213.052282] tcrypt: test 2 (160 bit key, 256 byte blocks): 287970
operations in 1 seconds (73720320 bytes)
[  214.052242] tcrypt: test 3 (160 bit key, 1024 byte blocks): 79406
operations in 1 seconds (81311744 bytes)
[  215.052137] tcrypt: test 4 (160 bit key, 1472 byte blocks): 53819
operations in 1 seconds (79221568 bytes)
[  216.056044] tcrypt: test 5 (160 bit key, 8192 byte blocks): 10107
operations in 1 seconds (82796544 bytes)
[  217.060020] tcrypt: test 6 (224 bit key, 16 byte blocks): 464394
operations in 1 seconds (7430304 bytes)
[  218.063644] tcrypt: test 7 (224 bit key, 64 byte blocks): 457574
operations in 1 seconds (29284736 bytes)
[  219.063618] tcrypt: test 8 (224 bit key, 256 byte blocks): 248820
operations in 1 seconds (63697920 bytes)
[  220.063607] tcrypt: test 9 (224 bit key, 1024 byte blocks): 67826
operations in 1 seconds (69453824 bytes)
[  221.067506] tcrypt: test 10 (224 bit key, 1472 byte blocks): 45696
operations in 1 seconds (67264512 bytes)
[  222.071489] tcrypt: test 11 (224 bit key, 8192 byte blocks): 8577
operations in 1 seconds (70262784 bytes)
[  223.075372] tcrypt: test 12 (288 bit key, 16 byte blocks): 411815
operations in 1 seconds (6589040 bytes)
[  224.079104] tcrypt: test 13 (288 bit key, 64 byte blocks): 406618
operations in 1 seconds (26023552 bytes)
[  225.079084] tcrypt: test 14 (288 bit key, 256 byte blocks): 219788
operations in 1 seconds (56265728 bytes)
[  226.083072] tcrypt: test 15 (288 bit key, 1024 byte blocks): 59164
operations in 1 seconds (60583936 bytes)
[  227.086970] tcrypt: test 16 (288 bit key, 1472 byte blocks):
[  227.429947] audit: type=1006 audit(1576066039.080:23): pid=384
uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295
ses=3 res=1
[  228.086797] 39701 operations in 1 seconds (58439872 bytes)
[  228.086826] tcrypt: test 17 (288 bit key, 8192 byte blocks): 7470
operations in 1 seconds (61194240 bytes)
modprobe: ERROR: could not insert 'tcrypt': Resource temporarily unavailable

-Anand
Ard Biesheuvel Dec. 11, 2019, 12:24 p.m. UTC | #10
On Wed, 11 Dec 2019 at 13:16, Anand Moon <linux.amoon@gmail.com> wrote:
>
> Hi Herbert / Neil,
>
> On Wed, 11 Dec 2019 at 15:20, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > On Wed, Dec 11, 2019 at 03:07:53PM +0530, Anand Moon wrote:
> > >
> > > name         : ecb(aes)
> > > driver       : ecb-aes-gxl
> > > module       : kernel
> > > priority     : 400
> > > refcnt       : 1
> > > selftest     : passed
> > > internal     : no
> > > type         : skcipher
> > > async        : yes
> > > blocksize    : 16
> > > min keysize  : 16
> > > max keysize  : 32
> > > ivsize       : 0
> > > chunksize    : 16
> > > walksize     : 16
> > >
> > > name         : cbc(aes)
> > > driver       : cbc-aes-gxl
> > > module       : kernel
> > > priority     : 400
> > > refcnt       : 1
> > > selftest     : passed
> > > internal     : no
> > > type         : skcipher
> > > async        : yes
> > > blocksize    : 16
> > > min keysize  : 16
> > > max keysize  : 32
> > > ivsize       : 16
> > > chunksize    : 16
> > > walksize     : 16
> >
> > Oh so you did actually get them loaded.  You need to run tcrypt with
> > mode=500 instead of 200 to test the async ciphers.  Does that work?
> >
> > Thanks,
> > --
> > Email: Herbert Xu <herbert@gondor.apana.org.au>
> > Home Page: http://gondor.apana.org.au/~herbert/
> > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
>
> Looks like I go this to move ahead after modified the dts crypto nodes.
> Here is the output is this good enough results are their some more testcase.
>
> [alarm@alarm ~]$ sudo modprobe tcrypt sec=1 mode=500
> [sudo] password for alarm:
> [   24.370009] tcrypt:
> [   24.370009] testing speed of async ecb(aes) (ecb-aes-neonbs) encryption

This is using software encryption again. This line will read

  testing speed of async ecb(aes) (ecb-aes-gxl) encryption

when it is testing your driver.

Given that you register these at priority 400, they either did not
load at all or failed to register.




> [   24.373201] tcrypt: test 0 (128 bit key, 16 byte blocks): 558165
> operations in 1 seconds (8930640 bytes)
> [   25.374105] tcrypt: test 1 (128 bit key, 64 byte blocks): 553730
> operations in 1 seconds (35438720 bytes)
> [   26.374180] tcrypt: test 2 (128 bit key, 256 byte blocks): 304721
> operations in 1 seconds (78008576 bytes)
> [   27.374266] tcrypt: test 3 (128 bit key, 1024 byte blocks): 83420
> operations in 1 seconds (85422080 bytes)
> [   28.374276] tcrypt: test 4 (128 bit key, 1472 byte blocks): 56456
> operations in 1 seconds (83103232 bytes)
> [   29.378277] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10601
> operations in 1 seconds (86843392 bytes)
> [   30.382329] tcrypt: test 6 (192 bit key, 16 byte blocks): 487160
> operations in 1 seconds (7794560 bytes)
> [   31.386099] tcrypt: test 7 (192 bit key, 64 byte blocks):
> [   31.774318] VCC3V3: disabling
> [   32.382287] 482103 operations in 1 seconds (30854592 bytes)
> [   32.382311] tcrypt: test 8 (192 bit key, 256 byte blocks): 262375
> operations in 1 seconds (67168000 bytes)
> [   33.386271] tcrypt: test 9 (192 bit key, 1024 byte blocks): 70597
> operations in 1 seconds (72291328 bytes)
> [   34.386290] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47700
> operations in 1 seconds (70214400 bytes)
> [   35.390382] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8950
> operations in 1 seconds (73318400 bytes)
> [   36.394332] tcrypt: test 12 (256 bit key, 16 byte blocks): 431367
> operations in 1 seconds (6901872 bytes)
> [   37.398181] tcrypt: test 13 (256 bit key, 64 byte blocks): 427335
> operations in 1 seconds (27349440 bytes)
> [   38.398266] tcrypt: test 14 (256 bit key, 256 byte blocks): 229875
> operations in 1 seconds (58848000 bytes)
> [   39.398369] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61743
> operations in 1 seconds (63224832 bytes)
> [   40.402378] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41497
> operations in 1 seconds (61083584 bytes)
> [   41.406389] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7788
> operations in 1 seconds (63799296 bytes)
> [   42.410414] tcrypt:
> [   42.410414] testing speed of async ecb(aes) (ecb-aes-neonbs) decryption
> [   42.419098] tcrypt: test 0 (128 bit key, 16 byte blocks): 505838
> operations in 1 seconds (8093408 bytes)
> [   43.422184] tcrypt: test 1 (128 bit key, 64 byte blocks): 501537
> operations in 1 seconds (32098368 bytes)
> [   44.423580] tcrypt: test 2 (128 bit key, 256 byte blocks): 273125
> operations in 1 seconds (69920000 bytes)
> [   45.424907] tcrypt: test 3 (128 bit key, 1024 byte blocks): 74316
> operations in 1 seconds (76099584 bytes)
> [   46.430065] tcrypt: test 4 (128 bit key, 1472 byte blocks): 50025
> operations in 1 seconds (73636800 bytes)
> [   47.435145] tcrypt: test 5 (128 bit key, 8192 byte blocks): 9391
> operations in 1 seconds (76931072 bytes)
> [   48.440096] tcrypt: test 6 (192 bit key, 16 byte blocks): 436414
> operations in 1 seconds (6982624 bytes)
> [   49.440916] tcrypt: test 7 (192 bit key, 64 byte blocks): 433857
> operations in 1 seconds (27766848 bytes)
> [   50.441889] tcrypt: test 8 (192 bit key, 256 byte blocks): 233073
> operations in 1 seconds (59666688 bytes)
> [   51.442803] tcrypt: test 9 (192 bit key, 1024 byte blocks): 62394
> operations in 1 seconds (63891456 bytes)
> [   52.443606] tcrypt: test 10 (192 bit key, 1472 byte blocks): 42109
> operations in 1 seconds (61984448 bytes)
> [   53.448434] tcrypt: test 11 (192 bit key, 8192 byte blocks): 7900
> operations in 1 seconds (64716800 bytes)
> [   54.453133] tcrypt: test 12 (256 bit key, 16 byte blocks): 386032
> operations in 1 seconds (6176512 bytes)
> [   55.457568] tcrypt: test 13 (256 bit key, 64 byte blocks): 382669
> operations in 1 seconds (24490816 bytes)
> [   56.458258] tcrypt: test 14 (256 bit key, 256 byte blocks): 204926
> operations in 1 seconds (52461056 bytes)
> [   57.462922] tcrypt: test 15 (256 bit key, 1024 byte blocks): 54382
> operations in 1 seconds (55687168 bytes)
> [   58.467448] tcrypt: test 16 (256 bit key, 1472 byte blocks): 36513
> operations in 1 seconds (53747136 bytes)
> [   59.471968] tcrypt: test 17 (256 bit key, 8192 byte blocks): 6851
> operations in 1 seconds (56123392 bytes)
> [   60.488714] tcrypt:
> [   60.488714] testing speed of async cbc(aes) (cbc-aes-neonbs) encryption
> [   60.491836] tcrypt: test 0 (128 bit key, 16 byte blocks): 1570796
> operations in 1 seconds (25132736 bytes)
> [   61.492766] tcrypt: test 1 (128 bit key, 64 byte blocks): 728564
> operations in 1 seconds (46628096 bytes)
> [   62.497077] tcrypt: test 2 (128 bit key, 256 byte blocks): 230454
> operations in 1 seconds (58996224 bytes)
> [   63.497552] tcrypt: test 3 (128 bit key, 1024 byte blocks): 61803
> operations in 1 seconds (63286272 bytes)
> [   64.497913] tcrypt: test 4 (128 bit key, 1472 byte blocks): 43483
> operations in 1 seconds (64006976 bytes)
> [   65.502251] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7890
> operations in 1 seconds (64634880 bytes)
> [   66.506530] tcrypt: test 6 (192 bit key, 16 byte blocks): 1458091
> operations in 1 seconds (23329456 bytes)
> [   67.506856] tcrypt: test 7 (192 bit key, 64 byte blocks): 636185
> operations in 1 seconds (40715840 bytes)
> [   68.507055] tcrypt: test 8 (192 bit key, 256 byte blocks): 194680
> operations in 1 seconds (49838080 bytes)
> [   69.507400] tcrypt: test 9 (192 bit key, 1024 byte blocks): 51911
> operations in 1 seconds (53156864 bytes)
> [   70.511658] tcrypt: test 10 (192 bit key, 1472 byte blocks): 36328
> operations in 1 seconds (53474816 bytes)
> [   71.515969] tcrypt: test 11 (192 bit key, 8192 byte blocks): 6542
> operations in 1 seconds (53592064 bytes)
> [   72.520232] tcrypt: test 12 (256 bit key, 16 byte blocks): 1368657
> operations in 1 seconds (21898512 bytes)
> [   73.524380] tcrypt: test 13 (256 bit key, 64 byte blocks): 568825
> operations in 1 seconds (36404800 bytes)
> [   74.528480] tcrypt: test 14 (256 bit key, 256 byte blocks): 170364
> operations in 1 seconds (43613184 bytes)
> [   75.532745] tcrypt: test 15 (256 bit key, 1024 byte blocks): 44820
> operations in 1 seconds (45895680 bytes)
> [   76.536921] tcrypt: test 16 (256 bit key, 1472 byte blocks): 31345
> operations in 1 seconds (46139840 bytes)
> [   77.541084] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5674
> operations in 1 seconds (46481408 bytes)
> [   78.545207] tcrypt:
> [   78.545207] testing speed of async cbc(aes) (cbc-aes-neonbs) decryption
> [   78.553895] tcrypt: test 0 (128 bit key, 16 byte blocks): 507079
> operations in 1 seconds (8113264 bytes)
> [   79.557077] tcrypt: test 1 (128 bit key, 64 byte blocks): 502559
> operations in 1 seconds (32163776 bytes)
> [   80.557292] tcrypt: test 2 (128 bit key, 256 byte blocks): 272698
> operations in 1 seconds (69810688 bytes)
> [   81.557499] tcrypt: test 3 (128 bit key, 1024 byte blocks): 73650
> operations in 1 seconds (75417600 bytes)
> [   82.557611] tcrypt: test 4 (128 bit key, 1472 byte blocks): 49556
> operations in 1 seconds (72946432 bytes)
> [   83.557737] tcrypt: test 5 (128 bit key, 8192 byte blocks): 9336
> operations in 1 seconds (76480512 bytes)
> [   84.561741] tcrypt: test 6 (192 bit key, 16 byte blocks): 437081
> operations in 1 seconds (6993296 bytes)
> [   85.561733] tcrypt: test 7 (192 bit key, 64 byte blocks): 434321
> operations in 1 seconds (27796544 bytes)
> [   86.561906] tcrypt: test 8 (192 bit key, 256 byte blocks): 232778
> operations in 1 seconds (59591168 bytes)
> [   87.562077] tcrypt: test 9 (192 bit key, 1024 byte blocks): 62394
> operations in 1 seconds (63891456 bytes)
> [   88.566148] tcrypt: test 10 (192 bit key, 1472 byte blocks): 41756
> operations in 1 seconds (61464832 bytes)
> [   89.566319] tcrypt: test 11 (192 bit key, 8192 byte blocks): 7862
> operations in 1 seconds (64405504 bytes)
> [   90.570354] tcrypt: test 12 (256 bit key, 16 byte blocks): 386709
> operations in 1 seconds (6187344 bytes)
> [   91.574264] tcrypt: test 13 (256 bit key, 64 byte blocks): 383279
> operations in 1 seconds (24529856 bytes)
> [   92.574409] tcrypt: test 14 (256 bit key, 256 byte blocks): 203918
> operations in 1 seconds (52203008 bytes)
> [   93.574554] tcrypt: test 15 (256 bit key, 1024 byte blocks): 54203
> operations in 1 seconds (55503872 bytes)
> [   94.578607] tcrypt: test 16 (256 bit key, 1472 byte blocks): 36379
> operations in 1 seconds (53549888 bytes)
> [   95.582670] tcrypt: test 17 (256 bit key, 8192 byte blocks): 6825
> operations in 1 seconds (55910400 bytes)
> [   96.598834] tcrypt: failed to load transform for lrw(aes): -2
> [   96.611007] tcrypt: failed to load transform for lrw(aes): -2
> [   96.623026] tcrypt:
> [   96.623026] testing speed of async xts(aes) (xts-aes-neonbs) encryption
> [   96.626152] tcrypt: test 0 (256 bit key, 16 byte blocks): 1049916
> operations in 1 seconds (16798656 bytes)
> [   97.626651] tcrypt: test 1 (256 bit key, 64 byte blocks): 628670
> operations in 1 seconds (40234880 bytes)
> [   98.626607] tcrypt: test 2 (256 bit key, 256 byte blocks): 272202
> operations in 1 seconds (69683712 bytes)
> [   99.626727] tcrypt: test 3 (256 bit key, 1024 byte blocks): 79299
> operations in 1 seconds (81202176 bytes)
> [  100.626771] tcrypt: test 4 (256 bit key, 1472 byte blocks): 54137
> operations in 1 seconds (79689664 bytes)
> [  101.630823] tcrypt: test 5 (256 bit key, 8192 byte blocks): 10295
> operations in 1 seconds (84336640 bytes)
> [  102.634876] tcrypt: test 6 (512 bit key, 16 byte blocks): 875909
> operations in 1 seconds (14014544 bytes)
> [  103.638777] tcrypt: test 7 (512 bit key, 64 byte blocks): 490152
> operations in 1 seconds (31369728 bytes)
> [  104.638802] tcrypt: test 8 (512 bit key, 256 byte blocks): 206655
> operations in 1 seconds (52903680 bytes)
> [  105.638913] tcrypt: test 9 (512 bit key, 1024 byte blocks): 59127
> operations in 1 seconds (60546048 bytes)
> [  106.642968] tcrypt: test 10 (512 bit key, 1472 byte blocks): 40065
> operations in 1 seconds (58975680 bytes)
> [  107.646785] tcrypt: test 11 (512 bit key, 8192 byte blocks): 7612
> operations in 1 seconds (62357504 bytes)
> [  108.650058] tcrypt:
> [  108.650058] testing speed of async xts(aes) (xts-aes-neonbs) decryption
> [  108.658747] tcrypt: test 0 (256 bit key, 16 byte blocks): 988257
> operations in 1 seconds (15812112 bytes)
> [  109.661062] tcrypt: test 1 (256 bit key, 64 byte blocks): 563062
> operations in 1 seconds (36035968 bytes)
> [  110.660328] tcrypt: test 2 (256 bit key, 256 byte blocks): 246292
> operations in 1 seconds (63050752 bytes)
> [  111.659706] tcrypt: test 3 (256 bit key, 1024 byte blocks): 70928
> operations in 1 seconds (72630272 bytes)
> [  112.663032] tcrypt: test 4 (256 bit key, 1472 byte blocks): 48127
> operations in 1 seconds (70842944 bytes)
> [  113.666338] tcrypt: test 5 (256 bit key, 8192 byte blocks): 9138
> operations in 1 seconds (74858496 bytes)
> [  114.669650] tcrypt: test 6 (512 bit key, 16 byte blocks): 809679
> operations in 1 seconds (12954864 bytes)
> [  115.668960] tcrypt: test 7 (512 bit key, 64 byte blocks): 433846
> operations in 1 seconds (27766144 bytes)
> [  116.668338] tcrypt: test 8 (512 bit key, 256 byte blocks): 185424
> operations in 1 seconds (47468544 bytes)
> [  117.667842] tcrypt: test 9 (512 bit key, 1024 byte blocks): 52298
> operations in 1 seconds (53553152 bytes)
> [  118.671236] tcrypt: test 10 (512 bit key, 1472 byte blocks): 35382
> operations in 1 seconds (52082304 bytes)
> [  119.674752] tcrypt: test 11 (512 bit key, 8192 byte blocks): 6715
> operations in 1 seconds (55009280 bytes)
> [  120.690195] tcrypt:
> [  120.690195] testing speed of async cts(cbc(aes)) (cts-cbc-aes-neon)
> encryption
> [  120.693927] tcrypt: test 0 (128 bit key, 16 byte blocks): 1463922
> operations in 1 seconds (23422752 bytes)
> [  121.693576] tcrypt: test 1 (128 bit key, 64 byte blocks): 558509
> operations in 1 seconds (35744576 bytes)
> [  122.696941] tcrypt: test 2 (128 bit key, 256 byte blocks): 206901
> operations in 1 seconds (52966656 bytes)
> [  123.696534] tcrypt: test 3 (128 bit key, 1024 byte blocks): 59201
> operations in 1 seconds (60621824 bytes)
> [  124.700019] tcrypt: test 4 (128 bit key, 1472 byte blocks): 41776
> operations in 1 seconds (61494272 bytes)
> [  125.703545] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7668
> operations in 1 seconds (62816256 bytes)
> [  126.707049] tcrypt: test 6 (192 bit key, 16 byte blocks): 1364595
> operations in 1 seconds (21833520 bytes)
> [  127.706592] tcrypt: test 7 (192 bit key, 64 byte blocks): 503147
> operations in 1 seconds (32201408 bytes)
> [  128.710059] tcrypt: test 8 (192 bit key, 256 byte blocks): 177555
> operations in 1 seconds (45454080 bytes)
> [  129.709723] tcrypt: test 9 (192 bit key, 1024 byte blocks): 49679
> operations in 1 seconds (50871296 bytes)
> [  130.713290] tcrypt: test 10 (192 bit key, 1472 byte blocks): 34970
> operations in 1 seconds (51475840 bytes)
> [  131.716973] tcrypt: test 11 (192 bit key, 8192 byte blocks): 6367
> operations in 1 seconds (52158464 bytes)
> [  132.720614] tcrypt: test 12 (256 bit key, 16 byte blocks): 1283895
> operations in 1 seconds (20542320 bytes)
> [  133.724150] tcrypt: test 13 (256 bit key, 64 byte blocks): 457627
> operations in 1 seconds (29288128 bytes)
> [  134.727676] tcrypt: test 14 (256 bit key, 256 byte blocks): 156458
> operations in 1 seconds (40053248 bytes)
> [  135.731388] tcrypt: test 15 (256 bit key, 1024 byte blocks): 43053
> operations in 1 seconds (44086272 bytes)
> [  136.735034] tcrypt: test 16 (256 bit key, 1472 byte blocks): 30275
> operations in 1 seconds (44564800 bytes)
> [  137.738663] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5544
> operations in 1 seconds (45416448 bytes)
> [  138.742355] tcrypt:
> [  138.742355] testing speed of async cts(cbc(aes)) (cts-cbc-aes-neon)
> decryption
> [  138.751641] tcrypt: test 0 (128 bit key, 16 byte blocks): 1346320
> operations in 1 seconds (21541120 bytes)
> [  139.753869] tcrypt: test 1 (128 bit key, 64 byte blocks): 490910
> operations in 1 seconds (31418240 bytes)
> [  140.757441] tcrypt: test 2 (128 bit key, 256 byte blocks): 187922
> operations in 1 seconds (48108032 bytes)
> [  141.757206] tcrypt: test 3 (128 bit key, 1024 byte blocks): 54591
> operations in 1 seconds (55901184 bytes)
> [  142.760888] tcrypt: test 4 (128 bit key, 1472 byte blocks): 38584
> operations in 1 seconds (56795648 bytes)
> [  143.764589] tcrypt: test 5 (128 bit key, 8192 byte blocks): 7103
> operations in 1 seconds (58187776 bytes)
> [  144.768315] tcrypt: test 6 (192 bit key, 16 byte blocks): 1242700
> operations in 1 seconds (19883200 bytes)
> [  145.771971] tcrypt: test 7 (192 bit key, 64 byte blocks): 437461
> operations in 1 seconds (27997504 bytes)
> [  146.775577] tcrypt: test 8 (192 bit key, 256 byte blocks): 160197
> operations in 1 seconds (41010432 bytes)
> [  147.775393] tcrypt: test 9 (192 bit key, 1024 byte blocks): 45642
> operations in 1 seconds (46737408 bytes)
> [  148.779096] tcrypt: test 10 (192 bit key, 1472 byte blocks): 32063
> operations in 1 seconds (47196736 bytes)
> [  149.778946] tcrypt: test 11 (192 bit key, 8192 byte blocks): 5877
> operations in 1 seconds (48144384 bytes)
> [  150.782631] tcrypt: test 12 (256 bit key, 16 byte blocks): 1152081
> operations in 1 seconds (18433296 bytes)
> [  151.786402] tcrypt: test 13 (256 bit key, 64 byte blocks): 394347
> operations in 1 seconds (25238208 bytes)
> [  152.790040] tcrypt: test 14 (256 bit key, 256 byte blocks): 140441
> operations in 1 seconds (35952896 bytes)
> [  153.793884] tcrypt: test 15 (256 bit key, 1024 byte blocks): 39333
> operations in 1 seconds (40276992 bytes)
> [  154.797644] tcrypt: test 16 (256 bit key, 1472 byte blocks): 27695
> operations in 1 seconds (40767040 bytes)
> [  155.801405] tcrypt: test 17 (256 bit key, 8192 byte blocks): 5092
> operations in 1 seconds (41713664 bytes)
> [  156.817348] tcrypt:
> [  156.817348] testing speed of async ctr(aes) (ctr-aes-neonbs) encryption
> [  156.820477] tcrypt: test 0 (128 bit key, 16 byte blocks): 558004
> operations in 1 seconds (8928064 bytes)
> [  157.820655] tcrypt: test 1 (128 bit key, 64 byte blocks): 552378
> operations in 1 seconds (35352192 bytes)
> [  158.820516] tcrypt: test 2 (128 bit key, 256 byte blocks): 301788
> operations in 1 seconds (77257728 bytes)
> [  159.820378] tcrypt: test 3 (128 bit key, 1024 byte blocks): 82386
> operations in 1 seconds (84363264 bytes)
> [  160.820178] tcrypt: test 4 (128 bit key, 1472 byte blocks): 55748
> operations in 1 seconds (82061056 bytes)
> [  161.823966] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10456
> operations in 1 seconds (85655552 bytes)
> [  162.827802] tcrypt: test 6 (192 bit key, 16 byte blocks): 487469
> operations in 1 seconds (7799504 bytes)
> [  163.831366] tcrypt: test 7 (192 bit key, 64 byte blocks): 481048
> operations in 1 seconds (30787072 bytes)
> [  164.831245] tcrypt: test 8 (192 bit key, 256 byte blocks): 259173
> operations in 1 seconds (66348288 bytes)
> [  165.831132] tcrypt: test 9 (192 bit key, 1024 byte blocks): 69847
> operations in 1 seconds (71523328 bytes)
> [  166.830942] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47193
> operations in 1 seconds (69468096 bytes)
> [  167.834846] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8846
> operations in 1 seconds (72466432 bytes)
> [  168.838559] tcrypt: test 12 (256 bit key, 16 byte blocks): 431442
> operations in 1 seconds (6903072 bytes)
> [  169.842284] tcrypt: test 13 (256 bit key, 64 byte blocks): 426738
> operations in 1 seconds (27311232 bytes)
> [  170.842187] tcrypt: test 14 (256 bit key, 256 byte blocks): 228219
> operations in 1 seconds (58424064 bytes)
> [  171.842107] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61173
> operations in 1 seconds (62641152 bytes)
> [  172.845937] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41113
> operations in 1 seconds (60518336 bytes)
> [  173.849750] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7708
> operations in 1 seconds (63143936 bytes)
> [  174.853539] tcrypt:
> [  174.853539] testing speed of async ctr(aes) (ctr-aes-neonbs) decryption
> [  174.862225] tcrypt: test 0 (128 bit key, 16 byte blocks): 559705
> operations in 1 seconds (8955280 bytes)
> [  175.865147] tcrypt: test 1 (128 bit key, 64 byte blocks): 552547
> operations in 1 seconds (35363008 bytes)
> [  176.865060] tcrypt: test 2 (128 bit key, 256 byte blocks): 301757
> operations in 1 seconds (77249792 bytes)
> [  177.864991] tcrypt: test 3 (128 bit key, 1024 byte blocks): 82715
> operations in 1 seconds (84700160 bytes)
> [  178.868853] tcrypt: test 4 (128 bit key, 1472 byte blocks): 55752
> operations in 1 seconds (82066944 bytes)
> [  179.872675] tcrypt: test 5 (128 bit key, 8192 byte blocks): 10456
> operations in 1 seconds (85655552 bytes)
> [  180.876570] tcrypt: test 6 (192 bit key, 16 byte blocks): 487550
> operations in 1 seconds (7800800 bytes)
> [  181.880188] tcrypt: test 7 (192 bit key, 64 byte blocks): 481235
> operations in 1 seconds (30799040 bytes)
> [  182.880127] tcrypt: test 8 (192 bit key, 256 byte blocks): 259126
> operations in 1 seconds (66336256 bytes)
> [  183.880073] tcrypt: test 9 (192 bit key, 1024 byte blocks): 70129
> operations in 1 seconds (71812096 bytes)
> [  184.883927] tcrypt: test 10 (192 bit key, 1472 byte blocks): 47194
> operations in 1 seconds (69469568 bytes)
> [  185.887877] tcrypt: test 11 (192 bit key, 8192 byte blocks): 8844
> operations in 1 seconds (72450048 bytes)
> [  186.891622] tcrypt: test 12 (256 bit key, 16 byte blocks): 431432
> operations in 1 seconds (6902912 bytes)
> [  187.895391] tcrypt: test 13 (256 bit key, 64 byte blocks): 426730
> operations in 1 seconds (27310720 bytes)
> [  188.895339] tcrypt: test 14 (256 bit key, 256 byte blocks): 229104
> operations in 1 seconds (58650624 bytes)
> [  189.899295] tcrypt: test 15 (256 bit key, 1024 byte blocks): 61172
> operations in 1 seconds (62640128 bytes)
> [  190.903168] tcrypt: test 16 (256 bit key, 1472 byte blocks): 41112
> operations in 1 seconds (60516864 bytes)
> [  191.907041] tcrypt: test 17 (256 bit key, 8192 byte blocks): 7708
> operations in 1 seconds (63143936 bytes)
> [  192.922753] tcrypt: failed to load transform for cfb(aes): -2
> [  192.934617] tcrypt: failed to load transform for cfb(aes): -2
> [  192.946539] tcrypt: failed to load transform for ofb(aes): -2
> [  192.958443] tcrypt: failed to load transform for ofb(aes): -2
> [  192.988254] tcrypt:
> [  192.988254] testing speed of async rfc3686(ctr(aes))
> (rfc3686(ctr-aes-neonbs)) encryption
> [  192.992959] tcrypt: test 0 (160 bit key, 16 byte blocks): 530041
> operations in 1 seconds (8480656 bytes)
> [  193.994478] tcrypt: test 1 (160 bit key, 64 byte blocks): 522344
> operations in 1 seconds (33430016 bytes)
> [  194.994434] tcrypt: test 2 (160 bit key, 256 byte blocks): 287702
> operations in 1 seconds (73651712 bytes)
> [  195.994407] tcrypt: test 3 (160 bit key, 1024 byte blocks): 79702
> operations in 1 seconds (81614848 bytes)
> [  196.998278] tcrypt: test 4 (160 bit key, 1472 byte blocks): 53817
> operations in 1 seconds (79218624 bytes)
> [  198.002158] tcrypt: test 5 (160 bit key, 8192 byte blocks): 10108
> operations in 1 seconds (82804736 bytes)
> [  199.006049] tcrypt: test 6 (224 bit key, 16 byte blocks): 464064
> operations in 1 seconds (7425024 bytes)
> [  200.009707] tcrypt: test 7 (224 bit key, 64 byte blocks): 457134
> operations in 1 seconds (29256576 bytes)
> [  201.009682] tcrypt: test 8 (224 bit key, 256 byte blocks): 248692
> operations in 1 seconds (63665152 bytes)
> [  202.009639] tcrypt: test 9 (224 bit key, 1024 byte blocks): 67920
> operations in 1 seconds (69550080 bytes)
> [  203.013518] tcrypt: test 10 (224 bit key, 1472 byte blocks): 45775
> operations in 1 seconds (67380800 bytes)
> [  204.017482] tcrypt: test 11 (224 bit key, 8192 byte blocks): 8592
> operations in 1 seconds (70385664 bytes)
> [  205.021339] tcrypt: test 12 (288 bit key, 16 byte blocks): 411989
> operations in 1 seconds (6591824 bytes)
> [  206.025076] tcrypt: test 13 (288 bit key, 64 byte blocks): 406336
> operations in 1 seconds (26005504 bytes)
> [  207.025055] tcrypt: test 14 (288 bit key, 256 byte blocks): 219800
> operations in 1 seconds (56268800 bytes)
> [  208.029027] tcrypt: test 15 (288 bit key, 1024 byte blocks): 59172
> operations in 1 seconds (60592128 bytes)
> [  209.032912] tcrypt: test 16 (288 bit key, 1472 byte blocks): 39815
> operations in 1 seconds (58607680 bytes)
> [  210.036794] tcrypt: test 17 (288 bit key, 8192 byte blocks): 7473
> operations in 1 seconds (61218816 bytes)
> [  211.040655] tcrypt:
> [  211.040655] testing speed of async rfc3686(ctr(aes))
> (rfc3686(ctr-aes-neonbs)) decryption
> [  211.050885] tcrypt: test 0 (160 bit key, 16 byte blocks): 530361
> operations in 1 seconds (8485776 bytes)
> [  212.052309] tcrypt: test 1 (160 bit key, 64 byte blocks): 522226
> operations in 1 seconds (33422464 bytes)
> [  213.052282] tcrypt: test 2 (160 bit key, 256 byte blocks): 287970
> operations in 1 seconds (73720320 bytes)
> [  214.052242] tcrypt: test 3 (160 bit key, 1024 byte blocks): 79406
> operations in 1 seconds (81311744 bytes)
> [  215.052137] tcrypt: test 4 (160 bit key, 1472 byte blocks): 53819
> operations in 1 seconds (79221568 bytes)
> [  216.056044] tcrypt: test 5 (160 bit key, 8192 byte blocks): 10107
> operations in 1 seconds (82796544 bytes)
> [  217.060020] tcrypt: test 6 (224 bit key, 16 byte blocks): 464394
> operations in 1 seconds (7430304 bytes)
> [  218.063644] tcrypt: test 7 (224 bit key, 64 byte blocks): 457574
> operations in 1 seconds (29284736 bytes)
> [  219.063618] tcrypt: test 8 (224 bit key, 256 byte blocks): 248820
> operations in 1 seconds (63697920 bytes)
> [  220.063607] tcrypt: test 9 (224 bit key, 1024 byte blocks): 67826
> operations in 1 seconds (69453824 bytes)
> [  221.067506] tcrypt: test 10 (224 bit key, 1472 byte blocks): 45696
> operations in 1 seconds (67264512 bytes)
> [  222.071489] tcrypt: test 11 (224 bit key, 8192 byte blocks): 8577
> operations in 1 seconds (70262784 bytes)
> [  223.075372] tcrypt: test 12 (288 bit key, 16 byte blocks): 411815
> operations in 1 seconds (6589040 bytes)
> [  224.079104] tcrypt: test 13 (288 bit key, 64 byte blocks): 406618
> operations in 1 seconds (26023552 bytes)
> [  225.079084] tcrypt: test 14 (288 bit key, 256 byte blocks): 219788
> operations in 1 seconds (56265728 bytes)
> [  226.083072] tcrypt: test 15 (288 bit key, 1024 byte blocks): 59164
> operations in 1 seconds (60583936 bytes)
> [  227.086970] tcrypt: test 16 (288 bit key, 1472 byte blocks):
> [  227.429947] audit: type=1006 audit(1576066039.080:23): pid=384
> uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295
> ses=3 res=1
> [  228.086797] 39701 operations in 1 seconds (58439872 bytes)
> [  228.086826] tcrypt: test 17 (288 bit key, 8192 byte blocks): 7470
> operations in 1 seconds (61194240 bytes)
> modprobe: ERROR: could not insert 'tcrypt': Resource temporarily unavailable
>
> -Anand
Martin Blumenstingl Dec. 11, 2019, 11:30 p.m. UTC | #11
Hi Anand,

On Wed, Dec 11, 2019 at 2:17 PM Anand Moon <moon.linux@yahoo.com> wrote:
[...]
> Sorry once again I send my logs too early.
> I still having some issue with the Hardware glx cryto module.
I'm surprised to see that you managed to get the GXL crypto driver to
load at all on GXBB
as far as I know GXBB uses an older crypto IP block (BLKMV) than GXL
(and newer SoCs, called "DMA"): [0]

so my understanding is that a new crypto driver is needed for GXBB
(BLKMV registers) support.
the 32-bit SoCs use the same BLKMV IP block as far as I can tell, so
these would also benefit from this other driver.
(I don't know if anyone is working on a BLKMV crypto driver - all I
can tell is that I'm not working on one)


Martin


[0] https://github.com/khadas/linux/blob/195ea69f96d9bddc1386737e89769ff350762aea/drivers/amlogic/crypto/Kconfig
Anand Moon Dec. 12, 2019, 6:23 a.m. UTC | #12
Hi Martin,

On Thu, 12 Dec 2019 at 05:00, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Wed, Dec 11, 2019 at 2:17 PM Anand Moon <moon.linux@yahoo.com> wrote:
> [...]
> > Sorry once again I send my logs too early.
> > I still having some issue with the Hardware glx cryto module.
> I'm surprised to see that you managed to get the GXL crypto driver to
> load at all on GXBB
> as far as I know GXBB uses an older crypto IP block (BLKMV) than GXL
> (and newer SoCs, called "DMA"): [0]
>
> so my understanding is that a new crypto driver is needed for GXBB
> (BLKMV registers) support.
> the 32-bit SoCs use the same BLKMV IP block as far as I can tell, so
> these would also benefit from this other driver.
> (I don't know if anyone is working on a BLKMV crypto driver - all I
> can tell is that I'm not working on one)
>
>
> Martin
>
>
> [0] https://github.com/khadas/linux/blob/195ea69f96d9bddc1386737e89769ff350762aea/drivers/amlogic/crypto/Kconfig

*You are absolutely correct. current crypto GLX driver might not work for GXBB*
Yes new crypto driver is needed for this board. I will try to study on
this feature.

But both S805 and S905 share the same crypto IP block for.sure see below link.
[0]  https://github.com/khadas/linux/blob/195ea69f96d9bddc1386737e89769ff350762aea/Documentation/devicetree/bindings/crypto/aml-crypto.txt#L1-L61

It's not working see the debug logs.
[alarm@alarm ~]$ sudo modprobe tcrypt sec=1 mode=500
[sudo] password for alarm:
[   39.567302] tcrypt:
[   39.567302] testing speed of async ecb(aes) (ecb-aes-gxl) encryption
[   39.570171] tcrypt: test 0 (128 bit key, 16 byte blocks):
[   39.570229] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=16 flow=1
[   41.598687] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   41.598900] tcrypt: encryption() failed flags=0
[   41.603383] tcrypt: test 0 (192 bit key, 16 byte blocks):
[   41.603424] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=24 flow=0
[   43.646686] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   43.646900] tcrypt: encryption() failed flags=0
[   43.651378] tcrypt: test 0 (256 bit key, 16 byte blocks):
[   43.651419] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=32 flow=1
[   45.694691] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   45.694902] tcrypt: encryption() failed flags=0
[   45.699419] tcrypt:
[   45.699419] testing speed of async ecb(aes) (ecb-aes-gxl) decryption
[   45.707838] tcrypt: test 0 (128 bit key, 16 byte blocks):
[   45.707872] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=16 flow=0
[   47.742677] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   47.742879] tcrypt: decryption() failed flags=0
[   47.747366] tcrypt: test 0 (192 bit key, 16 byte blocks):
[   47.747402] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=24 flow=1
[   49.790684] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   49.790898] tcrypt: decryption() failed flags=0
[   49.795380] tcrypt: test 0 (256 bit key, 16 byte blocks):
[   49.795420] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=32 flow=0
[   51.838680] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   51.838894] tcrypt: decryption() failed flags=0
[   51.852005] tcrypt:
[   51.852005] testing speed of async cbc(aes) (cbc-aes-gxl) encryption
[   51.854903] tcrypt: test 0 (128 bit key, 16 byte blocks):
[   51.854941] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=16 flow=1
[   53.886678] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   53.886882] tcrypt: encryption() failed flags=0
[   53.891385] tcrypt: test 0 (192 bit key, 16 byte blocks):
[   53.891428] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=24 flow=0
[   55.934686] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   55.934901] tcrypt: encryption() failed flags=0
[   55.939410] tcrypt: test 0 (256 bit key, 16 byte blocks):
[   55.939447] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=32 flow=1
[   57.982684] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   57.982899] tcrypt: encryption() failed flags=0
[   57.987429] tcrypt:
[   57.987429] testing speed of async cbc(aes) (cbc-aes-gxl) decryption
[   57.995832] tcrypt: test 0 (128 bit key, 16 byte blocks):
[   57.995864] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=16 flow=0
[   60.030680] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   60.030880] tcrypt: decryption() failed flags=0
[   60.035369] tcrypt: test 0 (192 bit key, 16 byte blocks):
[   60.035406] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=24 flow=1
[   62.078678] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[   62.078888] tcrypt: decryption() failed flags=0
[   62.083377] tcrypt: test 0 (256 bit key, 16 byte blocks):
[   62.083416] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=32 flow=0
[   64.126684] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[   64.126899] tcrypt: decryption() failed flags=0
[   64.143285] tcrypt: failed to load transform for lrw(aes): -2
[   64.155243] tcrypt: failed to load transform for lrw(aes): -2
[   64.167318] tcrypt:

-Anand