floodyberry / chacha-opt

Optimized block functions for the ChaCha stream cipher
47 stars 16 forks source link

Fails on Raspberry Pi 3 (ARM Cortex-A53) #6

Open lamasp opened 8 years ago

lamasp commented 8 years ago

Hi,

Just tried chacha-opt on a Raspberry Pi 3 and it fails (poly1305-opt works fine). The secondary issue is it doesn't fall back to the generic implementation.

CPU is: Broadcom BCM2387 chipset Quad-Core ARM Cortex-A53 CPU 1.2GHz

Results from bench test are:

$ bin/chacha-util bench ChaCha

---- 8 rounds ---- time granularity: 17 us, 1000412 us/second

neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation!

---- 12 rounds ---- neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation!

---- 20 rounds ---- neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! neon: error in implementation! armv6: error in implementation! HChaCha

---- 8 rounds ---- neon: error in implementation! armv6: error in implementation!

---- 12 rounds ---- neon: error in implementation! armv6: error in implementation!

---- 20 rounds ---- neon: error in implementation! armv6: error in implementation!

Info from /proc/cpuinfo is:

$ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

Hardware : BCM2709 Revision : a02082 Serial : 00000000bedaaca5