mirror of
https://github.com/kmackay/micro-ecc.git
synced 2026-10-29 18:54:00 +00:00
Updated speed and size results.
This commit is contained in:
@@ -8,6 +8,7 @@ Features
|
||||
|
||||
* Written in C, with optional inline assembly for ARM and Thumb platforms.
|
||||
* Small code size: as low as 1800 bytes when compiled for Thumb (eg, Cortex-M0).
|
||||
* No dynamic memory allocation.
|
||||
* Reasonably fast: on an LPC1114 at 48MHz (ARM Cortex-M0, 32-cycle 32x32 bit multiply), 192-bit ECDH shared secret calculation takes as little as ~150ms (depending on selected optimizations).
|
||||
* Support for 4 standard curves: secp128r1, secp192r1, secp256r1, and secp384r1
|
||||
* Optional optimizations so you can choose between code size and speed.
|
||||
@@ -158,7 +159,57 @@ In these tests, `ECC_ASM` was defined to `ecc_asm_thumb` in all cases.
|
||||
|
||||
### ECDSA speed and combined code size ###
|
||||
|
||||
In these tests, the measured speed is the time to verify an ECDSA signature. The measured code size is the combined code size for ECDH and ECDSA.
|
||||
In these tests, the measured speed is the time to verify an ECDSA signature. The measured code size is the combined code size for ECDH and ECDSA. `ECC_ASM` was defined to `ecc_asm_thumb` in all cases.
|
||||
|
||||
TODO
|
||||
#### No other optimizations (smallest code size) ####
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Curve:</th>
|
||||
<th>secp128r1</th>
|
||||
<th>secp192r1</th>
|
||||
<th>secp256r1</th>
|
||||
<th>secp384r1</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>ECDSA verify time (ms):</em></td>
|
||||
<td>108.6</td>
|
||||
<td>230.6</td>
|
||||
<td>590.2</td>
|
||||
<td>1729.7</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>Code size (bytes):</em></td>
|
||||
<td>2638</td>
|
||||
<td>2526</td>
|
||||
<td>2846</td>
|
||||
<td>2674</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
#### All optimizations (fastest) ####
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Curve:</th>
|
||||
<th>secp128r1</th>
|
||||
<th>secp192r1</th>
|
||||
<th>secp256r1</th>
|
||||
<th>secp384r1</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>ECDH time (ms):</em></td>
|
||||
<td>108.0</td>
|
||||
<td>219.0</td>
|
||||
<td>558.5</td>
|
||||
<td>1615.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>Code size (bytes):</em></td>
|
||||
<td>3046</td>
|
||||
<td>2918</td>
|
||||
<td>3248</td>
|
||||
<td>3062</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
+13
-1
@@ -4,6 +4,10 @@ asm on (#define ECC_ASM ecc_asm_thumb) (no lmul required)
|
||||
ECC_SQUARE_FUNC + ECC_USE_NAF: 75.9 (size = 2316 + 16)
|
||||
no opt: 85.5 (size = 1892 + 16)
|
||||
|
||||
including ecdsa:
|
||||
all opts on: time = 108.0ms, size = 2982 + 64
|
||||
only asm: time = 108.6ms, size = 2574 + 64
|
||||
|
||||
192 bits
|
||||
asm off
|
||||
ECC_SQUARE_FUNC + ECC_USE_NAF: 337.2 (size = 2276 + 112 (lmul) + 24)
|
||||
@@ -26,7 +30,15 @@ asm on (#define ECC_ASM ecc_asm_thumb) (no lmul required)
|
||||
ECC_SQUARE_FUNC + ECC_USE_NAF: 385.8 (size = 2484 + 32)
|
||||
no opt: 473.6 (size = 2072 + 32)
|
||||
|
||||
including ecdsa:
|
||||
all opts on: time = time = 558.5ms, size = 3120 + 128
|
||||
only asm: time = 590.2ms, size = 2718 + 128
|
||||
|
||||
384 bits
|
||||
asm on (#define ECC_ASM ecc_asm_thumb) (no lmul required)
|
||||
ECC_SQUARE_FUNC + ECC_USE_NAF: 1128.2 (size = 2196 + 48)
|
||||
no opt: 1405.8 (size = 1784 + 48)
|
||||
no opt: 1405.8 (size = 1784 + 48)
|
||||
|
||||
including ecdsa:
|
||||
all opts on: time = time = 1615.0ms, size = 2870 + 192
|
||||
only asm: time = 1729.7ms, size = 2482 + 192
|
||||
Reference in New Issue
Block a user