DEENESPTFRRUARHIKOZHNL

class ara::crypto::cryp::WriteableKeySlot

[SWS_CRYPT_50166] Upstream: RS_CRYPTO_02405

class WriteableKeySlot :             public KeySlot {...};

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

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

User GuideAI-GENERATED

Serves as a writable interface for managing and securely clearing keys in a crypto provider.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5dc02afa7972 Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as a writable interface for managing and securely clearing keys in a crypto provider.

The interface ara::crypto::cryp::WriteableKeySlot serves in AUTOSAR Adaptive as a writable abstraction for key storage locations in a crypto provider. Instances can neither be copied nor moved ([SWS_CRYPT_50170], [SWS_CRYPT_50168]), but are instead referenced via the smart pointer type Sptr [SWS_CRYPT_50172]. Via the thread-safe method Clear(), the content of the key slot is cleared, with rollback semantics taking effect in error cases such as kBusyResource or kUnsupported [SWS_CRYPT_30405].

Context

The interface ara::crypto::cryp::WriteableKeySlot defines a writable storage location for cryptographic keys within the AUTOSAR Adaptive Platform in the context of a crypto provider. It directly derives from the base interface KeySlot and represents a standardized abstraction to selectively clear managed key slots and control their lifecycle. Applications of the crypto stack act as primary interaction partners as consumers, as does the concrete crypto provider, which manages the binding to physical or logical key storage. The creation of concrete instances is likely performed via higher-level factory or provider methods, since the interface functions as a purely abstract base class. Question Q-5c3b13bb35c3ff53 (open)

Lifecycle

The resource and ownership model of ara::crypto::cryp::WriteableKeySlot strictly prevents duplicating key references via value semantics. For this purpose, both the copy constructor [SWS_CRYPT_50170] and the move constructor [SWS_CRYPT_50171] are explicitly deleted (=delete). Likewise, the deleted declarations of the copy assignment operator [SWS_CRYPT_50168] and the move assignment operator [SWS_CRYPT_50169] prevent any subsequent assignment.

Referential passing and shared management are instead handled via the defined smart pointer type alias Sptr, which is instantiated as std::shared_ptr<WriteableKeySlot> [SWS_CRYPT_50172]. Destruction of the instance is safeguarded by a virtual default destructor that is specified as exception-safe (exception safe) and emits no exceptions (noexcept=default) [SWS_CRYPT_50167]. This allows safe polymorphic deallocation via pointers to the interface. In terms of state, a slot can be occupied or empty. Occupying the slot is likely performed via separate interfaces of the crypto provider, whereas clearing is realized via the thread-safe method Clear() [SWS_CRYPT_30405]. Question Q-72dfcb17eb3e2d25 (open)

keyslot_zustand Leer Leer Leer->Leer Clear() [already empty] Leer->Leer Clear() [kBusyResource / kUnsupported] Belegt Belegt Belegt->Leer Clear() [Erfolg] Belegt->Belegt Clear() [kBusyResource / kUnsupported]

State diagram: State transitions of the key content through Clear() and error handling. Sources: [SWS_CRYPT_30405]

Usage Path

The central usage path focuses on the controlled resetting or clearing of stored key material:

  • Referencing: The caller accesses the instance via a shared pointer of type WriteableKeySlot::Sptr [SWS_CRYPT_50172].
  • Clear call: Calling the pure virtual method Clear() triggers the clearing process for the current content of the key slot [SWS_CRYPT_30405]. Because the method is thread-safe, the call can also be made in concurrent contexts [SWS_CRYPT_30405].
  • Result verification: The operation returns an ara::core::Result<void> [SWS_CRYPT_30405]. If the key slot was already empty beforehand or the content was removed without error, the result represents a successful state with an empty value [SWS_CRYPT_30405].

Error Scenarios

The method Clear() is declared exception-safe and noexcept; error situations are transported via ara::core::Result according to the error model of AUTOSAR Adaptive [SWS_CRYPT_30405]. Possible error codes comprise:

  • ara::crypto::CryptoErrc::kUnsupported: Occurs if the concrete manifestation of the key slot does not support clearing [SWS_CRYPT_30405]. For this case, the interface guarantees rollback semantics so that the state remains unchanged [SWS_CRYPT_30405].
  • ara::crypto::CryptoErrc::kBusyResource: Returned if the clear operation cannot be performed temporarily [SWS_CRYPT_30405]. This is likely typically caused by concurrent accesses to hardware-bound storage resources. Question (open) Here as well, rollback semantics ensure that no partial changes remain [SWS_CRYPT_30405].

This guide is based on the AUTOSAR Adaptive specification R25-11 for the crypto module and was generated automatically.

Member map

Constructors and destructor

2

Methods

1

Operators

1

Type aliases

1

Class diagram

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

G nara__crypto__cryp__WriteableKeySlot529 WriteableKeySlot + WriteableKeySlot() + operator=() + ~WriteableKeySlot() + Clear() nara__crypto__cryp__KeySlot637 KeySlot nara__crypto__cryp__WriteableKeySlot529->nara__crypto__cryp__KeySlot637

Detail view

Select an entry in the outline.

Constructors and destructor

WriteableKeySlot function 2

Copy-Constructor.

Overloads WriteableKeySlot 2
WriteableKeySlot (const WriteableKeySlot &)=delete; SWS_CRYPT_50170
WriteableKeySlot (WriteableKeySlot &&)=delete; SWS_CRYPT_50171

Destructor.

virtual ~WriteableKeySlot () noexcept=default;

Methods

Clear function

The interface shall delete the current content of the KeySlot.

virtual ara::core::Result< void > Clear () const noexcept=0;

Operators

operator= function 2

Copy-assign another WriteableKeySlot to this instance.

Overloads = 2
WriteableKeySlot & operator= (const WriteableKeySlot &other)=delete; SWS_CRYPT_50168
WriteableKeySlot & operator= (WriteableKeySlot &&other)=delete; SWS_CRYPT_50169

Type aliases

Sptr type alias

Smart pointer of the interface.

Method documentation

function Clear [SWS_CRYPT_30405] Upstream: RS_CRYPTO_02009

virtual ara::core::Result< void > Clear () const noexcept=0;

The interface shall delete the current content of the KeySlot.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9f91b0070fcf Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Usage and Semantics

The Clear() method of the ara::crypto::cryp::WriteableKeySlot interface serves to erase the current content of the referenced key storage [SWS_CRYPT_30405]. The function is declared via header file ara/crypto/cryp/writeable_keyslot.h and called without parameters as a constant operation [SWS_CRYPT_30405]. It synchronously returns an empty ara::core::Result<void> if the KeySlot could be cleared successfully or was already empty before the call [SWS_CRYPT_30405].

Error Handling and Concurrency

The interface is defined as noexcept and guarantees both exception safety and thread safety during concurrent invocation [SWS_CRYPT_30405]. In case of an error, rollback semantics apply that leave the state of the KeySlot unchanged [SWS_CRYPT_30405]. The following error codes can occur in the result [SWS_CRYPT_30405]:

  • ara::crypto::CryptoErrc::kUnsupported: Occurs with rollback semantics if the concrete KeySlot does not support erasure [SWS_CRYPT_30405].
  • ara::crypto::CryptoErrc::kBusyResource: Is reported if the operation currently cannot be executed due to temporarily occupied resources [SWS_CRYPT_30405].

Interaction

The function acts directly on the instance of ara::crypto::cryp::WriteableKeySlot to clean up cryptographic keys [SWS_CRYPT_30405]. To be distinguished from this is certificate management in ara::crypto::x509::X509Provider, in which clearing certificate slots is performed via the ClearCertificateSlot() method by specifying a InstanceSpecifier [SWS_CRYPT_40622].

This usage note was generated automatically and is based on the AUTOSAR specification for Release R25-11.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the keyslot was already empty or successfully cleared

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the KeySlot does not support clearing
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

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

Record
AUTOSAR/AP/record/SWS_CRYPT_30405
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30405@rel:R25-11#3b03ed2b
Content hash
3b03ed2b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30405
Status: valid/unmigrated Version: rel:R25-11#f254660d Versionshistorie & Revisions (1 transition, 7 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_30405@rel:R25-11#f254660d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#3b03ed2b2026-09-30
  • R20-11rel:R20-11#9d3696442026-10-14
  • R21-11rel:R21-11#bda76d622026-10-14
  • R22-11rel:R22-11#006988182026-10-14
  • R23-11rel:R23-11#e7cea4b12026-10-14
  • R24-11rel:R24-11#490dfcff2026-10-14
  • R25-11rel:R25-11#f254660d2026-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

function WriteableKeySlot [SWS_CRYPT_50170] Upstream: RS_CRYPTO_02004

WriteableKeySlot (const WriteableKeySlot &)=delete;

Copy-Constructor.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50170
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50170@rel:R25-11#9a69e3b3
Content hash
9a69e3b3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50170
Status: valid/unmigrated Version: rel:R25-11#9a69e3b3 Versionshistorie & Revisions (1 transition)
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_50170@rel:R25-11#9a69e3b3
Point-in-Time History:
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

function WriteableKeySlot [SWS_CRYPT_50171] Upstream: RS_CRYPTO_02004

WriteableKeySlot (WriteableKeySlot &&)=delete;

Move-Constructor.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50171
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50171@rel:R25-11#1a7fb0b7
Content hash
1a7fb0b7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50171
Status: valid/unmigrated Version: rel:R25-11#1a7fb0b7 Versionshistorie & Revisions (1 transition)
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_50171@rel:R25-11#1a7fb0b7
Point-in-Time History:
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

function operator= [SWS_CRYPT_50168] Upstream: RS_CRYPTO_02004

WriteableKeySlot & operator= (const WriteableKeySlot &other)=delete;

Copy-assign another WriteableKeySlot to this instance.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50168
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50168@rel:R25-11#51e3ecf9
Content hash
51e3ecf9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50168
Status: valid/unmigrated Version: rel:R25-11#51e3ecf9 Versionshistorie & Revisions (1 transition)
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_50168@rel:R25-11#51e3ecf9
Point-in-Time History:
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

function operator= [SWS_CRYPT_50169] Upstream: RS_CRYPTO_02004

WriteableKeySlot & operator= (WriteableKeySlot &&other)=delete;

Move-assign another WriteableKeySlot to this instance.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50169
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50169@rel:R25-11#05bfa0a2
Content hash
05bfa0a2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50169
Status: valid/unmigrated Version: rel:R25-11#05bfa0a2 Versionshistorie & Revisions (1 transition)
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_50169@rel:R25-11#05bfa0a2
Point-in-Time History:
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

function ~WriteableKeySlot [SWS_CRYPT_50167] Upstream: RS_CRYPTO_02405

virtual ~WriteableKeySlot () noexcept=default;

Destructor.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50167
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50167@rel:R25-11#651255bc
Content hash
651255bc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50167
Status: valid/unmigrated Version: rel:R25-11#651255bc Versionshistorie & Revisions (1 transition)
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_50167@rel:R25-11#651255bc
Point-in-Time History:
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

Type alias documentation

type alias Sptr [SWS_CRYPT_50172] Upstream: RS_CRYPTO_02405

using Sptr = std::shared_ptr<WriteableKeySlot>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/writeable_keyslot.h"
Scopeclass ara::crypto::cryp::WriteableKeySlot
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50172
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50172@rel:R25-11#afe92846
Content hash
afe92846
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50172
Status: valid/unmigrated Version: rel:R25-11#afe92846 Versionshistorie & Revisions (1 transition)
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_50172@rel:R25-11#afe92846
Point-in-Time History:
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