Contents

Public-key cryptography: RSA and elliptic curves

Public and private key pairs let vehicles verify software, authenticate diagnostic tools and establish encrypted connections without sharing a secret in advance.

Why it exists

A brake controller must check that its software came from an approved publisher. A workshop tester must prove that it may unlock protected diagnostic functions. A vehicle connecting to a backend must establish a protected connection.

Putting the same secret into every participant makes these tasks difficult: anyone who can verify a message might also be able to forge one.

Public-key cryptography separates those powers. A backend can keep a signing key private while vehicles receive only the public key needed to verify its signatures. Compromising a vehicle’s verification key does not reveal the backend’s signing secret.

What it is

Asymmetric cryptography uses a mathematically related key pair. The private key stays secret. The public key can be distributed, but its owner and permitted use must be established through trusted provisioning or certificates.

The operation determines what the pair does:

Operation What happens What it provides
Signature A private key signs; the matching public key verifies. Evidence of origin and detection of changes.
Encryption A public key protects information; the matching private key decrypts it. Confidentiality for the recipient.
Key agreement Each participant combines its private key with the peer’s public contribution. A shared secret from which session keys are derived.

A signature does not hide its message. Key agreement does not establish identity by itself. Encryption does not automatically prove who sent the data.

RSA, named after Rivest, Shamir and Adleman, supports separate signature and encryption schemes. Elliptic-curve cryptography (ECC) is a family of techniques used for signatures and key agreement. Neither family should be treated as a generic operation that can safely serve every purpose with the same key.

How it works

Choosing an algorithm

Algorithm Typical role Engineering implication
RSA with a 2048-bit or 3072-bit modulus Signatures; encryption through a dedicated scheme Large keys and signatures; verification can be efficient.
Elliptic Curve Digital Signature Algorithm (ECDSA), using NIST P-256 or P-384 Signatures Compact keys and signatures; signing requires careful handling of the per-signature secret.
Edwards-curve Digital Signature Algorithm (EdDSA), including Ed25519 Signatures Deterministic signing simplifies nonce handling; platform and protocol support must match.
Elliptic Curve Diffie–Hellman (ECDH), including X25519 Key agreement Establishes shared secret material; needs authentication and a key-derivation function.

RSA modulus sizes are not directly comparable with curve sizes. A smaller curve key does not imply weaker protection. Choose strength and permitted lifetime from the project’s security policy.

For new RSA signature designs, prefer the Probabilistic Signature Scheme (PSS) and specify its hash and salt parameters explicitly. Do not implement signatures as “encrypting a hash with the private key.” RSA encryption requires a separate encryption scheme and a separate key-use policy.

FIPS 186-5 covers RSA, ECDSA and EdDSA signatures. NIST SP 800-186 supplies elliptic-curve parameters, including P-256 and P-384. Ed25519 is an EdDSA signature algorithm; X25519 is a key-agreement function. Their related mathematics does not make their keys interchangeable. See NIST’s signature-standard overview and RFC 7748.

ECC is widely favored in embedded designs because keys and signatures occupy less storage and communication space at comparable security strength. Signing is often faster than RSA private-key operations. Verification is a separate comparison: RSA verification can be fast, so benchmark the actual implementation.

Verifying software at boot

A microcontroller unit (MCU) normally verifies firmware signatures; it does not need the publisher’s private key. A protected boot stage hashes the image and verifies its signature against a trusted public key or certificate chain.

Successful verification must cover the intended image and relevant metadata, such as its target and version. Only then may the bootloader transfer control. An invalid signature leads to a defined recovery path.

Boot cost includes reading and hashing the image, parsing metadata, checking certificates where required, and performing signature verification. Hardware acceleration can reduce the cryptographic work, but only when it supports the selected algorithm, curve and parameters. Measure the complete boot path, including watchdog behavior and failure handling.

Establishing a connection

In Transport Layer Security (TLS), public-key operations commonly authenticate a peer and establish shared keys. Symmetric cryptography then protects application traffic efficiently.

Ephemeral ECDH uses temporary key pairs. When the protocol authenticates the exchange and erases those private keys correctly, later compromise of a long-term authentication key need not expose earlier sessions.

Signing and verifying vehicle software
OEMprotects private signing key
ECUstores trusted public key
Sign imageCover relevant metadata with private key
Image and signatureInclude signed metadata
Verify signatureUse trusted public key and image hash
Apply boot policyCheck target and version before execution

Failed verification enters recovery; the OEM's private signing key stays with the OEM.

ECDH establishes a shared secret
Aliceconnection initiator
Evepassively observes public values
Bobconnection peer
Generate key pairKeep private key a secret
Generate key pairKeep private key a secret
Alice's public value
Bob's public value
Compute shared secretOwn private key plus Bob's public value
Compute shared secretOwn private key plus Alice's public value

With secure parameters and implementation, both compute the same secret that passive Eve cannot feasibly compute; authentication prevents active impersonation, and a key-derivation function produces session keys.

When to use it — and when not

Use signatures for secure boot and over-the-air (OTA) packages. Sign both the software and the metadata that determines where and whether it may be installed. A valid signature alone does not prevent rollback to an older, vulnerable release.

Use authenticated key agreement for TLS connections between vehicles, backends and service equipment. Use an established protocol rather than assembling signing, encryption and key agreement independently.

Vehicle-to-everything (V2X) messaging uses signatures so receivers can authenticate messages without sharing a signing secret. IEEE 1609.2 includes ECDSA with NIST P-256; follow the applicable deployment profile for algorithm and certificate choices.

Unified Diagnostic Services (UDS) Authentication, service 0x29, supports certificate-based tester authentication. The tester must demonstrate possession of the corresponding private key. The vehicle then applies access permissions. AUTOSAR describes this certificate exchange in its Diagnostic Communication Manager specification.

Avoid public-key operations for every fast control message or for bulk firmware encryption. Their processing and communication overhead usually favor symmetric mechanisms after trust has been established.

Best practices

  • Keep backend signing keys in protected signing infrastructure. Give production controllers only the keys and permissions they need.
  • Use maintained cryptographic libraries and complete protocol profiles. Fix algorithm identifiers, encodings and accepted parameters.
  • Protect trust anchors against unauthorized replacement. A public key need not be secret, but its integrity is essential.
  • Benchmark signing and verification separately on the target hardware. Include image hashing, certificate processing and accelerator initialization.
  • Plan key rotation, revocation and recovery before production. Test recovery when the normal signing key is unavailable or compromised.
  • Separate signing, encryption and key-agreement keys. Plan migration toward post-quantum protection over the vehicle’s service life.

Common pitfalls

  • Trusting any supplied public key. A correct signature proves little if the attacker chooses the verification key.
  • Reusing an ECDSA nonce. Repeated or predictable per-signature secrets can expose the private key. Use a reviewed signing implementation.
  • Equating authentication with permission. A valid workshop certificate does not automatically authorize every diagnostic operation.
  • Assuming ECC always verifies faster. Accelerator support, library quality and algorithm parameters can change the result.
  • Checking the signature but ignoring context. Signed software can still target the wrong controller or violate rollback policy.
  • Treating hardware acceleration as complete protection. Key access, fault handling and side-channel resistance still require engineering review.

What it means for your discipline

  • Cybersecurity Core

    Chooses algorithms and security profiles; defines trust anchors, private-key protection, certificate validation and key replacement.

  • Base software Partial

    Integrates signature verification into bootloaders and crypto services; measures startup time and handles verification failures.

  • Hardware & silicon Partial

    Checks which curves and RSA operations the security hardware accelerates, and provides protected storage for keys and trust anchors.

  • Diagnostics & lifecycle Partial

    Configures tester certificate checks and proof of private-key possession, then maps authenticated roles to permitted diagnostic services.

  • Software update & OTA Partial

    Builds package-signing and verification flows; tests altered packages, expired credentials and signing-key rotation.

No direct stake: E/E architecture · Functional safety · HPC & application software · Networks & communication

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)
  • Security services — Provides signature verification, authenticated key establishment and protected access to private keys and trust anchors.
  • Secure boot chain · TEE — Verifies software signatures against trusted public keys before allowing execution.
  • OTA client · UCM — Verifies publisher signatures over update software and installation metadata before accepting a release.
  • Diagnostics — Uses authenticated client identities to enforce permissions on protected diagnostic operations.
MCU-based ECU · AUTOSAR Classic
  • Memory · crypto · WdgM — Provides cryptographic services for signature verification and key agreement using configured keys and algorithms.
  • Flash bootloader · secure boot — Checks firmware signatures and authenticated image metadata before transferring control to the application.
  • Diagnostics — Validates tester authentication and maps authenticated roles to permitted diagnostic services.
  • Microcontroller · HSM — Protects keys and trust anchors and accelerates supported RSA or elliptic-curve operations through security hardware.