Quindi ho eseguito openssl speed md5 && openssl speed blowfish
e blowfish sembra più veloce di md5.
Ecco i risultati (eseguiti su Windows WSL
).
$ openssl speed md5 && openssl speed blowfish
Doing md5 for 3s on 16 size blocks: 11438181 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 8164424 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 4405667 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 1547154 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 212233 md5's in 2.95s
OpenSSL 1.0.1f 6 Jan 2014
built on: Mon Jan 30 20:38:38 UTC 2017
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md5 61003.63k 174174.38k 375950.25k 528095.23k 589360.25k
###############################################################################
Doing blowfish cbc for 3s on 16 size blocks: ^T21511383 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 64 size blocks5410400 blowfish cbc's in 2.84s
Doing blowfish cbc for 3s on 256 size blocks: 1438809 blowfish cbc's in 2.98s
Doing blowfish cbc for 3s on 1024 size blocks: 355336 blowfish cbc's in 2.97s
Doing blowfish cbc for 3s on 8192 size blocks: 42136 blowfish cbc's in 2.96s
OpenSSL 1.0.1f 6 Jan 2014
built on: Mon Jan 30 20:38:38 UTC 2017
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
blowfish cbc 114727.38k 121924.51k 123602.38k 122513.15k 116614.23k
Ora so che blowfish
è usato da bcrypt
, e so che bcrypt
è un algoritmo lento, quindi come mai ottengo questi risultati dove blowfish è così veloce?
Ho alcune ipotesi su questo, ma non c'è modo di controllarle:
- È correlato all'essere in
windows subsystem on linux
? - È correlato al COSTO di
bcrypt
, e ad esempioopenssl speed blowfish
viene eseguito con un costo di 1 (o simili) - Questo
blowfish
non è uguale abcrypt
'sblowfish
Ovviamente, qualcos'altro.