DEENESPTFRRUARHIKOZHNL

namespace ara::crypto::cryp

User GuideAI-GENERATED

Defines interfaces for cryptographic computations, key objects, and their storage management.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f15c72def571 Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Defines interfaces for cryptographic computations, key objects, and their storage management.

Namespace ara::crypto::cryp provides the central interfaces for cryptographic operations, key objects, and key storages in the AUTOSAR Adaptive Platform. Via the central factory CryptoProvider, keys are obtained from instances of KeySlot, and specialized execution contexts derived from CryptoContext are instantiated for encryption, signatures, or hashing. The cryptographic operations are performed after configuring the stateful context with the input data. An essential constraint according to the present interpretation lies in the strict encapsulation of key material via CryptoObject as well as the differentiation of write permissions via WriteableKeySlot.

Context and Scope

Namespace ara::crypto::cryp forms the functional core of the AUTOSAR Adaptive cryptography module and provides interfaces for cryptographic primitives, object models, and key management structures. At the center of the architecture is interface CryptoProvider, which serves as an implementation instance and factory for cryptographic algorithms as well as for accessing key storage. Fundamental data structures and keys are represented via the common interface CryptoObject, from which concrete key types such as SymmetricKey, PublicKey, and PrivateKey derive. Storage locations for key material are represented by KeySlot and its writable specialization WriteableKeySlot.

CrypKontext CryptoProvider CryptoProvider KeySlot KeySlot CryptoProvider->KeySlot verwaltet CryptoContext CryptoContext CryptoProvider->CryptoContext erzeugt CryptoObject CryptoObject KeySlot->CryptoObject haelt CryptoContext->CryptoObject uses SymmetricKey SymmetricKey CryptoObject->SymmetricKey spezialisiert PublicKey PublicKey CryptoObject->PublicKey spezialisiert PrivateKey PrivateKey CryptoObject->PrivateKey spezialisiert WriteableKeySlot WriteableKeySlot WriteableKeySlot->KeySlot erweitert

Context diagram: Interplay between CryptoProvider, key storage, and cryptographic contexts. Sources: None specified in payload.

For executing cryptographic transformations, the namespace provides a family of specialized interfaces built upon mutable base context CryptoContext. These execution contexts include symmetric ciphers (SymmetricCipherCtx, AuthCipherCtx), asymmetric encryption and decryption (EncryptorPublicCtx, DecryptorPrivateCtx), and mechanisms for signature generation and verification (SignerPrivateCtx, VerifierPublicCtx). This spectrum is supplemented by contexts for hash functions (HashFunctionCtx), message authentication codes (MessageAuthnCodeCtx), key derivation (KeyDerivationFunctionCtx), key agreement (KeyAgreementPrivateCtx), key encapsulation (KeyEncapsulatorPublicCtx, KeyDecapsulatorPrivateCtx), key encapsulation with symmetric wrapping (SymmetricKeyWrapperCtx), random number generation (RandomGeneratorCtx), and secure key import (ProtectedKeyImportCtx).

Lifecycle and State Management

The management and lifetime of cryptographic artifacts are tightly coupled to the interplay between CryptoProvider, key objects, and contexts. According to the present interpretation, the lifecycle of cryptographic contexts and objects is primarily controlled via the factory and management methods of CryptoProvider, which acts as the central entry point for instantiation. Objects derived from CryptoObject represent immutable or managed cryptographic entities, whereas CryptoContext is explicitly defined as a stateful, mutable context. This requires configurations, intermediate states, and algorithmic parameters to be maintained within the respective context instance.

For persistent or temporary storage of key material, the namespace differentiates between KeySlot and WriteableKeySlot. According to a proper interpretation, the separation between KeySlot and WriteableKeySlot is likely to separate read accesses from write key modifications, so that immutable or write-protected key areas can be protected against accidental overwriting. Question Q-e1b708ca976f7e99 (open) State transformations of keys and contexts thus take place under the control of the associated provider, which ensures the validity of key objects across their lifecycle.

Usage Path of Cryptographic Operations

Cryptographic operations typically follow the sequence of provider query, key provisioning via key slots, and initialization of the stateful context. In a first step, an application component accesses the responsible CryptoProvider. Via this provider, the required key material is either loaded from a KeySlot or WriteableKeySlot, respectively, or obtained as a concrete CryptoObject (for example as SymmetricKey, PrivateKey, or PublicKey). In parallel or subsequently, the provider creates the appropriate instance of CryptoContext, such as a SymmetricCipherCtx for encryptions or a SignerPrivateCtx for digital signatures.

Sequence of a cryptographic operationApplicationCryptoProviderKeySlotCryptoContextRequest keyLoad key objectCryptoObject bereitstellenReturn CryptoObjectCryptoContext anfordernKontext instanziierenReturn CryptoContextExecute operationErgebnis liefern

Sequence diagram: Typical call order when performing cryptographic operations. Sources: None specified in payload.

In the subsequent execution step, the generated context is configured with the loaded key and supplied with the payload data to be processed. Due to the stateful nature of CryptoContext, streaming operations or multi-stage transformations can be performed incrementally before the final cryptographic result (such as ciphertext, signature, or hash value) is returned to the application. After processing is complete, releasing volatile states is subject to the convention of the executing context and provider.

This text was generated by an artificial intelligence based on the metadata of release R25-11.

Topic map

KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.

Class diagram

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns ara::crypto::cryp nara__crypto__cryp__AuthCipherCtx AuthCipherCtx nara__crypto__cryp__CryptoContext CryptoContext nara__crypto__cryp__AuthCipherCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__CryptoObject CryptoObject next_ara__crypto__Serializable ara::crypto::Serializable nara__crypto__cryp__CryptoObject->next_ara__crypto__Serializable nara__crypto__cryp__CryptoProvider CryptoProvider nara__crypto__cryp__DecryptorPrivateCtx DecryptorPrivateCtx nara__crypto__cryp__DecryptorPrivateCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__EncryptorPublicCtx EncryptorPublicCtx nara__crypto__cryp__EncryptorPublicCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__HashFunctionCtx HashFunctionCtx nara__crypto__cryp__HashFunctionCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__KeyAgreementPrivateCtx KeyAgreementPrivateCtx nara__crypto__cryp__KeyAgreementPrivateCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__KeyDecapsulatorPrivateCtx KeyDecapsulatorPrivateCtx nara__crypto__cryp__KeyDecapsulatorPrivateCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__KeyDerivationFunctionCtx KeyDerivationFunctionCtx nara__crypto__cryp__KeyDerivationFunctionCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__KeyEncapsulatorPublicCtx KeyEncapsulatorPublicCtx nara__crypto__cryp__KeyEncapsulatorPublicCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__KeySlot KeySlot nara__crypto__cryp__MessageAuthnCodeCtx MessageAuthnCodeCtx nara__crypto__cryp__MessageAuthnCodeCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__PrivateKey PrivateKey nara__crypto__cryp__PrivateKey->nara__crypto__cryp__CryptoObject nara__crypto__cryp__ProtectedKeyImportCtx ProtectedKeyImportCtx nara__crypto__cryp__ProtectedKeyImportCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__PublicKey PublicKey nara__crypto__cryp__PublicKey->nara__crypto__cryp__CryptoObject nara__crypto__cryp__RandomGeneratorCtx RandomGeneratorCtx nara__crypto__cryp__RandomGeneratorCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__SignerPrivateCtx SignerPrivateCtx nara__crypto__cryp__SignerPrivateCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__SymmetricCipherCtx SymmetricCipherCtx nara__crypto__cryp__SymmetricCipherCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__SymmetricKey SymmetricKey nara__crypto__cryp__SymmetricKey->nara__crypto__cryp__CryptoObject nara__crypto__cryp__SymmetricKeyWrapperCtx SymmetricKeyWrapperCtx nara__crypto__cryp__SymmetricKeyWrapperCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__VerifierPublicCtx VerifierPublicCtx nara__crypto__cryp__VerifierPublicCtx->nara__crypto__cryp__CryptoContext nara__crypto__cryp__WriteableKeySlot WriteableKeySlot nara__crypto__cryp__WriteableKeySlot->nara__crypto__cryp__KeySlot

Detail view

Select an entry in the outline.

Verschlüsselung

Authenticated Cipher Context interface.

inherits from CryptoContext

Interface for asymmetric decryption.

inherits from CryptoContext

Interface for asymmetric encryption.

inherits from CryptoContext

Interface for Symmetric Cipher Operations.

inherits from CryptoContext

Signatur und MAC

Hash function interface.

inherits from CryptoContext

Keyed Message Authentication Code Context interface definition.

inherits from CryptoContext

Signature Private key Context interface.

inherits from CryptoContext

Signature Verification Public key Context interface.

inherits from CryptoContext

Schlüsselmaterial

Key Agreement Private key Context interface.

inherits from CryptoContext

Asymmetric Key Encapsulation Mechanism (KEM) Private key Context interface.

inherits from CryptoContext

Key Derivation Function interface.

inherits from CryptoContext

Asymmetric Key Encapsulation Mechanism (KEM) Public key Context interface.

inherits from CryptoContext

A contexts for importing secured data such as secret key-material.

inherits from CryptoContext

Context of a symmetric key wrap algorithm.

inherits from CryptoContext

Schlüsselobjekte

A common interface for all cryptographic objects recognizable by the Crypto Provider.

inherits from ara::crypto::Serializable

base of PrivateKey, PublicKey, SymmetricKey

Generalized Asymmetric Private Key interface.

inherits from CryptoObject

PublicKey class

General Asymmetric Public Key interface.

inherits from CryptoObject

Symmetric Key interface.

inherits from CryptoObject

Schlüsselspeicher

KeySlot class

KeySlot interface representing a storage location for a key in a CryptoProvider.

base of WriteableKeySlot

WriteableKeySlot interface representing a writeable storage location for a key in a Crypto Provider.

inherits from KeySlot

Kontextbasis

CryptoProviderInterface representing one implementation of a set of cryptographic primitives with a key storage.

Interface of Random Number Generator Context.

inherits from CryptoContext