DEENESPTFRRUARHIKOZHNL

class ara::crypto::cryp::SignerPrivateCtx

[SWS_CRYPT_23500] Upstream: RS_CRYPTO_02204

class SignerPrivateCtx :             public CryptoContext {...};

Signature Private key Context interface.

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

User GuideAI-GENERATED

Serves for digital signature creation using private cryptographic keys in single-step or streaming procedures.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: bdc0b85a137f Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves for digital signature creation using private cryptographic keys in single-step or streaming procedures.

The interface ara::crypto::cryp::SignerPrivateCtx encapsulates private keys for digital signature operations on the Adaptive Platform [SWS_CRYPT_23501]. After configuring the key via SetKey(), messages can be signed either in a single step via Sign() or in multiple stages via Start(), Update(), and Finish() [SWS_CRYPT_23515] [SWS_CRYPT_23512] [SWS_CRYPT_50040]. All calls are thread-safe and signal errors such as insufficient buffer capacities or invalid context states via ara::core::Result [SWS_CRYPT_50040].

Context

The interface ara::crypto::cryp::SignerPrivateCtx represents the cryptographic execution context for digital signature operations using a private key on the AUTOSAR Adaptive Platform. The class inherits from CryptoContext and encapsulates asymmetric signature algorithms. To bind the required key material, the context interacts either directly with a private key object via PrivateKey::Sptr [SWS_CRYPT_23515] or with a managed key slot via KeySlot::Sptr [SWS_CRYPT_50036]. Callers typically manage instances of this interface via the defined smart pointer type alias ara::crypto::cryp::SignerPrivateCtx::Sptr [SWS_CRYPT_23501].

Lifecycle

Instances of SignerPrivateCtx are operated as stateful objects and managed via shared pointer structures (std::shared_ptr) [SWS_CRYPT_23501]. Prior to performing cryptographic calculations, the instance is in an uninitialized state and requires the assignment of a suitable key. Via the method SetKey(), either a concrete private key is assigned to the context [SWS_CRYPT_23515] or a KeySlot is stored whose key value is used at the start time of the signature calculation [SWS_CRYPT_50036]. As soon as a key has been successfully bound, the context transitions to the operational state. All interface methods are specified as exception-safe (exception safe) and thread-safe (thread-safe) [SWS_CRYPT_23512] [SWS_CRYPT_50037].

Within data processing, the interface distinguishes between one-time signing and multi-stage streaming procedures. A streaming signature operation is initiated by Start() [SWS_CRYPT_50037] [SWS_CRYPT_50038], incrementally supplied with data blocks via Update() [SWS_CRYPT_50039], and finalized by Finish() [SWS_CRYPT_50040]. Alternatively, an ongoing streaming process can be aborted at any time via Cancel(), whereby the instance returns to the operational state [SWS_CRYPT_50041].

SignerPrivateCtxStates Uninitialized Uninitialized Ready Ready Uninitialized->Ready SetKey() Ready->Ready Sign() / SetKey() Streaming Streaming Ready->Streaming Start() Streaming->Ready Finish() / Cancel() Streaming->Streaming Update()

State diagram: State transitions of the signing context from configuration to completion of the operation. Sources: [SWS_CRYPT_23515], [SWS_CRYPT_50036], [SWS_CRYPT_23512], [SWS_CRYPT_50037], [SWS_CRYPT_50039], [SWS_CRYPT_50040], [SWS_CRYPT_50041]

Usage Path

Applications can generate signatures either in a single step (single-call) or as a continuous data stream (streaming). Prior to execution, the application determines the expected buffer size for the desired signature format via GetSignatureSize() FormatId [SWS_CRYPT_29004] as well as the maximum permissible block size of individual read-in operations via GetMaximumChunkSize() [SWS_CRYPT_50042].

In the single-step path, the complete message is directly signed using Sign(). The method accepts the input message, the destination buffer ReadWriteMemRegion, the signature format, and an optional algorithm-specific context value, and returns the actual number of bytes written [SWS_CRYPT_23512].

For larger amounts of data or fragmented messages, the streaming path follows a three-phase pattern:

  1. Initialization: Call to Start() without parameters [SWS_CRYPT_50037] or with an application-specific context buffer ReadOnlyMemRegion [SWS_CRYPT_50038].
  2. Processing: Repeated supply of partial messages via Update(), where each block must adhere to the upper limit specified by GetMaximumChunkSize() [SWS_CRYPT_50039] [SWS_CRYPT_50042].
  3. Completion or abortion: Finalization of the signature generation and writing to the destination memory via Finish() [SWS_CRYPT_50040], or premature abortion of the ongoing process using Cancel() [SWS_CRYPT_50041].
Streaming signature generation with SignerPrivateCtxApplicationSignerPrivateCtxSetKey(key)Result<void>GetSignatureSize(signatureFormat)Result<size_t>Start()Result<void>loopFor each data block (chunk)Update(chunk)Result<void>Finish(signatureBuffer, signatureFormat)Result<size_t>

Sequence diagram: Typical flow of a streamed signature creation with buffer verification and finalization. Sources: [SWS_CRYPT_23515], [SWS_CRYPT_29004], [SWS_CRYPT_50037], [SWS_CRYPT_50039], [SWS_CRYPT_50040]

Error Scenarios

Method calls return ara::core::Result by default and use standardized error codes from ara::crypto::CryptoErrc with rollback semantics in the event of failures. Common causes of errors include:

This guide is based exclusively on the requirements of the AUTOSAR Adaptive specification for the crypto module in release R25-11.

Member map

Class diagram

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

G nara__crypto__cryp__SignerPrivateCtx943 SignerPrivateCtx + Cancel() + Finish() + GetMaximumChunkSize() + GetSignatureSize() + SetKey() + Sign() + Start() + Update() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__SignerPrivateCtx943->nara__crypto__cryp__CryptoContext85

Detail view

Select an entry in the outline.

Methods

Cancel function

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

virtual ara::core::Result< void > Cancel () noexcept=0;
Finish function

Finish the signature generation and write the signature to the provided output buffer.

virtual ara::core::Result< size_t > Finish (ReadWriteMemRegion signature, FormatId signatureFormat) noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update() or Sign() by this context.

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get size of the signature value produced by the current algorithm in the provided format.

virtual ara::core::Result< std::size_t > GetSignatureSize (FormatId signatureFormat) const noexcept=0;
SetKey function 2

Configure the context to use the provided key.

Overloads SetKey 2
virtual ara::core::Result< void > SetKey (PrivateKey::Sptr key) noexcept=0; SWS_CRYPT_23515
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50036
Sign function

This function signs a message.

virtual ara::core::Result< std::size_t > Sign (ReadOnlyMemRegion message, ReadWriteMemRegion signature, FormatId signatureFormat, ara::core::Optional< ReadOnlyMemRegion > context) const noexcept=0;
Start function 2

Initialize the context for a new signature generation.

Overloads Start 2
virtual ara::core::Result< void > Start () noexcept=0; SWS_CRYPT_50037
virtual ara::core::Result< void > Start (ReadOnlyMemRegion context) noexcept=0; SWS_CRYPT_50038
Update function

Update the signature generation context by a new part of the message.

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;

Type aliases

Sptr type alias

Smart pointer of the interface.

Method documentation

function Cancel [SWS_CRYPT_50041] Upstream: RS_CRYPTO_02302

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

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: add6f8db34cb Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method Cancel() serves to synchronously abort an ongoing, not yet completed streaming operation within class ara::crypto::cryp::SignerPrivateCtx that was previously initiated by a call to Start() [SWS_CRYPT_50041]. The purely virtual interface virtual ara::core::Result<void> Cancel() noexcept = 0; is declared in header ara/crypto/cryp/signer_private_ctx.h, takes no input parameters, and signals successful abort via an empty ara::core::Result<void> [SWS_CRYPT_50041]. For the caller, the method is specified as exception-safe (exception safe) and concurrently thread-safe (thread-safe) [SWS_CRYPT_50041].

Regarding call sequence and error handling, Cancel() strictly requires active processing: If data processing was not previously initiated by a call to method Start(), the abort fails and returns the error code ara::crypto::CryptoErrc::kProcessingNotStarted with defined rollback semantics [SWS_CRYPT_50041]. Interpretation: After a successful call to Cancel(), the context should return to an unstarted basic state so that a new signature or streaming process can be started. Question Q-348fb3ae43e424c9 (open)

The design follows a uniform principle for all streaming operations in the crypto module. Completely identical signatures and error semantics exist for related contexts such as VerifierPublicCtx [SWS_CRYPT_50023], MessageAuthnCodeCtx [SWS_CRYPT_50027], SymmetricCipherCtx [SWS_CRYPT_50046], HashFunctionCtx [SWS_CRYPT_50058], DecryptorPrivateCtx [SWS_CRYPT_50069], AuthCipherCtx [SWS_CRYPT_50077], and EncryptorPublicCtx [SWS_CRYPT_50089].

This usage note was created automatically based on the AUTOSAR Adaptive specification requirements.

Implementer's Guide to follow (complexity I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50041
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50041@rel:R25-11#5f721a2b
Content hash
5f721a2b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50041
Status: valid/unmigrated Version: rel:R25-11#5f721a2b 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_50041@rel:R25-11#5f721a2b
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 Finish [SWS_CRYPT_50040] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02203

virtual ara::core::Result< size_t > Finish (ReadWriteMemRegion signature, FormatId signatureFormat) noexcept=0;

Finish the signature generation and write the signature to the provided output buffer.

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

use

The ara::crypto::cryp::SignerPrivateCtx::Finish method synchronously completes signature generation and writes the calculated signature directly into the provided output buffer signature [SWS_CRYPT_50040]. The function expects the writable memory area signature (type ReadWriteMemRegion) and the desired format signatureFormat (type FormatId) as input parameters [SWS_CRYPT_50040]. As the return value, ara::core::Result<size_t> provides the actual byte size of the written signature data; this amount of data may be smaller than the capacity of the destination buffer [SWS_CRYPT_50040].

Error handling

Rollback semantics are specified for all occurring error cases [SWS_CRYPT_50040]. The following error codes can be returned via the result:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: Signature generation was not successfully started beforehand [SWS_CRYPT_50040].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: The capacity of the passed output buffer signature is too small [SWS_CRYPT_50040].
  • ara::crypto::CryptoErrc::kUnsupportedFormat: The value of signatureFormat is unknown or not supported [SWS_CRYPT_50040].

Concurrency and Limitations

The method is specified as thread-safe and exception safe and must not throw exceptions (noexcept) [SWS_CRYPT_50040]. A valid call strictly requires that the generation process in the context was successfully initiated beforehand [SWS_CRYPT_50040].

Interaction

The direct functional counterpart for verifying the generated signature is the ara::crypto::cryp::VerifierPublicCtx::Finish method [SWS_CRYPT_50022]. In contrast to contexts for hash or MAC calculations, where Finish() only finalizes the calculation and the intermediate or final result is fetched separately [SWS_CRYPT_21115] [SWS_CRYPT_21116], SignerPrivateCtx::Finish writes the signature directly into the buffer [SWS_CRYPT_50040].

This usage note was generated automatically based on the specification of AUTOSAR R25-11.

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

Parameter (in)

ParameterBeschreibung
signaturean output buffer that the signature will be written into
signatureFormatthe format in which the signature will be written

Rückgabewert

TypBeschreibung
ara::core::Result< size_t>a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer signature.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the signature generation has not been started successfully.
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified FormatId is unknown or not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50040
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50040@rel:R25-11#58202823
Content hash
58202823
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50040
Status: valid/unmigrated Version: rel:R25-11#58202823 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_50040@rel:R25-11#58202823
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 GetMaximumChunkSize [SWS_CRYPT_50042] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update() or Sign() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the maximum buffer size in bytes

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50042
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50042@rel:R25-11#a4caf357
Content hash
a4caf357
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50042
Status: valid/unmigrated Version: rel:R25-11#a4caf357 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_50042@rel:R25-11#a4caf357
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 GetSignatureSize [SWS_CRYPT_29004] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetSignatureSize (FormatId signatureFormat) const noexcept=0;

Get size of the signature value produced by the current algorithm in the provided format.

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

Parameter (in)

ParameterBeschreibung
signatureFormatthe format for which the size of the signature will be calculated

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the signature value in bytes or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified FormatId is unknown or not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_29004
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_29004@rel:R25-11#1da38103
Content hash
1da38103
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_29004
Status: valid/unmigrated Version: rel:R25-11#5dd47914 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_29004@rel:R25-11#5dd47914
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1da381032026-09-30
  • R20-11rel:R20-11#2a4501722026-10-14
  • R21-11rel:R21-11#d0e232c92026-10-14
  • R22-11rel:R22-11#68e2b9122026-10-14
  • R23-11rel:R23-11#260fdd9b2026-10-14
  • R24-11rel:R24-11#f3c2ba002026-10-14
  • R25-11rel:R25-11#5dd479142026-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 SetKey [SWS_CRYPT_23515] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (PrivateKey::Sptr key) noexcept=0;

Configure the context to use the provided key.

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

use

The virtual method SetKey of class ara::crypto::cryp::SignerPrivateCtx (#include "ara/crypto/cryp/signer_private_ctx.h") configures the signing context for the use of a provided private key [SWS_CRYPT_23515]. Parameter key of type PrivateKey::Sptr is passed as the source key object [SWS_CRYPT_23515]. The method executes synchronously and returns a ara::core::Result<void>, which is empty on success or carries the occurred error code in case of error [SWS_CRYPT_23515].

Error handling

If an error occurs during configuration, rollback semantics take effect [SWS_CRYPT_23515]. The following error codes are specified:

  • ara::crypto::CryptoErrc::kIncompatibleObject: The passed key object is incompatible with the current context [SWS_CRYPT_23515].
  • ara::crypto::CryptoErrc::kUsageViolation: The permitted usage of the key does not include signature generation (kAllowSig Generation) [SWS_CRYPT_23515].
  • ara::crypto::CryptoErrc::kUnsupported: The specific context exclusively supports setting via a KeySlot [SWS_CRYPT_23515].

Concurrency and Limitations

The interface is declared as noexcept and, according to the specification, is classified as both exception safe ("exception safe") and thread-safe ("thread-safe") [SWS_CRYPT_23515].

Interaction

In SignerPrivateCtx, the overload SetKey(KeySlot::Sptr) alternatively exists, which configures the context such that the key stored in a KeySlot is only used at the start time of the signature calculation [SWS_CRYPT_50036]. For checking signatures on the verification side, the functional counterpart SetKey with PublicKey::Sptr within ara::crypto::cryp::VerifierPublicCtx serves [SWS_CRYPT_24115].

This usage note was generated automatically based on the AUTOSAR Adaptive R25-11 specification.

Implementer's Guide to follow (complexity I2)

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

Parameter (in)

ParameterBeschreibung
keythe source key object

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided key object is incompatible with this context
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowSig Generation
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23515
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23515@rel:R25-11#95d92ab7
Content hash
95d92ab7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23515
Status: valid/unmigrated Version: rel:R25-11#71952992 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_23515@rel:R25-11#71952992
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#95d92ab72026-09-30
  • R20-11rel:R20-11#e3c992392026-10-14
  • R21-11rel:R21-11#601e899c2026-10-14
  • R22-11rel:R22-11#a52d4de52026-10-14
  • R23-11rel:R23-11#4a68f6e92026-10-14
  • R24-11rel:R24-11#2c23797e2026-10-14
  • R25-11rel:R25-11#719529922026-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 SetKey [SWS_CRYPT_50036] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0;

Configure the context to use the key stored in the provided KeySlot at the time the signature calculation is started.

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

use

The SetKey method configures the signing context [SWS_CRYPT_50036] to use a key located in the passed KeySlot::Sptr. The key is only referenced at the point in time when the actual signature calculation is started [SWS_CRYPT_50036]. The call is synchronous, declared as noexcept, and returns a ara::core::Result<void> [SWS_CRYPT_50036].

Error handling

If the configuration fails, an error is transmitted in the return object, with rollback semantics applying [SWS_CRYPT_50036]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: Occurs if the provided keySlot is not compatible with this signing context [SWS_CRYPT_50036].
  • ara::crypto::CryptoErrc::kUnsupported: Is reported if the context exclusively supports setting a PrivateKey directly [SWS_CRYPT_50036].

Concurrency and Interaction

The interface belongs to class ara::crypto::cryp::SignerPrivateCtx and is specified as thread-safe as well as exception-safe [SWS_CRYPT_50036]. In addition to this slot-based variant, SignerPrivateCtx also provides an overload that directly accepts a PrivateKey::Sptr object [SWS_CRYPT_23515]. Analogous slot bindings exist for further cryptographic contexts, such as for signature verification with KeySlot in VerifierPublicCtx [SWS_CRYPT_50018] or for key derivation in KeyDerivationFunctionCtx [SWS_CRYPT_50010].

This text was generated by an AI and serves as an orientation guide. The AUTOSAR specification is binding.

Implementer's Guide to follow (complexity I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a private key

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided keySlot is incompatible with this context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a PrivateKey

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50036
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50036@rel:R25-11#26b40256
Content hash
26b40256
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50036
Status: valid/unmigrated Version: rel:R25-11#26b40256 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_50036@rel:R25-11#26b40256
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 Sign [SWS_CRYPT_23512] Upstream: RS_CRYPTO_02204

virtual ara::core::Result< std::size_t > Sign (ReadOnlyMemRegion message, ReadWriteMemRegion signature, FormatId signatureFormat, ara::core::Optional< ReadOnlyMemRegion > context) const noexcept=0;

This function signs a message.

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

The method Sign signs a message synchronously in a single step according to [SWS_CRYPT_23512]. It accepts the input message to be signed (message), the destination buffer (signature), the desired signature format (signatureFormat), and optionally a context value (context). In case of success, the function returns the actual byte size of the generated signature via ara::core::Result<std::size_t>, which may be smaller than the capacity of the destination buffer [SWS_CRYPT_23512].

Regarding concurrency and exception safety, the method is declared as noexcept, is considered exception safe, and is explicitly specified as thread-safe [SWS_CRYPT_23512].

Prior to the call, the context must be properly initialized with a key value; otherwise, UninitializedContext is reported [SWS_CRYPT_23512]. Regarding the input length, Sign interacts with [SWS_CRYPT_50042]: via GetMaximumChunkSize, the maximum supported buffer size for single-step processing can be determined in order to prevent errors such as ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_23512] [SWS_CRYPT_50042].

Error handling provides rollback semantics for specific error codes [SWS_CRYPT_23512]:

  • ara::crypto::CryptoErrc::kInsufficientCapacity: The output buffer signature is too small.
  • ara::crypto::CryptoErrc::kUnsupported: Single-step processing is not supported, or the context specification context does not comply with the specifications.
  • ara::crypto::CryptoErrc::kUnsupportedFormat: The specified FormatId is unknown or not supported.
  • ara::crypto::CryptoErrc::kUsageViolation: The permitted key usage does not include kAllowSig Generation.
  • ara::crypto::CryptoErrc::kEmptyKeySlot or ara::crypto::CryptoErrc::kBusyResource: The configured KeySlot is empty or a required resource is busy.

This usage note was generated automatically and is based on the definitions in the AUTOSAR specification.

Header-Datei#include "ara/crypto/cryp/signer_private_ctx.h"
Scopeclass ara::crypto::cryp::SignerPrivateCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
messagean input buffer containing the message to be signed
signatureFormatthe format in which the signature will be written
contextan optional "context" value

Parameter (out)

ParameterBeschreibung
signaturean output buffer that the signature will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer signature.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by a key value
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting a context but no context is provided, or if the context does not support setting a context but a context is provided
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowSig Generation
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified FormatId is unknown or not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23512
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23512@rel:R25-11#a06a4413
Content hash
a06a4413
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23512
Status: valid/unmigrated Version: rel:R25-11#bc8b5705 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_23512@rel:R25-11#bc8b5705
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a06a44132026-09-30
  • R19-11rel:R19-11#78781cac2026-10-14
  • R20-11rel:R20-11#1b96176f2026-10-14
  • R21-11rel:R21-11#f8f46bec2026-10-14
  • R22-11rel:R22-11#8b3d99122026-10-14
  • R23-11rel:R23-11#e3aedff12026-10-14
  • R24-11rel:R24-11#2e8d11c12026-10-14
  • R25-11rel:R25-11#bc8b57052026-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 Start [SWS_CRYPT_50037] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new signature generation.

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

The parameterless method Start initializes a context of class ara::crypto::cryp::SignerPrivateCtx for a new signature generation [SWS_CRYPT_50037]. The call is synchronous, declared as noexcept, and returns an empty ara::core::Result<void> upon successful initialization or an error code in case of an error [SWS_CRYPT_50037].

In case of an error, the operation supports rollback semantics [SWS_CRYPT_50037]. Defined error causes from ara::crypto::CryptoErrc include:

  • kUninitializedContext: The context was not previously initialized by providing a key [SWS_CRYPT_50037].
  • kEmptyKeySlot: A configured key slot is currently empty [SWS_CRYPT_50037].
  • kUsageViolation: The permissions of the assigned key do not include kAllowSigGeneration [SWS_CRYPT_50037].
  • kBusyResource: A resource required for the operation is busy [SWS_CRYPT_50037].
  • kUnsupported: The context does not support streaming or the signature algorithm strictly requires specifying a context value [SWS_CRYPT_50037].

According to the specification, the function is thread-safe as well as exception safe [SWS_CRYPT_50037]. If the algorithm requires a specific context value, the overloaded variant Start(ReadOnlyMemRegion context) must be used alternatively [SWS_CRYPT_50038]. After a successful call to Start, message parts to be signed can be processed continuously via Update [SWS_CRYPT_50039].

This text was generated by an AI based on the AUTOSAR Adaptive R25-11 specification.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/signer_private_ctx.h"
Scopeclass ara::crypto::cryp::SignerPrivateCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support streaming or the algorithm requires setting a context value
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowSig Generation

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50037
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50037@rel:R25-11#2ee5d052
Content hash
2ee5d052
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50037
Status: valid/unmigrated Version: rel:R25-11#2ee5d052 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_50037@rel:R25-11#2ee5d052
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 Start [SWS_CRYPT_50038] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (ReadOnlyMemRegion context) noexcept=0;

Initialize the context for a new signature generation.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 71c4a255a10b Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The Start method is used for the synchronous initialization of the context ara::crypto::cryp::SignerPrivateCtx for a new signature generation while providing a context value ([SWS_CRYPT_50038]). It accepts parameter context of type ReadOnlyMemRegion and returns a ara::core::Result<void>. The function is specified as noexcept=0, declared exception-safe, and thread-safe ([SWS_CRYPT_50038]).

In case of an error, the context state is left unchanged via rollback semantics ([SWS_CRYPT_50038]). Specified error causes are:

  • UninitializedContext: if the context was not initialized beforehand by providing a key.
  • ara::crypto::CryptoErrc::kUnsupported: if the context does not support streaming or the algorithm does not permit a context value.
  • ara::crypto::CryptoErrc::kInvalidInputSize: if the buffer size of the passed context value is invalid.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: if a configured key slot is currently empty.
  • ara::crypto::CryptoErrc::kUsageViolation: if the permitted key usage does not include signature generation (kAllowSig Generation).
  • ara::crypto::CryptoErrc::kBusyResource: if a required resource is busy.

In the typical processing flow, the data to be signed are presumably passed successively via Update ([SWS_CRYPT_50039]) after a successful start. Question Q-7b821391730c9d38 (open) If the cryptographic algorithm does not require a context value, the parameterless overload Start() is available as an alternative ([SWS_CRYPT_50037]).

This usage note was generated automatically based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/signer_private_ctx.h"
Scopeclass ara::crypto::cryp::SignerPrivateCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
contexta context value

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support streaming or the algorithm does not support setting a context value
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowSig Generation
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the context is invalid

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50038
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50038@rel:R25-11#0f9c636d
Content hash
0f9c636d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50038
Status: valid/unmigrated Version: rel:R25-11#0f9c636d 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_50038@rel:R25-11#0f9c636d
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 Update [SWS_CRYPT_50039] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;

Update the signature generation context by a new part of the message.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 21170590fbb3 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The Update method serves in [SWS_CRYPT_50039] to continuously extend the internal state of a signature calculation by another segment of the message. The call is synchronous and processes the passed memory area data of type ReadOnlyMemRegion. As a result, the function returns a ara::core::Result<void>, which contains no value upon successful processing or otherwise encapsulates an error code [SWS_CRYPT_50039].

In case of an error, the return values possess rollback semantics [SWS_CRYPT_50039]:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: Occurs if the signature calculation was not previously initiated by calling the Start() method [SWS_CRYPT_50039].
  • ara::crypto::CryptoErrc::kInvalidInputSize: Is reported if the size of the provided input data is not supported by the context [SWS_CRYPT_50039].

Regarding concurrency and safety, the method is declared as thread-safe as well as exception safe [SWS_CRYPT_50039]. In interaction with the signing context, calculation strictly requires that the process was started with Start(). The maximum permitted buffer size for individual calls can be queried via GetMaximumChunkSize() [SWS_CRYPT_50042]; this limit likely represents the upper bound, exceeding which leads to kInvalidInputSize. Question Q-cf204a853a730365 (open)

Note: This usage note was generated automatically based on the AUTOSAR standard R25-11.

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

Parameter (in)

ParameterBeschreibung
dataa part of the input message that should be processed

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the signature calculation was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50039
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50039@rel:R25-11#5d5cf894
Content hash
5d5cf894
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50039
Status: valid/unmigrated Version: rel:R25-11#5d5cf894 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_50039@rel:R25-11#5d5cf894
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_23501] Upstream: RS_CRYPTO_02204

using Sptr = std::shared_ptr<SignerPrivateCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/signer_private_ctx.h"
Scopeclass ara::crypto::cryp::SignerPrivateCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23501
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23501@rel:R25-11#f562001b
Content hash
f562001b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23501
Status: valid/unmigrated Version: rel:R25-11#61a401aa 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_23501@rel:R25-11#61a401aa
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f562001b2026-09-30
  • R19-11rel:R19-11#acb907532026-10-14
  • R20-11rel:R20-11#046264ae2026-10-14
  • R21-11rel:R21-11#046264ae2026-10-14
  • R22-11rel:R22-11#6b63922b2026-10-14
  • R23-11rel:R23-11#0b7610c02026-10-14
  • R24-11rel:R24-11#0b7610c02026-10-14
  • R25-11rel:R25-11#61a401aa2026-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