星期日, 八月 27, 2006
USB....
星期三, 十一月 16, 2005
TinyECC
http://discovery.csc.ncsu.edu/~pning/software/TinyECC/
nesC 寫的 Elliptic Curve Cryptography 程式(有內嵌一點組合語言)
裡面也有附 SHA1
星期六, 八月 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/
星期三, 六月 29, 2005
密碼學實務 (Practical Cryptography)
密碼學實務 -- Practical Cryptography 的中文版。
看在兩者的價錢差距,所以買了中文版。
翻譯品質我的感覺是滿普通的,句子唸起來不通順的地方不少,有些段落會讓人看不懂。有些則是之前如果讀過密碼學方面的原文書,可以猜到意思。另外有些單字翻譯過來所選擇的詞,我覺得不是依上下文來說最好的選擇。舉個例來說,比如 82 頁最後一句:
不過這還得依據你所進行的通訊、何時進行通訊、如何進行通訊及與誰通訊而定。這句最後有個 footnote:
此種分析方式稱為流量分析(traffic analysis)....這裡將 traffic 翻為『流量』實在很不恰當,流量在訊息傳遞上,指的是單位時間內傳輸的訊息量,著重的是量。可是這裡的分析是針對傳輸的各種特性--何時、如何、與誰等等,顯然不是流量一詞所能含括的。所以應該翻為『通訊分析』較好。
因為沒有原文可以對照,以上是純粹讀中文版的感想,如果沒有金錢考量,建議買英文版。
星期六, 二月 19, 2005
SHA-1 Broken
前幾天在國外 blog 上廣為流傳的消息 SHA-1 Broken
今天 Bruce Schneier 比較詳細地解釋了它的含意 Cryptanalysis of SHA-1
