星期六, 八月 27, 2005
Mobile Cryptography Benchmark
Mobile Phone: BenQ s680c (CLDC 1.0, MIDP 1.0)
Library: Bouncy Castle Lightweight API for J2ME (Version 1.29)
Plaintext size: 631 bytes
AES CBC mode with PKCS7
padding
plaintext blocks: 631 * 8 / 128 = 40 blocks
plaintext blocks: 631 * 8 / 128 = 40 blocks
Unit: millisecond
| Key Size | Encrypt | Decrypt | Key Generation |
|---|---|---|---|
| AES 128 | 421 | 314 | 97 |
| 286 | 319 | 97 | |
| 296 | 310 | 97 | |
| AES 192 | 449 | 356 | 143 |
| 319 | 346 | 144 | |
| 328 | 347 | 148 | |
| AES 256 | 495 | 384 | 138 |
| 346 | 407 | 139 | |
| 352 | 388 | 134 | |
| 352 | 393 | 134 |
SHA-256 & SHA-512
Unit: millisecond
| SHA-256 | SHA-512 |
|---|---|
| 847 | 804 |
| 860 | 805 |
| 874 | 809 |
| 856 | 804 |
| 851 | 800 |
Digital Signature
Unit: millisecond
| Algorithm and Key Size | Sign | Verify | Key Generation |
|---|---|---|---|
| RSA 1024 | 142755 | 14389 | Too slow to run. All take more than 10 minutes on emulator running on a AMD Athlon XP 2000+ machine. Maybe Bouncy Castle’s BigInteger has some problems. They are much faster with J2SE’s BigInteger. |
| 142117 | 13686 | ||
| 142362 | 14111 | ||
| DSA 1024 | 90410 | 188168 | |
| 92389 | 184935 | ||
| RSA 2048 | 1080095 | 49136 | |
| 1069361 | 49968 | ||
| ECDSA prime192v1 | 824896 | 1731073 | |
| 893203 | 1789403 |
Resources:
- Source code: (developed with Eclipse + EclipseME)
http://www.jiayun.org/src/mobile_cryptography.tar.bz2 - Data security in mobile Java applications
http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-wireless.html - The Legion of the Bouncy Castle
http://www.bouncycastle.org/ - Eclipse
http://www.eclipse.org - EclipseME
http://www.eclipseme.org/
