DEENESPTFRRUARHIKOZHNL

klasse ara::crypto::cryp::SymmetricCipherCtx

[SWS_CRYPT_50136] Upstream: RS_CRYPTO_02201

class SymmetricCipherCtx :           public CryptoContext {...};

Interface for Symmetric Cipher Operations.

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

User GuideAI-GEGENEREERD

Dient als interface voor symmetrische versleutelings- en ontsleutelingsoperaties in datastromen of afzonderlijke aanroepen.
DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 0261b663ca0d Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Dient als interface voor symmetrische versleutelings- en ontsleutelingsoperaties in datastromen of afzonderlijke aanroepen.

De klasse ara::crypto::cryp::SymmetricCipherCtx dient als thread-safe interface voor symmetrische versleutelings- en ontsleutelingsoperaties in AUTOSAR Adaptive [SWS_CRYPT_50044]. Na configuratie van een sleutel via SetKey() kunnen data hetzij in een enkele aanroep, hetzij stapsgewijs in een streamingcyclus van Start(), Update() en Finish() worden verwerkt [SWS_CRYPT_50138], [SWS_CRYPT_50139]. Alle methoden zijn gespecificeerd als noexcept en signaleren fouten zoals ontbrekende initialisatie of te kleine buffers via ara::core::Result [SWS_CRYPT_50140].

Context

De interface ara::crypto::cryp::SymmetricCipherCtx kapselt symmetrische cryptografische transformaties in, die zowel versleutelings- als ontsleutelingsoperaties omvatten. Binnen de crypto-architectuur fungeert de klasse als uitvoeringscontext voor symmetrische algoritmen en werkt samen met sleutelobjecten en geheugenbuffers. Voor de configuratie van de cryptografische sleutel communiceert de klasse hetzij direct met vluchtige sleutels via SymmetricKey [SWS_CRYPT_50138], hetzij met persistent respectievelijk geïsoleerd beheerde sleutels via KeySlot [SWS_CRYPT_50043]. Te verwerken platte teksten, cijferteksten en initialisatievectoren (IV) worden via geheugengebieden van het type ReadOnlyMemRegion en ReadWriteMemRegion overgedragen en ontvangen [SWS_CRYPT_50048], [SWS_CRYPT_50049].

Levenscyclus

Levenscyclus en eigendomsverhoudingen van de interface worden primair gestuurd via de getypeerde smart-pointer-alias Sptr (std::shared_ptr<SymmetricCipherCtx>) [SWS_CRYPT_50137]. De beschikbaarstelling van een concrete instantie vindt in de praktijk vermoedelijk plaats via een bovenliggende crypto-fabrieksmethode (interpretatie), aangezien de interfacedefinitie zelf geen aanmaakfuncties bevat. Vraag Q-5b5f5ffdf964c91f (open)

Na de instantiatie doorloopt de context meerdere operationele fasen:

  • Niet geïnitialiseerd: Onmiddellijk na de instantiatie is aan de context geen sleutel toegewezen. Elke verwerkingsaanroep in deze fase leidt tot de fout CryptoErrc::kUninitializedContext [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • Geïnitialiseerd / sleutel gebonden: Door het aanroepen van SetKey() met een SymmetricKey [SWS_CRYPT_50138] of KeySlot [SWS_CRYPT_50043] wordt de context klaar voor gebruik. Vanuit deze toestand kunnen hetzij toestandloze single-call-operaties worden uitgevoerd, hetzij een toestandafhankelijk streamingproces worden gestart.
  • Streaming-verwerking: Een aanroep van Start() leidt een stapsgewijze transformatie in [SWS_CRYPT_50044], [SWS_CRYPT_23625]. In deze fase kunnen data via Update() worden getransformeerd [SWS_CRYPT_50139] en kan de positie via Seek() worden gewijzigd [SWS_CRYPT_23613]. De streamingtoestand wordt regulier beëindigd door Finish() [SWS_CRYPT_50045] respectievelijk FinishEncrypt() [SWS_CRYPT_23618] of voortijdig verworpen via Cancel() [SWS_CRYPT_50046]. Daarna keert de context terug naar de geïnitialiseerde basistoestand.

Alle methoden van SymmetricCipherCtx zijn gedeclareerd als noexcept, waarborgen uitzonderingsveiligheid ("exception safe") en zijn voor gelijktijdige toegang gespecificeerd als thread-safe ("thread-safe") [SWS_CRYPT_50044], [SWS_CRYPT_50139].

SymmetricCipherCtxState Uninitialized Uninitialized Initialized Initialized Uninitialized->Initialized SetKey() Initialized->Initialized ProcessSingleCall...() Streaming Streaming Initialized->Streaming Start() Streaming->Initialized Finish() / FinishEncrypt() / Cancel() Streaming->Streaming Update() / Seek()

Toestandsdiagram: Levenscyclus en toestandsovergangen van de symmetrische ciphercontext. Bronnen: [SWS_CRYPT_50138], [SWS_CRYPT_50044], [SWS_CRYPT_50139], [SWS_CRYPT_50045], [SWS_CRYPT_50046]

Gebruikspad

Voorafgaand aan de eigenlijke datatransformatie verdient het aanbeveling de vereiste buffer- en chunkgrootten te bepalen. Via GetMinimumChunkSize() [SWS_CRYPT_50144] en GetMaximumChunkSize() [SWS_CRYPT_50050] kunnen de toelaatbare grenzen voor invoerblokken worden bepaald. Indien initialisatievectoren vereist zijn, kunnen de lengtegrenzen daarvan middels GetMinimumInputIvSize() [SWS_CRYPT_50141], GetMaximumInputIvSize() [SWS_CRYPT_50142] of GetOutputIvSize() [SWS_CRYPT_50143] worden opgevraagd. De maximaal benodigde doelbuffergrootte voor een operatie wordt berekend middels GetRequiredOutputBufferSize() [SWS_CRYPT_50140].

Voor de stapsgewijze streamversleuteling of -ontsleuteling geldt het volgende standaardverloop:

  1. Sleutel configureren: Koppeling van de cryptografische sleutel aan de context via SetKey() [SWS_CRYPT_50138].
  2. Transformatie starten: Aanroep van Start() onder opgave van transformatierichting (versleuteling of ontsleuteling) en optionele IV [SWS_CRYPT_23625] respectievelijk zonder IV [SWS_CRYPT_50044].
  3. Datablokken transformeren: Herhaalde aanroep van Update() voor het stapsgewijs overdragen van invoerdata en het uitnemen van de uitvoerdata [SWS_CRYPT_50139]. Desgewenst kan binnen de datastroom via Seek() worden genavigeerd [SWS_CRYPT_23613].
  4. Afsluiting: Finalisatie via Finish() [SWS_CRYPT_50045] of via FinishEncrypt(), voor zover de door de context gegenereerde IV moet worden geretourneerd [SWS_CRYPT_23618].

Als alternatief voor dit streamingpatroon ondersteunt de interface synchrone enkelvoudige aanroepen. Is de volledige payload beschikbaar, dan kan de operatie direct via ProcessSingleCall() [SWS_CRYPT_50047], ProcessSingleCallWithInputIv() [SWS_CRYPT_50048] of voor context-eigen IV-generatie via EncryptSingleCallWithOutputIv() [SWS_CRYPT_50049] worden uitgevoerd.

Symmetrische datastroomversleutelingAnwendungSymmetricCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>loopZolang er blokken beschikbaar zijnUpdate(in, out)Result<size_t>FinishEncrypt(in, out, ivOut)Result<size_t>

Sequentiediagram: Typisch aanroepverloop van een streamingversleuteling. Bronnen: [SWS_CRYPT_50138], [SWS_CRYPT_23625], [SWS_CRYPT_50139], [SWS_CRYPT_23618]

Foutscenario's

Methoden van de klasse signaleren fouten via ara::core::Result met codes uit het foutdomein ara::crypto::CryptoErrc. Belangrijke foutcondities omvatten:

  • CryptoErrc::kUninitializedContext: Treedt op wanneer verwerkingsaanroepen zoals Start() [SWS_CRYPT_50044], single-call-routines [SWS_CRYPT_50047] of GetRequiredOutputBufferSize() [SWS_CRYPT_50140] worden aangeroepen voordat er een sleutel via SetKey() is geconfigureerd.
  • CryptoErrc::kProcessingNotStarted: Wordt getriggerd wanneer streamingfuncties zoals Update() [SWS_CRYPT_50139], Finish() [SWS_CRYPT_50045], FinishEncrypt() [SWS_CRYPT_23618], Seek() [SWS_CRYPT_23613] of Cancel() [SWS_CRYPT_50046] worden uitgevoerd zonder voorafgaande succesvolle Start()-aanroep.
  • CryptoErrc::kInsufficientCapacity: De ter beschikking gestelde doelbuffer voor data of IV's is kleiner dan de minimaal benodigde capaciteit [SWS_CRYPT_50139], [SWS_CRYPT_50049].
  • CryptoErrc::kUsageViolation en CryptoErrc::kIncompatibleObject: Het doorgegeven sleuteltype is niet passend voor de transformatie of de in de sleutel vastgelegde gebruiksregels verbieden de operatie (bijv. ontbreken van kAllowDataEncryption of kAllowDataDecryption) [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • CryptoErrc::kEmptyKeySlot en CryptoErrc::kBusyResource: Geeft aan dat een geconfigureerde KeySlot tijdens runtime geen sleutel bevat of dat een voor de crypto-operatie benodigde resource is geblokkeerd [SWS_CRYPT_50048], [SWS_CRYPT_50049].
  • CryptoErrc::kUnsupported: Wordt geretourneerd wanneer een bedrijfsmodus (zoals streamverwerking, single-call of Seek()) niet wordt ondersteund door de gekozen context of het gekozen algoritme [SWS_CRYPT_23613], [SWS_CRYPT_50047].

Deze handleiding is opgesteld door een AI-assistent aan de hand van de specificatievoorschriften.

Ledenkaart

Klassendiagram

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

G nara__crypto__cryp__SymmetricCipherCtx167 SymmetricCipherCtx + Cancel() + EncryptSingleCallWithOutputIv() + Finish() + FinishEncrypt() + GetMaximumChunkSize() + GetMaximumInputIvSize() + GetMinimumChunkSize() + GetMinimumInputIvSize() + GetOutputIvSize() + GetRequiredOutputBufferSize() + ProcessSingleCall() + ProcessSingleCallWithInputIv() + Seek() + SetKey() + Start() + Update() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__SymmetricCipherCtx167->nara__crypto__cryp__CryptoContext85

Detailweergave

Kies een item in de inhoudsopgave.

Methoden

Cancel functie

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;

Perform encryption in a single-call and return an IV generated by the context.

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, ReadWriteMemRegion iv Out) noexcept=0;
Finish functie

Finalize the encryption/decryption without returning an IV.

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Finalize the encryption and return the IV generated by the context.

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion ivOut) noexcept=0;

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

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

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

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

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

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

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;

Perform en-/decryption in a single-call without setting or returning an IV.

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion in, ReadWriteMemRegion out, CryptoTransform transform Direction) noexcept=0;

Perform en-/decryption in a single-call, providing an IV to be used during en-/decryption.

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, CryptoTransform transformDirection, ReadOnlyMemRegion iv) noexcept=0;
Seek functie

Set the position of the next byte within the data stream.

virtual ara::core::Result< void > Seek (std::int64_t offset, bool from Begin) noexcept=0;
SetKey functie 2

Configure the context to use the key stored in the provided KeySlot at the time the en-/decryption is started.

Overloads SetKey 2
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50043
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_50138
Start functie 2

Initialize the context for a new encryption or decryption and set the IV used by the context.

Overloads Start 2
virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_23625
virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0; SWS_CRYPT_50044
Update functie

Encrypt or decrypt a data buffer.

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Type-aliassen

Sptr typealias

Smart pointer of the interface.

Documentatie van de methoden

functie Cancel [SWS_CRYPT_50046] 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 0bea3f0e1d0d Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De synchrone methode Cancel() van de klasse ara::crypto::cryp::SymmetricCipherCtx dient voor het voortijdig afbreken van een lopende streamingoperatie die eerder met Start() is geïnitieerd en nog niet is voltooid [SWS_CRYPT_50046]. De interface is parameterloos gedeclareerd in ara/crypto/cryp/symmetric_cipher_ctx.h en retourneert bij succesvolle uitvoering een lege ara::core::Result<void> [SWS_CRYPT_50046].

Als de gegevensverwerking vooraf niet is gestart door de aanroep van Start(), mislukt de operatie met de specifieke foutcode ara::crypto::CryptoErrc::kProcessingNotStarted en rollback-semantiek [SWS_CRYPT_50046]. Voor de aanroepcontext garandeert de specificatie thread-veiligheid (thread-safe) en uitzonderingsveiligheid (exception safe) met noexcept-declaratie [SWS_CRYPT_50046]. Interpretatie: op grond van de rollback-semantiek keert het object na een afbreking vermoedelijk weer terug naar een gereedstaande begintoestand. Vraag Q-b6deb8db5367acc5 (open)

Dit functionele patroon is consistent gedefinieerd over alle cryptografische streamingcontexten in AUTOSAR Adaptive. Identieke signaturen en foutsemantiek gelden voor de contextklassen VerifierPublicCtx ([SWS_CRYPT_50023]), MessageAuthnCodeCtx ([SWS_CRYPT_50027]), SignerPrivateCtx ([SWS_CRYPT_50041]), HashFunctionCtx ([SWS_CRYPT_50058]), DecryptorPrivateCtx ([SWS_CRYPT_50069]), AuthCipherCtx ([SWS_CRYPT_50077]) en EncryptorPublicCtx ([SWS_CRYPT_50089]).

Deze tekst is gecureerd door een AI en is gebaseerd op de specificatie AUTOSAR Adaptive R25-11.

Implementer's Guide volgt (complexiteit I1)

Header-Datei#include "ara/crypto/cryp/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
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_50046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50046@rel:R25-11#badacc36
Content hash
badacc36
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50046
Status: valid/unmigrated Version: rel:R25-11#f0ef0c54 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_50046@rel:R25-11#f0ef0c54
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

functie EncryptSingleCallWithOutputIv [SWS_CRYPT_50049] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, ReadWriteMemRegion iv Out) noexcept=0;

Perform encryption in a single-call and return an IV generated by the context.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 9c4059afbb11 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik en bufferbehandeling

De synchrone methode EncryptSingleCallWithOutputIv voert een symmetrische versleuteling uit in één enkele aanroep en retourneert de door de context gegenereerde initialisatievector via de buffer ivOut [SWS_CRYPT_50049]. De invoergegevens worden via in doorgegeven, terwijl out de versleutelde gegevens opneemt [SWS_CRYPT_50049]. Bij succesvolle uitvoering levert het resultaat ara::core::Result<std::size_t> de werkelijke grootte van de gegenereerde uitvoergegevens op, die kleiner kan zijn dan de totale capaciteit van out [SWS_CRYPT_50049]. Als het gekozen algoritme geen initialisatievector vereist, worden er geen gegevens in ivOut geschreven [SWS_CRYPT_50049].

Wisselwerking en randvoorwaarden

Voorafgaand aan de aanroep moet de context via een passende sleutel worden geïnitialiseerd [SWS_CRYPT_50049]. Om voldoende capaciteit van de buffer ivOut te waarborgen, kan de vereiste IV-lengte vooraf via GetOutputIvSize() worden bepaald [SWS_CRYPT_50143]. Indien bovendien authenticatie met tag-berekening vereist is, biedt ara::crypto::cryp::AuthCipherCtx het overeenkomstige tegenwicht aan [SWS_CRYPT_50080].

Foutafhandeling en gelijktijdigheid

De interface is thread-safe en uitzonderingsveilig („exception safe”) gespecificeerd en past bij fouten een rollback-semantiek toe [SWS_CRYPT_50049]. Interpretatie: Deze rollback-semantiek zorgt er vermoedelijk voor dat bij optredende fouten de toestand van de context intact blijft en er geen onvolledige gegevens in de buffer als geldig achterblijven. Vraag Q-841087731518d866 (open) Tot de relevante fouten behoren:

  • UninitializedContext: Aan de context is nog geen sleutel toegewezen [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: De capaciteit van out of ivOut is ontoereikend [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUnsupported: Single-call-versleuteling wordt niet ondersteund of het algoritme dwingt de opgave van een invoer-IV af [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUsageViolation resp. ara::crypto::CryptoErrc::kIncompatibleObject: Het sleuteltype past niet bij de transformatie of het sleutelgebruik staat geen gegevensversleuteling toe [SWS_CRYPT_50049].

Deze gebruiksinstructie is gegenereerd door een AI op basis van de specificaties van AUTOSAR Adaptive.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to
ivOutan output data buffer that the initialization vector (IV) generated by the context will be written to. If the algorithm does not use an IV, no data will be written into the buffer.

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 out.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call encryption is not supported, or if the algorithm requires providing an input IV
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction (encrypt)

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50049
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50049@rel:R25-11#3bd3b5f2
Content hash
3bd3b5f2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50049
Status: valid/unmigrated Version: rel:R25-11#f2ba22b4 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_50049@rel:R25-11#f2ba22b4
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

functie Finish [SWS_CRYPT_50045] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Finalize the encryption/decryption without returning an IV.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 041cbaba2731 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De synchrone methode Finish finaliseert een symmetrische ver- of ontsleuteling binnen ara::crypto::cryp::SymmetricCipherCtx zonder teruggave van een initialisatievector ([SWS_CRYPT_50045]). Ze verwerkt het laatste gegevenssegment uit de invoerbuffer in (ReadOnlyMemRegion) en schrijft de resulterende gegevens naar de uitvoerbuffer out (ReadWriteMemRegion) ([SWS_CRYPT_50045]). De hiervoor benodigde buffergrootte kan vooraf via GetRequiredOutputBufferSize() worden opgevraagd ([SWS_CRYPT_50045]). De retourwaarde van het type ara::core::Result<std::size_t> levert bij succes het exacte aantal geschreven bytes op, dat kleiner kan zijn dan de totale capaciteit van out ([SWS_CRYPT_50045]).

Foutafhandeling

In een foutgeval levert de methode een ara::core::Result op met specifieke foutcodes ([SWS_CRYPT_50045]):

  • ProcessingNotStarted: de gegevensverwerking is vooraf niet ingeleid door Start() ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInsufficientCapacity: de uitvoerbuffer out is te klein ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: de grootte van de invoergegevens kan niet worden verwerkt ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidArgument: de doorgegeven invoergegevens zijn ongeldig ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kUnsupported: stream-verwerking wordt door de huidige context niet ondersteund ([SWS_CRYPT_50045]).

Treedt een van de CryptoErrc-fouten op, dan geldt een rollback-semantiek ([SWS_CRYPT_50045]).

Gelijktijdigheid en wisselwerking

De operatie is gedefinieerd als thread-safe en exception safe ([SWS_CRYPT_50045]). Voorafgaand aan de aanroep moet de transformatie dwingend door Start() zijn gestart ([SWS_CRYPT_50045]). De maximaal toelaatbare invoergrootte voor afzonderlijke aanroepen van Finish() kan via GetMaximumChunkSize() worden vastgesteld ([SWS_CRYPT_50050]). Na de voltooiing is de transformatieloop vermoedelijk beëindigd en wordt voor verdere operaties waarschijnlijk een nieuwe aanroep van Start() vereist. Vraag Q-c4ffc8028e8f522b (open)

Deze tekst is gegenereerd door een AI op basis van de AUTOSAR-specificatie R25-11.

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that contains encrypted or decrypted data. The required size of this buffer can be queried using GetRequired OutputBufferSize()

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 out.

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50045
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50045@rel:R25-11#1a44dbee
Content hash
1a44dbee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50045
Status: valid/unmigrated Version: rel:R25-11#b9951f15 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_50045@rel:R25-11#b9951f15
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

functie FinishEncrypt [SWS_CRYPT_23618] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion ivOut) noexcept=0;

Finalize the encryption and return the IV generated by the context.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: c0e4f2ad1bdc Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode FinishEncrypt voltooit een versleutelingsbewerking en retourneert de door de context gegenereerde initialisatievector (IV) [SWS_CRYPT_23618]. Ze verwerkt de finale invoerdatabuffer in en schrijft de resulterende data naar de uitvoerbuffer out evenals de IV naar ivOut. Als retourwaarde levert ze een ara::core::Result<std::size_t> met de werkelijke grootte van de geschreven uitvoerdata, die kleiner kan zijn dan de capaciteit van out [SWS_CRYPT_23618].

Voor een foutloze uitvoering moeten bufferafmetingen en contextstatus vooraf worden afgestemd:

Als de dataverwerking niet vooraf door Start() is ingeleid, meldt de methode CryptoErrc::kProcessingNotStarted [SWS_CRYPT_23618]. Bevat de invoerbuffer ongeldige data, dan volgt CryptoErrc::kInvalidArgument [SWS_CRYPT_23618]. De fout CryptoErrc::kUnsupported treedt op wanneer streamingverwerking niet wordt ondersteund, de context geen IV gebruikt of reeds in Start() een IV is doorgegeven [SWS_CRYPT_23618]. Alle fouten hebben rollback-semantiek [SWS_CRYPT_23618]. Volgens de specificatie is de aanroep thread-safe en uitzonderingsveilig (noexcept) [SWS_CRYPT_23618].

Deze gebruiksinstructie is automatisch gegenereerd op basis van de AUTOSAR-payload.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that contains encrypted or decrypted data
ivOutan output data buffer that contains the IV

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 out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or if this context does not use an IV or if the IV has been provided by the application in the Start() function

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23618
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23618@rel:R25-11#563c4544
Content hash
563c4544
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23618
Status: valid/unmigrated Version: rel:R25-11#dcc35b13 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_23618@rel:R25-11#dcc35b13
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c50d30f82026-09-30
  • R19-11rel:R19-11#c41ea37b2026-10-14
  • R20-11rel:R20-11#06f18fb12026-10-14
  • R21-11rel:R21-11#3725bc5a2026-10-14
  • R22-11rel:R22-11#724878ec2026-10-14
  • R23-11rel:R23-11#8e98bdf02026-10-14
  • R24-11rel:R24-11#1d9181d92026-10-14
  • R25-11rel:R25-11#dcc35b132026-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

functie GetMaximumChunkSize [SWS_CRYPT_50050] 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(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

Header-Datei#include "ara/crypto/cryp/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
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_50050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50050@rel:R25-11#c4804739
Content hash
c4804739
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50050
Status: valid/unmigrated Version: rel:R25-11#439b3c69 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_50050@rel:R25-11#439b3c69
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

functie GetMaximumInputIvSize [SWS_CRYPT_50142] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV 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_50142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50142@rel:R25-11#9077b001
Content hash
9077b001
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50142
Status: valid/unmigrated Version: rel:R25-11#2fd32b15 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_50142@rel:R25-11#2fd32b15
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

functie GetMinimumChunkSize [SWS_CRYPT_50144] Upstream: RS_CRYPTO_02309

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

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the minimum 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_50144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50144@rel:R25-11#213efe8c
Content hash
213efe8c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50144
Status: valid/unmigrated Version: rel:R25-11#8dfc91ab 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_50144@rel:R25-11#8dfc91ab
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

functie GetMinimumInputIvSize [SWS_CRYPT_50141] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV 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_50141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50141@rel:R25-11#196cdb80
Content hash
196cdb80
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50141
Status: valid/unmigrated Version: rel:R25-11#a69e1387 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_50141@rel:R25-11#a69e1387
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

functie GetOutputIvSize [SWS_CRYPT_50143] Upstream: RS_CRYPTO_02309

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

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV 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_50143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50143@rel:R25-11#d2e2f77f
Content hash
d2e2f77f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50143
Status: valid/unmigrated Version: rel:R25-11#11f7dfe6 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_50143@rel:R25-11#11f7dfe6
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

functie GetRequiredOutputBufferSize [SWS_CRYPT_50140] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

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

Parameter (in)

ParameterBeschreibung
inputSizesize of input data
isFinalif true, calculate maximum required output buffer size for Finish(), FinishEncrypt(), ProcessSingleCallWithInputIv(), and Encrypt SingleCallWithOutputIv(), otherwise for Update()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the required capacity of the output buffer (in bytes) or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key and setting the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50140@rel:R25-11#156e18db
Content hash
156e18db
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50140
Status: valid/unmigrated Version: rel:R25-11#3cd4a32f 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_50140@rel:R25-11#3cd4a32f
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

functie ProcessSingleCall [SWS_CRYPT_50047] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion in, ReadWriteMemRegion out, CryptoTransform transform Direction) noexcept=0;

Perform en-/decryption in a single-call without setting or returning an IV.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 4a1fdc95f521 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode ProcessSingleCall voert een ver- of ontsleuteling uit in één enkele synchrone aanroep zonder initialisatievector (IV) ([SWS_CRYPT_50047]). Als invoerparameters dienen de gegevensbuffer in (ReadOnlyMemRegion) en de transformatierichting transformDirection (CryptoTransform), terwijl het resultaat naar de buffer out (ReadWriteMemRegion) wordt geschreven. Bij een geslaagde uitvoering retourneert de functie een ara::core::Result<std::size_t>, die het aantal geschreven bytes bevat; deze waarde kan kleiner zijn dan de totale capaciteit van de uitvoerbuffer.

Met betrekking tot concurrency en veiligheid is de methode gespecificeerd als thread-safe en exception safe ([SWS_CRYPT_50047]). De verwerkbare invoergrootte van in is onderhevig aan de door de context gedefinieerde limieten, die via [SWS_CRYPT_50144] (GetMinimumChunkSize) en [SWS_CRYPT_50050] (GetMaximumChunkSize) kunnen worden opgevraagd.

Alle foutgevallen volgen een rollback-semantiek ([SWS_CRYPT_50047]):

  • ara::crypto::CryptoErrc::kUninitializedContext: de context is vooraf niet geïnitialiseerd door toewijzing van een sleutel.
  • ara::crypto::CryptoErrc::kUnsupported: single-call-verwerking wordt niet ondersteund of de transformatie vereist het instellen dan wel uitlezen van een IV.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: de uitvoerbuffer out biedt onvoldoende capaciteit.
  • ara::crypto::CryptoErrc::kInvalidInputSize: de invoergrootte kan niet door de context worden verwerkt.
  • ara::crypto::CryptoErrc::kUsageViolation: het sleutelgebruik dekt de aangevraagde operatie niet (kAllowDataEncryption resp. kAllowDataDecryption).
  • ara::crypto::CryptoErrc::kIncompatibleObject, kEmptyKeySlot, kInvalidArgument of kBusyResource: sleutel is incompatibel, sleutelslot is leeg, invoergegevens zijn ongeldig of benodigde bronnen zijn bezet.

In wisselwerking met andere interfaces vereist de aanroep een volledig geconfigureerde context; voor authenticerende cijfers met aanvullende tag-verwerking staat in AuthCipherCtx de alternatieve interface [SWS_CRYPT_50078] ter beschikking.

Deze gebruiksinstructie is automatisch gegenereerd op basis van de AUTOSAR-specificatie.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext
transformDirectionthe transformation direction, i.e., encryption or decryption

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to

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 out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if the context requires setting or returning an IV in the passed transformDirection
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50047@rel:R25-11#a2c62bf9
Content hash
a2c62bf9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50047
Status: valid/unmigrated Version: rel:R25-11#c5198454 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_50047@rel:R25-11#c5198454
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

functie ProcessSingleCallWithInputIv [SWS_CRYPT_50048] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, CryptoTransform transformDirection, ReadOnlyMemRegion iv) noexcept=0;

Perform en-/decryption in a single-call, providing an IV to be used during en-/decryption.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: f491c775eb62 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode ProcessSingleCallWithInputIv op ara::crypto::cryp::SymmetricCipherCtx voert een symmetrische ver- of ontsleuteling van gegevens uit in één enkele synchrone aanroep (single-call) [SWS_CRYPT_50048]. Hierbij wordt de voor de transformatie gebruikte initialisatievector expliciet via de invoerbuffer iv meegegeven.

Gebruik en samenspel

Via transformDirection wordt gestuurd of de gegevens uit in worden ver- of ontsleuteld. Het resultaat wordt in de buffer out geschreven. De geretourneerde ara::core::Result<std::size_t> bevat het werkelijke aantal geschreven bytes, dat lager kan uitvallen dan de totale capaciteit van out [SWS_CRYPT_50048].

Voor het dimensioneren van de buffers staan hulpfuncties ter beschikking:

  • De vereiste buffergrootte voor out kan vooraf via GetRequiredOutputBufferSize met de parameter isFinal = true worden berekend [SWS_CRYPT_50140].
  • De toegestane lengte voor iv kan voor de gekozen transformatierichting via GetMinimumInputIvSize [SWS_CRYPT_50141] en GetMaximumInputIvSize [SWS_CRYPT_50142] worden bepaald.
  • Als bovendien het genereren of verifiëren van een authenticatietag vereist is, moet in plaats daarvan ara::crypto::cryp::AuthCipherCtx::ProcessSingleCallWithInputIv worden gebruikt [SWS_CRYPT_50079].

Foutafhandeling en gelijktijdigheid

De bewerking is gedefinieerd als thread-safe en exception safe [SWS_CRYPT_50048]. Alle fouten hebben rollback-semantiek:

  • CryptoErrc::kUninitializedContext of CryptoErrc::kEmptyKeySlot: Aan de context is geen sleutel toegewezen of de KeySlot is leeg [SWS_CRYPT_50048].
  • CryptoErrc::kUsageViolation: De sleutel staat de gekozen richting niet toe (kAllowDataEncryption resp. kAllowDataDecryption ontbreekt) [SWS_CRYPT_50048].
  • CryptoErrc::kIncompatibleObject: Het sleuteltype is incompatibel met de transformatie [SWS_CRYPT_50048].
  • CryptoErrc::kInsufficientCapacity: De uitvoerbuffer out is te klein [SWS_CRYPT_50048].
  • CryptoErrc::kInvalidInputSize of CryptoErrc::kInvalidArgument: Buffergrootte of inhoud van in is ongeldig [SWS_CRYPT_50048].
  • CryptoErrc::kUnsupported: Single-call-verwerking of invoer-IV's worden niet ondersteund [SWS_CRYPT_50048].
  • CryptoErrc::kBusyResource: Een benodigde resource is bezet [SWS_CRYPT_50048].

Deze tekst is opgesteld door een AI en dient ter ondersteuning bij het gebruik van het specificatie-element.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan input data buffer containing the initialization vector (IV) to be used by the context

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to

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 out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if single-call processing with an input IV is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50048
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50048@rel:R25-11#93dcf3b3
Content hash
93dcf3b3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50048
Status: valid/unmigrated Version: rel:R25-11#06bfc8c8 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_50048@rel:R25-11#06bfc8c8
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

functie Seek [SWS_CRYPT_23613] Upstream: RS_CRYPTO_02304

virtual ara::core::Result< void > Seek (std::int64_t offset, bool from Begin) noexcept=0;

Set the position of the next byte within the data stream.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 2287fbd40f75 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode Seek van de interface ara::crypto::cryp::SymmetricCipherCtx stelt de positie van de volgende te verwerken byte binnen een gegevensstroom in [SWS_CRYPT_23613]. Bij gebrek aan asynchrone retourtypen zoals futures geschiedt de aanroep vermoedelijk synchroon. Vraag Q-fccf732722263f60 (open)

Gebruik

De positionering wordt geregeld via twee parameters [SWS_CRYPT_23613]:

  • offset: Byte-offset in de gegevensstroom, gerelateerd aan het begin van de stream of de huidige positie [SWS_CRYPT_23613].
  • fromBegin: Referentiepunt voor de positionering; true adresseert de offset vanaf het begin van de stream, false ten opzichte van de huidige positie [SWS_CRYPT_23613].

De functie is gedeclareerd als noexcept en retourneert een ara::core::Result<void>, die de succesvolle voltooiing signaleert of een opgetreden foutobject bevat [SWS_CRYPT_23613].

Gelijktijdigheid en beperkingen

Volgens de specificatie is Seek geclassificeerd als uitzonderingsveilig (exception safe) en thread-veilig (thread-safe) [SWS_CRYPT_23613]. Voorwaarde voor de uitvoering is dat de gegevensverwerking vooraf is geïnitieerd door aanroep van Start() [SWS_CRYPT_23613].

Foutafhandeling

Alle foutgevallen zijn onderworpen aan een gedefinieerde rollback-semantiek (rollback_semantics), zodat de interne toestand bij fouten consistent blijft [SWS_CRYPT_23613]:

  • ara::crypto::CryptoErrc::kUnsupported: De seek-bewerking wordt niet ondersteund door de huidige cryptografische context [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kProcessingNotStarted: De gegevensverwerking is niet vooraf via Start() gestart [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kOutOfBounds: De resulterende offset is te klein of te groot voor de gegevensstroom [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kInvalidArgument: De resulterende offset is niet uitgelijnd op een blokgrens, hoewel de context een blokuitlijning vereist [SWS_CRYPT_23613].

Deze tekst is gegenereerd door een AI.

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

Parameter (in)

ParameterBeschreibung
offsetthe offset value in bytes, relative to begin or current position in the data stream
fromBeginthe starting point for positioning within the stream: from begin (if true) or from current position (if false)

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the seek operation is not supported by this context
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kOutOfBoundsrollback_semantics if the resulting offset value is too large or too small
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the resulting offset is not block aligned but the context requires block alignment

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23613
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23613@rel:R25-11#13b4c4f6
Content hash
13b4c4f6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23613
Status: valid/unmigrated Version: rel:R25-11#383a800f 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_23613@rel:R25-11#383a800f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6a4153822026-09-30
  • R19-11rel:R19-11#9c63158a2026-10-14
  • R20-11rel:R20-11#36a48d2b2026-10-14
  • R21-11rel:R21-11#f3b5692c2026-10-14
  • R22-11rel:R22-11#a11f983a2026-10-14
  • R23-11rel:R23-11#10ff1b922026-10-14
  • R24-11rel:R24-11#23dbf8e42026-10-14
  • R25-11rel:R25-11#383a800f2026-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

functie SetKey [SWS_CRYPT_50043] 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 en-/decryption is started.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 72406ca015ea Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De puur virtuele methode SetKey configureert de instantie van ara::crypto::cryp::SymmetricCipherCtx zodanig dat deze voor toekomstige cryptografische operaties de sleutel uit het doorgegeven KeySlot gebruikt [SWS_CRYPT_50043].

Gebruik en aanroepcontext

De aanroep vindt synchroon plaats en accepteert als parameter keySlot een KeySlot::Sptr, die een SymmetricKey bevat [SWS_CRYPT_50043]. De retourwaarde is een ara::core::Result<void>, die het succes aangeeft of in een foutgeval een foutcode transporteert [SWS_CRYPT_50043]. De configuratie zorgt ervoor dat de in het slot opgeslagen sleutel pas op het moment wordt geraadpleegd waarop de eigenlijke ver- of ontsleuteling wordt gestart [SWS_CRYPT_50043].

Foutafhandeling

In een foutgeval wordt er geen uitzondering geworpen (de methode is gespecificeerd als noexcept en exception safe), maar wordt een foutcode met rollback-semantiek geretourneerd [SWS_CRYPT_50043]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: het doorgegeven KeySlot is incompatibel met de versleutelingscontext [SWS_CRYPT_50043].
  • ara::crypto::CryptoErrc::kUnsupported: de contextimplementatie ondersteunt uitsluitend het instellen van een directe sleutel (zoals SymmetricKey) en geen toewijzing via een KeySlot [SWS_CRYPT_50043].

Gelijktijdigheid en wisselwerking

De methode is aangeduid als thread-safe [SWS_CRYPT_50043]. Interpretatie: het daadwerkelijke uitlezen van het sleutelmateriaal vindt vermoedelijk pas plaats bij het starten van de ver- of ontsleuteling, zodat het slot tot de start van de transformatie consistent moet blijven. Vraag Q-799125800ab0f93c (open) Het concept om contexten via KeySlot::Sptr in plaats van directe sleutelobjecten te configureren, komt overeen met het uniforme patroon van verwante crypto-contexten, waaronder KeyDerivationFunctionCtx [SWS_CRYPT_50010], MessageAuthnCodeCtx [SWS_CRYPT_50026], SymmetricKeyWrapperCtx [SWS_CRYPT_50034] en VerifierPublicCtx [SWS_CRYPT_50018].

Deze tekst is gegenereerd door een AI op basis van de specificatie AUTOSAR Adaptive R25-11.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a SymmetricKey.

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 SymmetricKey

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50043
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50043@rel:R25-11#23074c91
Content hash
23074c91
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50043
Status: valid/unmigrated Version: rel:R25-11#e7e7c9ab 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_50043@rel:R25-11#e7e7c9ab
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

functie SetKey [SWS_CRYPT_50138] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

Configure the context to use the provided symmetric key.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 7e5086bb8751 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De methode SetKey dient ertoe een instantie van ara::crypto::cryp::SymmetricCipherCtx te configureren voor het gebruik van een meegegeven symmetrische sleutel [SWS_CRYPT_50138]. Als invoerparameter accepteert de functie de te gebruiken sleutel als smart pointer key van het type SymmetricKey::Sptr. De aanroep vindt synchroon plaats en retourneert een ara::core::Result<void>, die bij succesvolle toewijzing leeg is of in geval van een fout een foutcode ter beschikking stelt [SWS_CRYPT_50138]. De declaratie is opgenomen via de header ara/crypto/cryp/symmetric_cipher_ctx.h.

Foutafhandeling

De foutafhandeling garandeert rollback-semantiek, zodat de context bij een mislukking van de toewijzing in zijn vorige toestand blijft [SWS_CRYPT_50138]. Er zijn twee specifieke fouten gedefinieerd:

  • ara::crypto::CryptoErrc::kUnsupported: Treedt op wanneer de context uitsluitend de toewijzing van een sleutel via een KeySlot ondersteunt [SWS_CRYPT_50138].
  • ara::crypto::CryptoErrc::kIncompatibleObject: Wordt geretourneerd wanneer het meegegeven sleutelobject niet compatibel is met de context [SWS_CRYPT_50138].

Gelijktijdigheid en wisselwerking

De virtuele functie is gedefinieerd als noexcept, geldt als exception-safe en is conform de specificatie uitgevoerd als thread-safe [SWS_CRYPT_50138]. Vergelijkbare interfaces voor het toewijzen van SymmetricKey::Sptr zijn te vinden in verwante cryptocontexten zoals AuthCipherCtx [SWS_CRYPT_23911] en SymmetricKeyWrapperCtx [SWS_CRYPT_24018]. Het samenspel met sleutelcontainers wordt bovendien verduidelijkt door contextklassen die als alternatief KeySlot::Sptr accepteren [SWS_CRYPT_50034].

Deze gebruiksinstructie is automatisch gegenereerd op basis van de AUTOSAR-specificatie R25-11.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
keythe SymmetricKey to be used.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided key object is incompatible with this context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50138@rel:R25-11#ec832a3a
Content hash
ec832a3a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50138
Status: valid/unmigrated Version: rel:R25-11#aa2f4130 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_50138@rel:R25-11#aa2f4130
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

functie Start [SWS_CRYPT_23625] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0;

Initialize the context for a new encryption or decryption and set the IV used by the context.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 33beff56357b Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De methode Start initialiseert de context ara::crypto::cryp::SymmetricCipherCtx voor een nieuwe synchrone versleutelings- of ontsleutelingsbewerking en stelt de bijbehorende initialisatievector (IV) respectievelijk nonce-waarde in [SWS_CRYPT_23625]. Via de parameter transformDirection wordt de transformatierichting vastgelegd, terwijl iv de initialisatievector als ReadOnlyMemRegion verstrekt [SWS_CRYPT_23625]. De toegestane grootte van de buffer kan vooraf worden opgevraagd via de methoden GetMinimumInputIvSize() en GetMaximumInputIvSize() [SWS_CRYPT_23625]. De aanroep retourneert een ara::core::Result<void>, is gedeclareerd als noexcept en geldt als uitzonderingsveilig (exception safe) [SWS_CRYPT_23625].

Foutafhandeling

In geval van een fout wordt een foutcode met rollback-semantiek geretourneerd [SWS_CRYPT_23625]:

  • ara::crypto::CryptoErrc::kUninitializedContext: De context is vooraf niet geïnitialiseerd door toewijzing van een sleutel [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kInvalidInputSize: De doorgegeven IV-grootte wordt niet ondersteund [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUnsupported: Het instellen van een IV in de opgegeven transformatierichting of stroomverwerking wordt niet ondersteund door de context [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is momenteel leeg [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUsageViolation: Het toegestane sleutelgebruik omvat niet kAllowDataEncryption voor versleuteling respectievelijk kAllowDataDecryption voor ontsleuteling [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kIncompatibleObject: Het sleuteltype is incompatibel met de transformatie of transformatierichting [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kBusyResource: Een benodigde resource is bezet [SWS_CRYPT_23625].

Gelijktijdigheid en wisselwerking

De functie is gespecificeerd als thread-veilig (thread-safe) [SWS_CRYPT_23625]. In het verloop van een streamverwerking fungeert Start als initiërende stap, die bijvoorbeeld wordt gevolgd door positioneringsbewerkingen via Seek [SWS_CRYPT_23613] of de afronding via FinishEncrypt [SWS_CRYPT_23618].

Deze tekst is gegenereerd door een AI-systeem op basis van de AUTOSAR-specificatie R25-11.

Implementer's Guide volgt (complexiteit I1)

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan Initialization Vector (IV) or "nonce" value. The allowed size of the IV can be queried using the functions GetMinimumInputIvSize() and GetMaximumInputIvSize().

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support setting an IV in the given transform Direction or if stream processing is not supported by the context
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23625@rel:R25-11#ac3fc40b
Content hash
ac3fc40b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23625
Status: valid/unmigrated Version: rel:R25-11#608e87fd 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_23625@rel:R25-11#608e87fd
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a536a6ca2026-09-30
  • R20-11rel:R20-11#6996665a2026-10-14
  • R21-11rel:R21-11#c2b5cf1e2026-10-14
  • R22-11rel:R22-11#25b4dab42026-10-14
  • R23-11rel:R23-11#e01d837d2026-10-14
  • R24-11rel:R24-11#26e85c6c2026-10-14
  • R25-11rel:R25-11#608e87fd2026-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

functie Start [SWS_CRYPT_50044] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new encryption or decryption. An IV is either not required for this context in this transformation direction, or set by the context itself.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 09affb4844e4 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De methode Start initialiseert een instantie van ara::crypto::cryp::SymmetricCipherCtx synchroon voor een aanstaande ver- of ontsleuteling ([SWS_CRYPT_50044]). Ze wordt gebruikt wanneer voor de via parameter transformDirection voorgeschreven transformatierichting geen initialisatievector (IV) nodig is of de context deze zelf genereert ([SWS_CRYPT_50044]). Vereist de context in de gekozen richting daarentegen een expliciete IV, dan moet de overbelasting met IV-parameter worden aangeroepen ([SWS_CRYPT_23625]).

Foutafhandeling en gelijktijdigheid

De bewerking is gespecificeerd als thread-veilig en exception-veilig ([SWS_CRYPT_50044]). Bij een fout retourneert de functie een ara::core::Result<void> met rollback-semantiek ([SWS_CRYPT_50044]). Relevante foutoorzaken zijn:

  • ara::crypto::CryptoErrc::kUninitializedContext: Aan de context is vooraf geen sleutel toegewezen ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUnsupported: De streamverwerking wordt niet ondersteund of de bewerking vereist in deze richting dwingend het instellen van een IV ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUsageViolation: De sleutel beschikt niet over de vereiste bevoegdheid kAllowDataEncryption respectievelijk kAllowDataDecryption ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kIncompatibleObject of ara::crypto::CryptoErrc::kEmptyKeySlot: Het sleuteltype past niet bij de transformatie respectievelijk de geconfigureerde sleutelpositie is leeg ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kBusyResource: Een vereiste resource is momenteel bezet ([SWS_CRYPT_50044]).

Samenspel

Na succesvolle initialisatie kan de datastroom desgewenst via Seek worden gepositioneerd ([SWS_CRYPT_23613]). Werd de IV door de context zelf vastgelegd, dan wordt deze aan het einde van de versleuteling via FinishEncrypt aan de oproeper overgedragen ([SWS_CRYPT_23618]).

Deze gebruiksinstructie is geautomatiseerd opgesteld op basis van de AUTOSAR-specificatie R25-11.

Implementer's Guide volgt (complexiteit I1)

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV in the given transformDirection or if stream processing is not supported by the context
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50044
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50044@rel:R25-11#dbcb9d9e
Content hash
dbcb9d9e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50044
Status: valid/unmigrated Version: rel:R25-11#842f896d 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_50044@rel:R25-11#842f896d
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

functie Update [SWS_CRYPT_50139] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt or decrypt a data buffer.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 5cb4a9bba31d Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De synchrone methode Update() dient in ara::crypto::cryp::SymmetricCipherCtx voor het stapsgewijs ver- of ontsleutelen van deeldatastromen [SWS_CRYPT_50139]. Ze verwerkt een invoerbuffer in (type ReadOnlyMemRegion) met platte tekst of cijfertekst en schrijft de getransformeerde data naar de uitvoerbuffer out (type ReadWriteMemRegion) [SWS_CRYPT_50139]. De retourwaarde ara::core::Result<std::size_t> levert bij succes het exacte aantal daadwerkelijk naar out geschreven bytes op, wat minder kan zijn dan de totale capaciteit van de doelbuffer [SWS_CRYPT_50139].

Voor de aanroep gelden vastgelegde voorwaarden en bufferregels:

  • Uitvoeringsvolgorde: De dataverwerking moet verplicht vooraf met de methode Start() zijn geïnitieerd; anders mislukt de aanroep met ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50139].
  • Bufferdimensionering: De maximaal per afzonderlijke aanroep toegestane invoergrootte kan via GetMaximumChunkSize() worden bepaald [SWS_CRYPT_50050]; ongeldige buffergroottes beantwoordt de methode met ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50139]. De vereiste uitvoerbuffer kan via GetRequiredOutputBufferSize() worden opgevraagd [SWS_CRYPT_50139]; een te kleine buffer leidt tot ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50139].
  • Streaming-ondersteuning: Ondersteunt de concrete context geen continue streamverwerking, dan mislukt de aanroep met ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50139].

De interface is gespecificeerd als thread-safe en exception safe en garandeert bij elke fout een rollback-semantiek [SWS_CRYPT_50139]. In de verwerkingscyclus werkt ze samen met GetMaximumChunkSize() en afsluitende operaties zoals Finish() of FinishEncrypt() [SWS_CRYPT_50050].

Deze gebruiksinstructie is geautomatiseerd gegenereerd op basis van de AUTOSAR-specificatie R25-11.

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data will be written into. The required size of this buffer can be queried using GetRequiredOutputBufferSize()

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 out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
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::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50139@rel:R25-11#2ec43a29
Content hash
2ec43a29
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50139
Status: valid/unmigrated Version: rel:R25-11#50161066 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_50139@rel:R25-11#50161066
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

Documentatie van de typealiassen

typealias Sptr [SWS_CRYPT_50137] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<SymmetricCipherCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50137@rel:R25-11#3db3a97e
Content hash
3db3a97e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50137
Status: valid/unmigrated Version: rel:R25-11#61315479 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_50137@rel:R25-11#61315479
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