Monday, November 16, 2009

Message Digest algorithms in Java Cryptography Architecture

This is the 2nd part of Message Digest algorithms test. I did performance tests on MD5, SHA-1, SHA-256, SHA-384 and SHA-512 in Java Cryptography Architecture (JCA) of Java SE6 against the same file as in 1st part.


Alg. Name Real Time User Time System Time
MD5 0m15.004s 0m9.109s 0m1.344s
SHA-1 0m38.654s 0m35.318s 0m2.036s
SHA-256 0m59.053s 0m56.032s 0m1.784s
SHA-384 1m56.362s 1m53.663s 0m1.364s
SHA-512 1m58.385s 1m53.727s 0m1.484s

The results are quite interesting if compared with the results of md5sum, sha1sum, sha224sum, sha256sum, sha384sum and sha512sum in Ubuntu in 1st part. Basically
  • MD5 is comparable in terms of time but with a higher percentage of CPU usage (2X);
  • SHA-1 and SHA-256 are much slower (2X);
  • SHA-384 and SHA-512 are a bit faster than native implementations.

Tuesday, November 10, 2009

VoIP bandwidth usage

I think in most countries, it's not a problem to worry about the bandwidth usage of VoIP. But it's obviously not the case here in Australia, most Internet users have download limit or even upload limit. That's why "how much bandwidth is used" becomes an FAQ. There are many bandwidth calculators out there, but here is the statistics from my ATA.

Using G729a codec, the throughput is about 3.6MB/hr in one direction.


Using G711u codec, the throughput is about 28.8MB/hr in one direction.


In my calculation, 1MB = 1,000,000Bytes, which is correct to hard disk manufacturers, Snow Leopard and my ISP.