m68k asm of AES
Tetsuya Isaki <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.m68k |
|---|---|
| Message-ID | <x7mve243pq.wl%[email protected]> |
I wrote m68k asm version of AES encrypt/decrypt routines. It performs approx 1.4x faster than original one (C source) on my 68030. Last year, I first wrote it for openssl and then adjusted it to mbedTLS as well. My twitter userstream client pkgsrc/net/sayaka uses this AES routine as a part of (locally bundled) mbedTLS. I demonstrated it with my X68030/25MHz in Open Source Conference 2016 Hiroshima on last Nov. # 25MHz is X68030's normal speed but I always use 30MHz. The details of this event was reported by ebijun@-san: http://mail-index.netbsd.org/netbsd-advocacy/2016/11/29/msg000724.html However, I'm neither security man nor crypt man, so I don't know if this is appropriate or not. Is anyone interested in this? The patch is here: http://www.pastel-flower.jp/~isaki/NetBSD/patch/openssl-aes-m68k-20170204.diff Thanks, # uname -srm NetBSD 7.99.59 x68k # dmesg|grep CPU X68030 (m68030 CPU/MMU, m68882 FPU, 30MHz clock) (normal C version) # cd /lib # ln -s libcrypto.so.12.0-normal libcrypto.so.12.0 # openssl speed aes : OpenSSL 1.0.2k 26 Jan 2017 built on: reproducible build, date unspecified options:bn(32,32) md2(int) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) gcc version 5.4.0 (NetBSD nb1 20160606) The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128 cbc 67.95k 74.11k 74.92k 74.41k 74.22k aes-192 cbc 56.02k 61.84k 63.18k 63.65k 63.65k aes-256 cbc 50.31k 54.59k 55.60k 55.85k 56.04k (m68k asm version) # rm libcrypto.so.12.0 # ln -s libcrypto.so.12.0-asm libcrypto.so.12.0 # openssl speed aes : OpenSSL 1.0.2k 26 Jan 2017 built on: reproducible build, date unspecified options:bn(32,32) md2(int) rc4(ptr,int) des(idx,cisc,2,long) aes(partial) idea(int) blowfish(idx) gcc version 5.4.0 (NetBSD nb1 20160606) The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128 cbc 92.00k 100.47k 106.25k 107.04k 107.34k aes-192 cbc 75.21k 85.90k 88.56k 89.25k 89.81k aes-256 cbc 66.19k 74.90k 77.93k 78.27k 78.15k --- Tetsuya Isaki <[email protected] / [email protected]>