DEENESPTFRRUARHIKOZHNL

class ara::crypto::cryp::SymmetricKey

[SWS_CRYPT_23800] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02403

class SymmetricKey :          public CryptoObject {...};

Symmetric Key interface.

Header-Datei#include "ara/crypto/cryp/cryobj/symmetric_key.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp
Basisklasse(n)CryptoObject

User GuideAI-GENERATED

Encapsulates symmetric cryptographic keys and manages their lifetime via shared smart pointers.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f71a58d7ce35 Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates symmetric cryptographic keys and manages their lifetime via shared smart pointers.

The interface ara::crypto::cryp::SymmetricKey serves in AUTOSAR Adaptive as an abstraction for symmetric cryptographic keys and inherits fundamental properties from CryptoObject. Applications and crypto contexts primarily manage key instances via the standardized smart pointer type Sptr (std::shared_ptr<SymmetricKey>) according to header ara/crypto/cryp/cryobj/symmetric_key.h [SWS_CRYPT_23801]. Interpretation: Instantiation is likely performed via dedicated creation routines of key management, with the key being passed to configure ciphers or MACs. Question Q-f76fecc360d2d3a5 (open) As an authoritative constraint, the reference counting of the shared pointer determines the lifetime, ensuring that the encapsulated key object is destroyed only after the last reference is released [SWS_CRYPT_23801].

Context

The class ara::crypto::cryp::SymmetricKey forms the central interface for representing symmetric cryptographic keys in the AUTOSAR Adaptive Platform (Release R25-11, module crypto). As an elementary component of the cryptography subsystem, the interface encapsulates all properties required for symmetric cryptographic methods. The class is directly derived from CryptoObject (class SymmetricKey : public CryptoObject) and thus integrates into the uniform object hierarchy for cryptographic entities of the Adaptive Platform. The interface is declared in header file ara/crypto/cryp/cryobj/symmetric_key.h [SWS_CRYPT_23801].

Cryptographic execution contexts and key management instances typically act as interaction partners. The interface functions as the link between the creation or provision of key material and its operational application. Interpretation: Symmetric keys are likely primarily used in symmetric encryption schemes (such as block or stream ciphers) and in Message Authentication Codes (MAC) to secure confidentiality and data integrity at the vehicle level. Question (open) Encapsulation as CryptoObject ensures that the key material remains decoupled from the concrete cryptographic transformation.

Lifecycle

The lifecycle of ara::crypto::cryp::SymmetricKey instances is tightly coupled with modern C++ memory management patterns. According to [SWS_CRYPT_23801], the class provides the type alias Sptr, which is defined as using Sptr = std::shared_ptr<SymmetricKey>;. Via this shared smart pointer, the lifecycle of the interface object is reference-counted and deterministically controlled.

Interpretation: In practice, the actual creation and initialization of instances is likely performed via specialized key generators, loading routines, or key management components of the crypto stack, as the interface definition does not expose public default constructors for direct raw key instantiations. Question Q-51acf16b99d9ad1b (open) Once a key instance has been created as Sptr, it can be referenced concurrently with shared ownership by multiple software components or cryptographic contexts [SWS_CRYPT_23801].

The underlying resources are automatically released as soon as the last active Sptr is destroyed or reset. Interpretation: The derivation from CryptoObject suggests that sensitive key material in memory is specially protected and securely cleaned up (zeroization) upon object destruction to prevent read-out after the end of its lifetime. Question (open) The use of std::shared_ptr also guarantees thread safety when managing reference counters, while access to the referenced key object itself is subject to the usual synchronization rules for shared resources.

Usage Path

The regular use of ara::crypto::cryp::SymmetricKey in an adaptive application follows a structured procedure based on the defined smart pointer [SWS_CRYPT_23801]:

  • Header inclusion: First, the consuming software component includes header #include "ara/crypto/cryp/cryobj/symmetric_key.h" to obtain access to the type definition and alias Sptr [SWS_CRYPT_23801].
  • Key acquisition: The application obtains the interface in the form of a ara::crypto::cryp::SymmetricKey::Sptr [SWS_CRYPT_23801], for example from an upstream key provisioning process.
  • Validity check: Prior to operational use, the caller verifies that the obtained Sptr is not equal to nullptr and refers to an intact CryptoObject.
  • Assignment to crypto contexts: The key pointer is passed to the responsible cryptographic context to configure it for upcoming encryption or decryption operations or integrity checks.
  • Release: After completing the transformations or upon terminating the application context, the pointer is discarded; the key is destroyed through the automatic deletion of the last Sptr [SWS_CRYPT_23801].

This guide is based on the specification AUTOSAR Adaptive Platform Release R25-11. The statements are based on the referenced specification elements as well as interpretations identified as such.

UML class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__crypto__cryp__SymmetricKey111 SymmetricKey nara__crypto__cryp__CryptoObject679 CryptoObject nara__crypto__cryp__SymmetricKey111->nara__crypto__cryp__CryptoObject679 nara__crypto__Serializable855 Serializable nara__crypto__cryp__CryptoObject679->nara__crypto__Serializable855

Type aliases

Sptr type alias

Shared smart pointer of the interface.

Type alias documentation

type alias Sptr [SWS_CRYPT_23801] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<SymmetricKey>;

Shared smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/cryobj/symmetric_key.h"
Scopeclass ara::crypto::cryp::SymmetricKey
SymbolSptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_23801
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23801@rel:R25-11#d033faab
Content hash
d033faab
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23801
Status: valid/unmigrated Version: rel:R25-11#882653b8 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_23801@rel:R25-11#882653b8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d033faab2026-09-30
  • R19-11rel:R19-11#a0669f0d2026-10-14
  • R20-11rel:R20-11#c490e0a52026-10-14
  • R21-11rel:R21-11#c490e0a52026-10-14
  • R22-11rel:R22-11#b634ae6e2026-10-14
  • R23-11rel:R23-11#cb129b992026-10-14
  • R24-11rel:R24-11#cb129b992026-10-14
  • R25-11rel:R25-11#882653b82026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill