Commit ac8c5a9
Add default ECC P-256 support for mTLS keys
This change updates the default key generation algorithm for mTLS keys
from RSA 2048 to ECC P-256 (secp256r1) for improved security and
performance characteristics.
Key changes:
- Updated keylime-agent/src/main.rs to use Ecc256 instead of Rsa2048
for mTLS key generation via load_or_generate_key()
- Updated keylime/src/cert.rs cert_from_server_key() function to
generate ECC P-256 keys instead of RSA 2048 when creating new keys
Benefits:
- Smaller key sizes (256-bit vs 2048-bit) with equivalent security
- Faster key generation and cryptographic operations
- Lower memory and storage footprint
- Better performance in embedded and resource-constrained environments
Backward compatibility:
- Existing RSA keys will continue to work due to load_or_generate_key
logic that loads existing keys regardless of algorithm
- Algorithm validation is disabled for mTLS keys to maintain compatibility
- Only affects new key generation when no existing key file is found
The ECC P-256 curve (X9_62_PRIME256V1/secp256r1) is widely supported,
FIPS 186-4 approved, and provides 128-bit security level equivalent
to RSA 3072.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>1 parent 6f533fa commit ac8c5a9
2 files changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
522 | | - | |
| 523 | + | |
523 | 524 | | |
524 | 525 | | |
525 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
26 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
41 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
0 commit comments