Code Poetry
and Text Adventures

by catid posted (>30 days ago) 7:07pm Thu. Mar 6th 2014 PST
Here is the performance I'm getting on the iPad 2:

Generating a 256-bit entropy server key...
+ Successfully created a new server key in 11017.000000 usec (one sample)
+ Tabby sign: `587.550000` avg usec
+ Tabby verify signature: `1538.910000` avg usec
+ Tabby reject signature: `1509.560000` avg usec
+ Signature validation test successful!
Generating a 256-bit entropy client key...
+ Generated a client key in 1058.000000 usec (one sample)
+ Periodic server rekey in 941.000000 usec
+ Tabby client rekey: `586.060000` avg usec
+ Tabby server handshake: `1363.010000` avg usec (`733` connections/second)
+ Tabby client handshake: `1974.400000` avg usec
+ Client generated server verifier for password database in 653979.000000 usec (one sample)
+ Server password challenge generated in 1085.000000 usec (one sample)
+ Client proof of password generated in 636648.000000 usec (one sample)
+ Server proof of password generated in 2200.000000 usec (one sample)
+ Client checked server password proof in 2.000000 usec (one sample)
Tests succeeded!

calico_encrypt: 10000 bytes in 258.576330 usec on average / 38.673300 MBPS / 3867.330007 per second
calico_encrypt: 1000 bytes in 28.375170 usec on average / 35.242080 MBPS / 35242.079607 per second
calico_encrypt: 100 bytes in 5.207760 usec on average / 19.202114 MBPS / 192021.137687 per second
calico_encrypt: 10 bytes in 3.191910 usec on average / 3.132920 MBPS / 313292.041442 per second
calico_encrypt: 1 bytes in 3.091600 usec on average / 0.323457 MBPS / 323457.109587 per second
calico_decrypt: (REJECT BAD) 10000 bytes in 84.264180 usec on average / 118.674388 MBPS / 11867.438810 per second
calico_decrypt: (REJECT BAD) 1000 bytes in 8.664420 usec on average / 115.414534 MBPS / 115414.534383 per second
calico_decrypt: (REJECT BAD) 100 bytes in 1.131900 usec on average / 88.347027 MBPS / 883470.271225 per second
calico_decrypt: (REJECT BAD) 10 bytes in 0.406970 usec on average / 24.571836 MBPS / 2457183.576185 per second
calico_decrypt: (REJECT BAD) 1 bytes in 0.317200 usec on average / 3.152585 MBPS / 3152585.119798 per second
calico_decrypt: (GOOD) 10000 bytes in 258.786380 usec on average / 38.641910 MBPS / 3864.190998 per second
calico_decrypt: (GOOD) 1000 bytes in 28.487600 usec on average / 35.102992 MBPS / 35102.992179 per second
calico_decrypt: (GOOD) 100 bytes in 5.556990 usec on average / 17.995354 MBPS / 179953.535997 per second
calico_decrypt: (GOOD) 10 bytes in 3.540630 usec on average / 2.824356 MBPS / 282435.611741 per second
calico_decrypt: (GOOD) 1 bytes in 3.436590 usec on average / 0.290986 MBPS / 290986.122872 per second

I'm happy with the Calico performance, but the Tabby performance is pretty bad.  It's about twice as slow as some other modern experimental options.  The main reason why is because I'm not using any ARM assembly code to speed up the math routines.  Over time this will be improved, mainly to avoid using C code for math that should be constant-time; I want more control over what instructions get generated where it really matters.

NEON optimizations seem to help ChaCha also: http://cryptojedi.org/papers/neoncrypto-20120320.pdf
last edit by catid edited (>30 days ago) 3:25pm Fri. Mar 7th 2014 PST