Re: [Firebird-devel] Crypto Algoritm Performance

2015-09-07 Thread Tommi Prami
The Hardware AES uses differend MAgic constant (Seed?) that many popular software implementations (If I recall, reading from somewhere). So the initial state of non HW accelerated implementation should match the HW one, that's all. PS: Can't remember the details just pumped into this one, that I

Re: [Firebird-devel] Crypto Algoritm Performance

2015-09-05 Thread Leyne, Sean
Jim and Boris, > Something you may want to investigate is replacing the "pure C" > implementation of ChaCha20 with the rotate step replaced with either a > compiler intrinsic (Microsoft) or a bit of assembler (gcc).  SHA1 has > the same issue.  I haven't a clue as to why popular crypto

Re: [Firebird-devel] Crypto Algoritm Performance

2015-09-04 Thread Boris Damjanovic
I have implemented ChaCha20 and compared it with various AES implementations on my other (still cheap) notebook. All my implementations are made for Windows and MS Visual Studio, but I think that Intel's AES-NI code (see below) and the original ChaCha code was made for GNU C compiler. First

Re: [Firebird-devel] Crypto Algoritm Performance

2015-09-04 Thread James Starkey
Something you may want to investigate is replacing the "pure C" implementation of ChaCha20 with the rotate step replaced with either a compiler intrinsic (Microsoft) or a bit of assembler (gcc). SHA1 has the same issue. I haven't a clue as to why popular crypto algoritms use a rotate, virtually

Re: [Firebird-devel] Crypto Algoritm Performance

2015-08-31 Thread dboris
Hi James, more numbers here. Soft. AES implementation vs AES-NI implementation, 512 MB, ECB mode of operation, single core, buffer size 32kB, Windows: AES 128:3873 ms (average calculated on 10 measurements) AES-NI 128: 1067 ms (average calculated on 10 measurements) Numbers are from my

Re: [Firebird-devel] Crypto Algoritm Performance

2015-08-31 Thread Jim Starkey
For the non-aficinionadoes, ECB is the electronic code book mode where each 16 byte block is independently encrypted/decrypted. As such, it can reveal a great deal about an encrypted document or stream as a repeating block will always have the same encrypted form. The Ciphertext Block

[Firebird-devel] Crypto Algoritm Performance

2015-08-28 Thread James Starkey
Here are some numbers. The numbers were comoued on my boat computer, which is a very cheap notebook, so consider them relative, not absolute. 10mb encryption with a single key: RC4: 0.021 seconds ChaCha20: 0.007 AES-128:0.212 10mb encryption setting key every 1024