looiuuioi
Posts: 2
Joined: Tue Mar 07, 2017 7:59 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Sun Dec 15, 2019 9:01 pm

andrum99 wrote:
Wed Nov 20, 2019 4:29 am
But it's still ultimately Broadcom's decision what goes in their chips. That's not the same as saying Raspberry Pi have no influence.
Well, it's the foundations choice which SoC to use. If the community demands crypto extensions, the foundation will probably choose the next SoC accordingly. It's really that the Pi 4 is such an awesome device but lacks this feature about which I share the opinion that it is an essential feature (SSH, HTTPS, crypted storage ...). I would happily spend 10 bugs more if crypto extensions were available. And If the foundation thins this is not an essential feature, why not use variants of the device like the 1,3 and 4G of RAM (best case: same chip with crypto extension or without for ease of maintanance)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Tue Dec 17, 2019 11:47 am

looiuuioi wrote:
Sun Dec 15, 2019 9:01 pm
andrum99 wrote:
Wed Nov 20, 2019 4:29 am
But it's still ultimately Broadcom's decision what goes in their chips. That's not the same as saying Raspberry Pi have no influence.
Well, it's the foundations choice which SoC to use. If the community demands crypto extensions, the foundation will probably choose the next SoC accordingly. It's really that the Pi 4 is such an awesome device but lacks this feature about which I share the opinion that it is an essential feature (SSH, HTTPS, crypted storage ...). I would happily spend 10 bugs more if crypto extensions were available. And If the foundation thins this is not an essential feature, why not use variants of the device like the 1,3 and 4G of RAM (best case: same chip with crypto extension or without for ease of maintanance)
The demand would have to be HUGE for us to change SoC manufacturer just for crypto extensions. It isn't, as shown by the small number of people on this thread. Having some devices with it and some without would be a logistical nightmare.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Aardappeltaart
Posts: 117
Joined: Wed Mar 02, 2016 11:32 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Dec 18, 2019 10:49 am

jamesh wrote:
Tue Dec 17, 2019 11:47 am


The demand would have to be HUGE for us to change SoC manufacturer just for crypto extensions. It isn't, as shown by the small number of people on this thread. Having some devices with it and some without would be a logistical nightmare.

+10 for crypto extensions.

I was a bit disappointed to see that it was not available on the new PI4. Since HTTPS is a requirement on the internet since a few years, it would have been a worthwhile addition.

It would be nice to see browser benchmarks on comparable boards with crypto extensions dis/en-abled, or for encrypted backups.

I doubt if the number of people on this thread is a good indication for demand, but if it raised the price of the RPI4 with 1 dollar, I would have paid it happily.

Heater
Posts: 15941
Joined: Tue Jul 17, 2012 3:02 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Dec 18, 2019 11:23 am

Aardappeltaart,
I was a bit disappointed to see that it was not available on the new PI4. Since HTTPS is a requirement on the internet since a few years, it would have been a worthwhile addition.
You disappointed yourself for no reason.

When switching to HTTPS there is a performance drop over HTTPS. Due to the extra round trips to the server required for the TLS handshake. Given the network latencies involved the overheads of not having hardware accelerated cryto would not even show up in the noise. You would not notice any slow down.

Then for the rest of the loading and rendering of web page content the network delays, parsing of HTML and CSS etc take the most of the time. Not to mention running all that Javascript people like to load pages up with now a days. Again any slow down due to the lack of hardware crypto would not be perceptible to the user.

See here for benchmark comparisons and discussion of HTTP ves HTTPS performance: https://www.keycdn.com/blog/https-performance-overhead
It would be nice to see browser benchmarks on comparable boards with crypto extensions dis/en-abled, or for encrypted backups.
We can see already that hardware encryption would not make a difference perceptible to the user.
..if it raised the price of the RPI4 with 1 dollar, I would have paid it happily.
Don't be disappointed at the lack of crypto you would not have noticed anyway. Be happy you saved a dollar, something you can count!
Memory in C++ is a leaky abstraction .

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Dec 18, 2019 11:48 am

What heater said, but also worth noting that there are some noticeable slow downs outside the browser arena - for example large file copies using encrypted SSH will be a bit slower because there is no HW support, and of course there is higher CPU load whilst it is happening so a tiny bit more heat to dissipate.

As for raising the price, it really isn't that simple. We have a price ladder, and it's always been 25,35 (then 45,55). Making is 26,36,46,56 or something like that would NOT be a good marketing move. For example, not everyone ants it but everyone would be paying for it. So we would need to retain our pricing, and that means the cost of the extensions would need to be absorbed, meaning less profit for the channel. This applies to all those features people say they would pay more for but that not everyone needs.

And of course, there is the additional difficulty of adding these extensions to a preexisting chip. That is VERY VERY expensive, both in money and time - it's probably at least a year to do something like that (design, testing in simulation, testing in FPGA, tape out, silicon testing, then release).

In short, addings silicon features is not easy and needs a VERY robust reason before it is considered.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Aardappeltaart
Posts: 117
Joined: Wed Mar 02, 2016 11:32 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Sun Jan 05, 2020 12:40 pm

On a ARM72 Cryptography Unit is optional:
https://developer.arm.com/ip-products/p ... cortex-a72

I was disappointed because I looked up the specs when the RPI4 was introduced. Optional, checked: the RPI4 doesn't have it.
;(

IMHO encryption is used everywhere and always nowadays in every form of communication: HTTPS, rsync, ssh, backups etc. Thus I would say important.

Probably more useful then MPEG2 HW-decoding, or even H264 HW-encoding: speed is nice, quality sucks.

That 1 dollar remark was made because I'm curious about the extra costs for hardware crypto extension enabled/added.

I wonder if the extensions were skipped on the RPI4 because it was to expensive (production / patents), to complicated (hardware/software), or simply because there is no practical perceptible gain to expect.

Speed is not all, I mostly worry about my RPI4 running hot (especially in summer), and interference.

andrum99
Posts: 1219
Joined: Fri Jul 20, 2012 2:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Sun Jan 05, 2020 4:14 pm

Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
IMHO encryption is used everywhere and always nowadays in every form of communication
It is, but you are unlikely to notice the difference, as Heater said above. There's nothing stopping you using a board with a different chip if you prefer either.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Sun Jan 05, 2020 4:48 pm

Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
On a ARM72 Cryptography Unit is optional:
https://developer.arm.com/ip-products/p ... cortex-a72

I was disappointed because I looked up the specs when the RPI4 was introduced. Optional, checked: the RPI4 doesn't have it.
;(

IMHO encryption is used everywhere and always nowadays in every form of communication: HTTPS, rsync, ssh, backups etc. Thus I would say important.

Probably more useful then MPEG2 HW-decoding, or even H264 HW-encoding: speed is nice, quality sucks.

That 1 dollar remark was made because I'm curious about the extra costs for hardware crypto extension enabled/added.

I wonder if the extensions were skipped on the RPI4 because it was to expensive (production / patents), to complicated (hardware/software), or simply because there is no practical perceptible gain to expect.

Speed is not all, I mostly worry about my RPI4 running hot (especially in summer), and interference.
The cost in silicon area is minimal. The cost to put it on the chip is huge ($millions). No idea why it's not there, probably because the use case (from Broadcom's point of view) never required it.

Nothing wrong the with HW H264 encoder. Incredibly low power for its performance. Without it you might as well throw most camera applications away. And anyway, getting rid of HW features that are already there is easy (ish). Adding new HW features is not.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Aardappeltaart
Posts: 117
Joined: Wed Mar 02, 2016 11:32 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Jan 08, 2020 1:12 pm

jamesh wrote:
Sun Jan 05, 2020 4:48 pm
Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
On a ARM72 Cryptography Unit is optional:
https://developer.arm.com/ip-products/p ... cortex-a72

I was disappointed because I looked up the specs when the RPI4 was introduced. Optional, checked: the RPI4 doesn't have it.
;(

IMHO encryption is used everywhere and always nowadays in every form of communication: HTTPS, rsync, ssh, backups etc. Thus I would say important.

Probably more useful then MPEG2 HW-decoding, or even H264 HW-encoding: speed is nice, quality sucks.

That 1 dollar remark was made because I'm curious about the extra costs for hardware crypto extension enabled/added.

I wonder if the extensions were skipped on the RPI4 because it was to expensive (production / patents), to complicated (hardware/software), or simply because there is no practical perceptible gain to expect.

Speed is not all, I mostly worry about my RPI4 running hot (especially in summer), and interference.
The cost in silicon area is minimal. The cost to put it on the chip is huge ($millions). No idea why it's not there, probably because the use case (from Broadcom's point of view) never required it.

Nothing wrong the with HW H264 encoder. Incredibly low power for its performance. Without it you might as well throw most camera applications away. And anyway, getting rid of HW features that are already there is easy (ish). Adding new HW features is not.
I certainly agree it is useful.

But
Hardware encoders typically generate output of significantly lower quality than good software encoders like x264, but are generally faster and do not use much CPU resource
.
https://trac.ffmpeg.org/wiki/HWAccelIntro

IMHO that's the case on the RPI. Never found a good setting for converting DVD to h264 on the RPI with HWA. Always disappointed with the quality/filesize ratio. Turned to HW/SW-encoding on my desktop for much better results.

It also lacks -crf and -tune settings last time I tried it.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Jan 08, 2020 2:57 pm

Aardappeltaart wrote:
Wed Jan 08, 2020 1:12 pm
jamesh wrote:
Sun Jan 05, 2020 4:48 pm
Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
On a ARM72 Cryptography Unit is optional:
https://developer.arm.com/ip-products/p ... cortex-a72

I was disappointed because I looked up the specs when the RPI4 was introduced. Optional, checked: the RPI4 doesn't have it.
;(

IMHO encryption is used everywhere and always nowadays in every form of communication: HTTPS, rsync, ssh, backups etc. Thus I would say important.

Probably more useful then MPEG2 HW-decoding, or even H264 HW-encoding: speed is nice, quality sucks.

That 1 dollar remark was made because I'm curious about the extra costs for hardware crypto extension enabled/added.

I wonder if the extensions were skipped on the RPI4 because it was to expensive (production / patents), to complicated (hardware/software), or simply because there is no practical perceptible gain to expect.

Speed is not all, I mostly worry about my RPI4 running hot (especially in summer), and interference.
The cost in silicon area is minimal. The cost to put it on the chip is huge ($millions). No idea why it's not there, probably because the use case (from Broadcom's point of view) never required it.

Nothing wrong the with HW H264 encoder. Incredibly low power for its performance. Without it you might as well throw most camera applications away. And anyway, getting rid of HW features that are already there is easy (ish). Adding new HW features is not.
I certainly agree it is useful.

But
Hardware encoders typically generate output of significantly lower quality than good software encoders like x264, but are generally faster and do not use much CPU resource
.
https://trac.ffmpeg.org/wiki/HWAccelIntro

IMHO that's the case on the RPI. Never found a good setting for converting DVD to h264 on the RPI with HWA. Always disappointed with the quality/filesize ratio. Turned to HW/SW-encoding on my desktop for much better results.

It also lacks -crf and -tune settings last time I tried it.
That's correct. HW encoders need to work in real time (ie at 30fps compress a frame in 33ms), software encoders do not, and can therefore use multiple passes etc to get better compression, including B frames which a HW encoder cannot do (usually) because of latency limitations. And of course better compression means higher quality at the same bit rate.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

HimbeerKuchenBretter
Posts: 8
Joined: Sat Nov 23, 2019 1:43 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Sun Feb 23, 2020 8:06 pm

can this module be enabled on pi4?

Code: Select all

modinfo aes-arm64 
filename:       /lib/modules/4.19.75-v8+/kernel/arch/arm64/crypto/aes-arm64.ko
alias:          crypto-aes
alias:          aes
license:        GPL v2
author:         Ard Biesheuvel <ard.biesheuvel@linaro.org>
description:    Scalar AES cipher for arm64
srcversion:     033E66916F2503FEFD000C8
depends:        
intree:         Y
name:           aes_arm64
vermagic:       4.19.75-v8+ SMP preempt mod_unload modversions aarch64

Code: Select all

openssl speed -elapsed -evp aes-256-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 10598950 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 3166839 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 840715 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 212551 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 26483 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 16384 size blocks: 13250 aes-256-cbc's in 3.00s
OpenSSL 1.1.1d  10 Sep 2019
built on: Sat Oct 12 19:56:43 2019 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr) 
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-f5SJyA/openssl-1.1.1d=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -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
aes-256-cbc      56527.73k    67559.23k    71741.01k    72550.74k    72316.25k    72362.67k

Code: Select all

cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 1
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 2
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 3
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

Hardware        : BCM2835
Revision        : c03111
Serial          : 10000000b6f6fde4
Model           : Raspberry Pi 4 Model B Rev 1.1

singhharry123
Posts: 3
Joined: Mon Apr 13, 2020 2:05 pm

Re: BCM2711 and ARMv8 Crypto Extensions

Tue Apr 14, 2020 8:24 am

Hi,

I have the following queries related to raspberry pi 4 EEPROM:

1.what is crypto Extensions?
2. Does pi 4 ( BCM2711 and ARMv8) has Crypto Extensions?

Thanks,
Harvinder Singh

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Tue Apr 14, 2020 8:36 am

1. HW extension in the SoC to provide acceleration for cryptographic calculations.
2. No.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

nogra
Posts: 1
Joined: Fri May 22, 2020 7:50 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Fri May 22, 2020 7:53 am

andrum99 wrote:
Sun Jan 05, 2020 4:14 pm
Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
IMHO encryption is used everywhere and always nowadays in every form of communication
It is, but you are unlikely to notice the difference, as Heater said above. There's nothing stopping you using a board with a different chip if you prefer either.
Is there a similar board to the Pi4 (usb 3.0, Gigabit Ethernet) with a chip that supports HW encryption?

bjlockie
Posts: 44
Joined: Sat Feb 14, 2015 12:28 am

Re: BCM2837B0 and ARMv8 Crypto Extensions

Tue Jun 09, 2020 5:05 am

nogra wrote:
Fri May 22, 2020 7:53 am
Is there a similar board to the Pi4 (usb 3.0, Gigabit Ethernet) with a chip that supports HW encryption?
I also want to know.

Is there a coprocessor that can be attached to a Pi4?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26649
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Tue Jun 09, 2020 5:52 am

No, but I believe that the latest crypto code now has neon to do this which makes it a lot faster.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

mutatrum
Posts: 1
Joined: Mon Jul 27, 2020 3:49 pm

Re: BCM2837B0 and ARMv8 Crypto Extensions

Wed Jul 29, 2020 4:06 pm

nogra wrote:
Fri May 22, 2020 7:53 am
andrum99 wrote:
Sun Jan 05, 2020 4:14 pm
Aardappeltaart wrote:
Sun Jan 05, 2020 12:40 pm
IMHO encryption is used everywhere and always nowadays in every form of communication
It is, but you are unlikely to notice the difference, as Heater said above. There's nothing stopping you using a board with a different chip if you prefer either.
Is there a similar board to the Pi4 (usb 3.0, Gigabit Ethernet) with a chip that supports HW encryption?
Rock Pi 4 and Odroid C4 should fit the bill.

Return to “General discussion”