DEENESPTFRRUARHIKOZHNL

klasse ara::crypto::cryp::MessageAuthnCodeCtx

[SWS_CRYPT_22100] Upstream: RS_CRYPTO_02203

class MessageAuthnCodeCtx :           public CryptoContext {...};

Keyed Message Authentication Code Context interface definition.

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

User GuideAI-GEGENEREERD

Dient voor de sleutelgebaseerde berekening en verificatie van cryptografische Message Authentication Codes.
DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: b9d1594d1774 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Dient voor de sleutelgebaseerde berekening en verificatie van cryptografische Message Authentication Codes.

De interface maakt de sleutelgebaseerde berekening en verificatie mogelijk van Message Authentication Codes voor berichten van willekeurige lengte. Na de initialisatie met een symmetrische sleutel via [SWS_CRYPT_22118] kunnen MAC-digests ofwel in één enkele stap ofwel via streaming met start-, update- en afrondingsaanroepen worden verwerkt. Het resulterende controleresultaat kan vervolgens worden opgevraagd of direct worden vergeleken met een streefwaarde. Alle methoden zijn als thread-safe gespecificeerd en signaleren foutieve verloopstappen of ontoereikende buffercapaciteiten via gestandaardiseerde retourwaarden conform [SWS_CRYPT_22116].

Context

De interface MessageAuthnCodeCtx definieert cryptografische operaties voor het genereren en verifiëren van sleutelgebaseerde berichtauthenticatiecodes (Message Authentication Codes, MAC). Ze staat de authenticiteits- en integriteitscontrole van willekeurige hoeveelheden gegevens toe, zowel via incrementele datastromen als via afzonderlijke aaneengesloten geheugenblokken. Het beheer van instanties vindt plaats via het beschikbaar gestelde smart-pointertype Sptr [SWS_CRYPT_22101].

Als centrale interactiepartners treden aanroepende applicatiecomponenten en sleutelobjecten op. Een context kan ofwel direct met een symmetrisch sleutelobject SymmetricKey [SWS_CRYPT_22118] ofwel via een logische opslaglocatie KeySlot [SWS_CRYPT_50026] worden geconfigureerd. De gegevensoverdracht vindt plaats via bufferstructuren zoals ReadOnlyMemRegion voor invoergegevens en ReadWriteMemRegion voor berekende MAC-digests.

Levenscyclus

Een contextinstantie doorloopt een gedefinieerde toestandsreeks van de initialisatie tot de beschikbaarstelling van het MAC-resultaat:

  • Uninitialized: Na het aanmaken bezit de context nog geen sleutel en weist deze berekeningsaanroepen af.
  • Configured: Door het aanroepen van SetKey() met een sleutel [SWS_CRYPT_22118] of een sleutelopslag [SWS_CRYPT_50026] wordt de context geïnitialiseerd. In deze toestand kunnen single-call-methoden worden uitgevoerd of kan een streaming-sessie worden gestart.
  • Processing: De aanroep van Start() zonder initialisatievector [SWS_CRYPT_22111] of met IV [SWS_CRYPT_22110] opent de streaming-verwerking. Door middel van herhaalde Update() [SWS_CRYPT_22113] worden datablokken ingevoerd. Afbreken is mogelijk via Cancel() [SWS_CRYPT_50027].
  • Finished: De methode Finish() [SWS_CRYPT_22115] rondt de berekening af. Vervolgens kan het resultaat worden opgevraagd of vergeleken.

Interpretatie: Na voltooiing of afbreken blijft de context vermoedelijk in de geconfigureerde toestand en kan deze voor nieuwe operaties worden hergebruikt. Vraag Q-b61229b77ae88ab0 (open) Alle methoden van de interface zijn gespecificeerd als thread-safe en uitzonderingsveilig.

mac_states Uninitialized Uninitialized Configured Configured Uninitialized->Configured SetKey() Configured->Configured Generate() / Verify() Processing Processing Configured->Processing Start() Processing->Configured Cancel() Processing->Processing Update() Finished Finished Processing->Finished Finish() Finished->Processing Start() Finished->Finished GetDigest() / Compare()

Toestandsdiagram: Levenscyclus en toestandsovergangen van de MAC-context. Bronnen: [SWS_CRYPT_22118], [SWS_CRYPT_50026], [SWS_CRYPT_22110], [SWS_CRYPT_22111], [SWS_CRYPT_22113], [SWS_CRYPT_22115], [SWS_CRYPT_50027], [SWS_CRYPT_22116], [SWS_CRYPT_50029], [SWS_CRYPT_50031]

Gebruikspad

De interface ondersteunt twee typische gebruikstrajecten: incrementele streaming en single-call-verwerking.

In het streaming-traject koppelt de aanroeper eerst de sleutel via SetKey() [SWS_CRYPT_22118]. Voorafgaand aan het begin kunnen algoritmeparameters zoals de aanbevolen IV-grootte via GetRecommendedIvSize() [SWS_CRYPT_50135] en de maximale chunkgrootte via GetMaximumChunkSize() [SWS_CRYPT_50033] worden opgevraagd. Na de aanroep van Start() [SWS_CRYPT_22110] worden berichtfragmenten achtereenvolgens via Update() verwerkt [SWS_CRYPT_22113]. Zodra alle gegevens zijn overgedragen, rondt Finish() de berekening af [SWS_CRYPT_22115]. De gegenereerde digest wordt vervolgens met GetDigest() naar een buffer gekopieerd [SWS_CRYPT_22116], waarvan de minimale grootte vooraf via GetDigestSize() kan worden bepaald [SWS_CRYPT_50134]. Als alternatief maakt Compare() [SWS_CRYPT_50133] of CompareSubspan() [SWS_CRYPT_50028] een directe vergelijking met een verwachte referentiewaarde mogelijk.

Streamingberekening van een Message Authentication CodeAnwendungMessageAuthnCodeCtxSetKey(key)Result<void>Start(iv)Result<void>loopVoor elk datablokUpdate(chunk)Result<void>Finish()Result<void>GetDigest(digest)Result<size_t>

Sequentiediagram: Verloop van de incrementele MAC-berekening in de streaming-modus. Bronnen: [SWS_CRYPT_22118], [SWS_CRYPT_22110], [SWS_CRYPT_22113], [SWS_CRYPT_22115], [SWS_CRYPT_22116]

Als het volledige bericht al beschikbaar is, kan de berekening zonder streaming via Generate() [SWS_CRYPT_50029] of verkort via GenerateSubspan() [SWS_CRYPT_50030] in één stap plaatsvinden. Voor verificatie staan analoog de methoden Verify() [SWS_CRYPT_50031] en VerifySubspan() [SWS_CRYPT_50032] ter beschikking.

Foutscenario's

Fouten worden gesignaleerd via het retourtype ara::core::Result en dekken de volgende oorzaken:

Deze klassehandleiding is gebaseerd op de specificatie van AUTOSAR Adaptive R25-11 voor de module crypto.

Ledenkaart

Klassendiagram

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

G nara__crypto__cryp__MessageAuthnCodeCtx845 MessageAuthnCodeCtx + Cancel() + Compare() + CompareSubspan() + Finish() + Generate() + GenerateSubspan() + GetDigest() + GetDigestSize() + GetMaximumChunkSize() + GetRecommendedIvSize() + SetKey() + Start() + Update() + Verify() + VerifySubspan() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__MessageAuthnCodeCtx845->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;
Compare functie

Compare the size and content of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;
Finish functie

Finish the MAC calculation.

virtual ara::core::Result< void > Finish () noexcept=0;
Generate functie

Calculate a MAC digest and write it to the provided output buffer.

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;
GetDigest functie

Write the calculated MAC digest into the provided output buffer.

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

Get the output digest size.

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

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

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

virtual ara::core::Result< std::size_t > GetRecommendedIvSize () const noexcept=0;
SetKey functie 2

Configure the context to use the provided key.

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

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

Overloads Start 2
virtual ara::core::Result< void > Start (ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_22110
virtual ara::core::Result< void > Start () noexcept=0; SWS_CRYPT_22111
Update functie

Update the MAC calculation context by a new part of the message.

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

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Type-aliassen

Sptr typealias

Smart pointer of the interface.

Documentatie van de methoden

functie Cancel [SWS_CRYPT_50027] 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: 53954aee5980 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De zuiver virtuele methode Cancel dient in de interface ara::crypto::cryp::MessageAuthnCodeCtx om een lopende, eerder middels Start() geïnitieerde en nog niet voltooide streamingoperatie af te breken [SWS_CRYPT_50027]. De aanroep verloopt synchroon, accepteert geen invoerparameters en retourneert bij succes een lege ara::core::Result<void>, die het succesvol afbreken van de operatie bevestigt [SWS_CRYPT_50027].

Als de gegevensverwerking voorafgaand aan de aanroep niet correct werd gestart door de methode Start(), mislukt de uitvoering. In dat geval levert de functie een resultaat op met de specifieke foutcode ara::crypto::CryptoErrc::kProcessingNotStarted onder waarborging van een rollback-semantiek [SWS_CRYPT_50027]. Wat de uitvoeringsveiligheid betreft, is de interface gespecificeerd als thread-safe en garandeert deze uitzonderingsveiligheid (exception safe), aangezien deze is gedeclareerd als noexcept en geen uitzonderingen genereert [SWS_CRYPT_50027].

Hetzelfde afbreekgedrag voor nog niet gefinaliseerde streamingverwerkingen wordt gedeeld door alle verwante contextinterfaces van de cryptografiemodule:

Interpretatie: door het afbreken van de onvoltooide operatie wordt de context vermoedelijk weer in een opgeschoonde toestand gebracht, die een latere herinitialisatie via Start() mogelijk maakt. Vraag Q-a8fa5cb85c3dab50 (open)

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

Implementer's Guide volgt (complexiteit I1)

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50027
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50027@rel:R25-11#7d2be854
Content hash
7d2be854
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50027
Status: valid/unmigrated Version: rel:R25-11#c993fffd 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_50027@rel:R25-11#c993fffd
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 Compare [SWS_CRYPT_50133] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the size and content of the calculated MAC digest against an expected value.

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

Gebruik

De puur virtuele methode Compare van de klasse ara::crypto::cryp::MessageAuthnCodeCtx dient ertoe de grootte en inhoud van een berekende Message Authentication Code (MAC) te vergelijken met een verwachte digest [SWS_CRYPT_50133]. Als parameter wordt de verwachte MAC-digest via ReadOnlyMemRegion expected doorgegeven. De functie retourneert een ara::core::Result<bool> die true bevat indien de berekende MAC-waarde exact overeenkomt met de verwachte waarde, en anders false [SWS_CRYPT_50133].

Foutafhandeling

In geval van een fout wordt een foutcode geretourneerd in het resultaatobject, waarbij een rollback-semantiek geldt [SWS_CRYPT_50133]:

  • ara::crypto::CryptoErrc::kProcessingNotFinished: Wordt gemeld als de berekening van de digest niet vooraf is voltooid door het aanroepen van de methode Finish() [SWS_CRYPT_50133].
  • ara::crypto::CryptoErrc::kInvalidInputSize: Treedt op als de doorgegeven buffergrootte van de verwachte MAC-digest niet wordt ondersteund door de context [SWS_CRYPT_50133].

Gelijktijdigheid en beperkingen

De methode is gedeclareerd als const evenals noexcept en is conform de specificatie thread-veilig (thread-safe) en uitzonderingsveilig (exception safe) [SWS_CRYPT_50133]. Een wezenlijke voorwaarde is de vooraf succesvol voltooide digest-berekening via Finish() [SWS_CRYPT_50133].

Samenspel

In tegenstelling tot Compare, dat de volledige overeenstemming van de gehele MAC-digest valideert [SWS_CRYPT_50133], vergelijkt CompareSubspan in dezelfde context uitsluitend de meest significante bits (most significant bits) met de verwachte waarde [SWS_CRYPT_50028]. Voor niet-versleutelde hashfuncties bestaat een gelijknamige Compare-functie in ara::crypto::cryp::HashFunctionCtx [SWS_CRYPT_50154].

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the expected MAC value equals the calculated MAC value, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50133@rel:R25-11#31b9d90e
Content hash
31b9d90e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50133
Status: valid/unmigrated Version: rel:R25-11#0e62292d 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_50133@rel:R25-11#0e62292d
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 CompareSubspan [SWS_CRYPT_50028] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

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

De synchrone methode CompareSubspan van de klasse ara::crypto::cryp::MessageAuthnCodeCtx vergelijkt de meest significante bits (Most Significant Bits) van een berekende MAC-waarde met een vooraf gedefinieerde referentie [SWS_CRYPT_50028]. De verwachte vergelijkingswaarde wordt via de parameter expected als ReadOnlyMemRegion doorgegeven [SWS_CRYPT_50028]. Het resultaat wordt als ara::core::Result<bool> geretourneerd en bevat true bij identiteit van de meest significante bits evenals false bij afwijkingen [SWS_CRYPT_50028].

Foutafhandeling en voorwaarden voor het verloop

Voor een geldige vergelijking moet de berekening van de controlewaarde zijn voltooid. Als er geen eerdere aanroep van de methode Finish() heeft plaatsgevonden, mislukt de aanroep met de foutcode ara::crypto::CryptoErrc::kProcessingNotFinished [SWS_CRYPT_50028]. Is de buffergrootte van de doorgegeven parameter expected ontoelaatbaar voor de gebruikte procedure, dan meldt de methode ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50028]. Beide foutsoorten garanderen rollback-semantiek [SWS_CRYPT_50028].

Gelijktijdigheid en uitvoeringscontext

De bewerking is gespecificeerd als noexcept (exception-safe) en geclassificeerd als thread-safe [SWS_CRYPT_50028]. Interpretatie: De gedeclareerde thread-safety heeft vermoedelijk betrekking op de toestand na voltooide Finish(), zodat meerdere threads dezelfde berekende digest parallel kunnen verifiëren. Vraag Q-ac8b7ead6a5b508e (open)

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the most-significant bits of the calculated MAC equal the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50028
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50028@rel:R25-11#d1414841
Content hash
d1414841
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50028
Status: valid/unmigrated Version: rel:R25-11#e7ce513a 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_50028@rel:R25-11#e7ce513a
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_22115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02203

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

Finish the MAC calculation.

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

De methode Finish() sluit de lopende berekening van een Message Authentication Code (MAC) binnen de interface MessageAuthnCodeCtx dwingend af [SWS_CRYPT_22115]. De aanroep vindt synchroon plaats, neemt geen parameters aan en retourneert ara::core::Result<void>, wat in het reguliere succesgeval een leeg resultaat voorstelt [SWS_CRYPT_22115].

In geval van een fout levert de functie de foutcode ara::crypto::CryptoErrc::kProcessingNotStarted als de MAC-berekening vóór de aanroep niet succesvol is gestart; daarbij treedt een rollback-semantiek in werking [SWS_CRYPT_22115]. De bewerking is gedeclareerd als noexcept en conform specificatie zowel exceptieveilig (exception safe) als thread-veilig (thread-safe) gespecificeerd [SWS_CRYPT_22115].

In het verwerkingsverloop vormt Finish() de schakel tussen de gegevensverwerking en de evaluatie: na de aanroep kan de gegenereerde MAC-digest via GetDigest() worden overgedragen naar een bereitgestelde buffer [SWS_CRYPT_22116] of met CompareSubspan() direct worden geverifieerd tegen een referentiewaarde [SWS_CRYPT_50028]. Terwijl GetMaximumChunkSize() [SWS_CRYPT_50033] generiek buffergroottes voor Update() of Finish() beschrijft, verwerkt Finish() hier geen gegevens direct; de vermelding in de eis weerspiegelt vermoedelijk een uniform patroon over alle cryptocontexten. Vraag Q-79b4f4ecf3998e48 (open)

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the MAC calculation has not been started successfully.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22115@rel:R25-11#0fe1892b
Content hash
0fe1892b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22115
Status: valid/unmigrated Version: rel:R25-11#e646e46d 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_22115@rel:R25-11#e646e46d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7d2b83f62026-09-30
  • R20-11rel:R20-11#a059cf072026-10-14
  • R21-11rel:R21-11#760e02282026-10-14
  • R22-11rel:R22-11#194848542026-10-14
  • R23-11rel:R23-11#499debd32026-10-14
  • R24-11rel:R24-11#d34af0022026-10-14
  • R25-11rel:R25-11#e646e46d2026-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 Generate [SWS_CRYPT_50029] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and write it to the provided output buffer.

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

De synchrone lidfunctie Generate van de klasse ara::crypto::cryp::MessageAuthnCodeCtx dient conform [SWS_CRYPT_50029] voor de berekening van een Message Authentication Code (MAC) in één enkele stap en schrijft de berekende digest naar de bereitgestelde uitvoerbuffer.

Voor de aanroep worden de volgende parameters doorgegeven:

  • data: invoergegevens voor de MAC-berekening als ReadOnlyMemRegion.
  • digest: doelgeheugengebied van het type ReadWriteMemRegion waarin de digest wordt geschreven.
  • iv: een optionele initialisatievector als ara::core::Optional<ReadOnlyMemRegion>.

In een geval van succes levert de functie een ara::core::Result<std::size_t> op, die de grootte van de geschreven MAC-digest in bytes bevat [SWS_CRYPT_50029].

Treedt er een fout op, dan wordt een foutcode met rollback-semantiek geretourneerd [SWS_CRYPT_50029]:

  • UninitializedContext: de context is nog niet geïnitialiseerd door toewijzing van een sleutel.
  • ara::crypto::CryptoErrc::kUsageViolation: de gebruikte sleutel bevat niet de vereiste gebruiksvlag kAllowMac. Interpretatie: een passende symmetrische sleutel dient vermoedelijk vooraf via GenerateSymmetricKey te worden gegenereerd en geconfigureerd [SWS_CRYPT_20721]. Vraag Q-d22f397bbc02487b (open)
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is momenteel leeg.
  • ara::crypto::CryptoErrc::kUnsupported: de single-call-verwerking wordt niet ondersteund of het specificeren van de initialisatievector voldoet niet aan de algoritme-eisen (ontbrekende of ontoelaatbaar opgegeven IV).
  • ara::crypto::CryptoErrc::kInvalidInputSize: de buffergrootte van de invoergegevens of van de IV wordt niet ondersteund.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: de doelbuffer digest is te klein voor de MAC-digest.
  • ara::crypto::CryptoErrc::kBusyResource: een benodigde systeembron is bezet.

Wat betreft concurrency is de methode als thread-safe en exception safe gespecificeerd [SWS_CRYPT_50029]. Ze is gedeclareerd als const noexcept en wijzigt bij uitvoering de toestand van de context niet.

Deze gebruiksinstructie is geautomatiseerd opgesteld en is gebaseerd op de AUTOSAR Adaptive-specificatie van release R25-11.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50029
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50029@rel:R25-11#eb142bf1
Content hash
eb142bf1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50029
Status: valid/unmigrated Version: rel:R25-11#66865bf3 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_50029@rel:R25-11#66865bf3
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 GenerateSubspan [SWS_CRYPT_50030] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

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

De methode GenerateSubspan van de klasse ara::crypto::cryp::MessageAuthnCodeCtx berekent in een enkele stap een Message Authentication Code (MAC) voor de invoergegevens data en schrijft het begin (de meest significante bytes, MSB) van de berekende digest naar de uitvoerbuffer truncatedDigest [SWS_CRYPT_50030]. Via de optionele parameter iv kan desgewenst een initialisatievector worden meegegeven [SWS_CRYPT_50030]. De directe teruggave van ara::core::Result<std::size_t> duidt vermoedelijk op een synchrone uitvoering; bij een succesvol verloop wordt het aantal geschreven bytes van de MAC-digest geretourneerd [SWS_CRYPT_50030]. Vraag Q-167c6d44b9f39fed (open)

De specificatie definieert voor het foutgeval een rollback-semantiek en voorziet in de volgende foutcodes [SWS_CRYPT_50030]:

  • UninitializedContext: De context is vooraf niet geïnitialiseerd door toewijzing van een sleutel [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is momenteel leeg [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUsageViolation: Het toegestane gebruik van de sleutel omvat niet kAllowMac [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUnsupported: De bewerking in één stap wordt niet ondersteund, of de IV-configuratie past niet bij de context (vereiste IV ontbreekt of ontoelaatbare IV meegegeven) [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kInvalidInputSize: De grootte van de meegegeven gegevens data of van de iv wordt niet ondersteund [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kBusyResource: Een benodigde resource is bezet [SWS_CRYPT_50030].

Wat betreft de uitvoeringsomgeving is de methode gespecificeerd als thread-safe en biedt deze exception-veiligheid (noexcept) [SWS_CRYPT_50030]. Voorwaarde voor een foutloze aanroep is het vooraf bereitstellen van een sleutel met de overeenkomstige bevoegdheid in de context [SWS_CRYPT_50030].

Deze tekst is gegenereerd door een AI en dient als oriëntatiehulp. Maatgevend is de officiële AUTOSAR-specificatie.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
truncatedDigestan output data buffer that the beginning of the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50030
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50030@rel:R25-11#f99ae444
Content hash
f99ae444
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50030
Status: valid/unmigrated Version: rel:R25-11#10f782d6 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_50030@rel:R25-11#10f782d6
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 GetDigest [SWS_CRYPT_22116] Upstream: RS_CRYPTO_02203

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

Write the calculated MAC digest into the provided output buffer.

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

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the MAC calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22116@rel:R25-11#8b36363f
Content hash
8b36363f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22116
Status: valid/unmigrated Version: rel:R25-11#0213970e 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_22116@rel:R25-11#0213970e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#f62c871b2026-09-30
  • R20-11rel:R20-11#97dd7dc32026-10-14
  • R21-11rel:R21-11#73d2dfec2026-10-14
  • R22-11rel:R22-11#086949e02026-10-14
  • R23-11rel:R23-11#c0af69462026-10-14
  • R24-11rel:R24-11#601580872026-10-14
  • R25-11rel:R25-11#0213970e2026-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 GetDigestSize [SWS_CRYPT_50134] Upstream: RS_CRYPTO_02309

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

Get the output digest size.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the hash digest 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_50134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50134@rel:R25-11#0b5c3f75
Content hash
0b5c3f75
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50134
Status: valid/unmigrated Version: rel:R25-11#2e6c359a 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_50134@rel:R25-11#2e6c359a
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 GetMaximumChunkSize [SWS_CRYPT_50033] 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 Finish() by this context.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50033
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50033@rel:R25-11#740d041d
Content hash
740d041d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50033
Status: valid/unmigrated Version: rel:R25-11#74ba2c5f 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_50033@rel:R25-11#74ba2c5f
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 GetRecommendedIvSize [SWS_CRYPT_50135] Upstream: RS_CRYPTO_02309

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >default expected 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_50135
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50135@rel:R25-11#68917633
Content hash
68917633
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50135
Status: valid/unmigrated Version: rel:R25-11#b1b43096 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_50135@rel:R25-11#b1b43096
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_22118] 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 key.

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

De methode SetKey configureert een instantie van ara::crypto::cryp::MessageAuthnCodeCtx voor de daaropvolgende MAC-berekening met een bereitgestelde symmetrische sleutel [SWS_CRYPT_22118]. De aanroep vindt synchroon plaats en accepteert het sleutelobject als smart pointer SymmetricKey::Sptr. Als resultaat levert de functie een ara::core::Result<void> op, dat bij succes leeg is of bij een fout een specifieke foutcode inkapselt [SWS_CRYPT_22118].

Mislukt de toewijzing, dan treedt een rollback-semantiek in werking die de eerdere toestand van de context behoudt [SWS_CRYPT_22118]. De volgende fouttoestanden uit ara::crypto::CryptoErrc zijn gespecificeerd:

  • kUnsupported: De context ondersteunt uitsluitend het binden via een KeySlot in plaats van via directe sleutelobjecten [SWS_CRYPT_22118].
  • kIncompatibleObject: Het doorgegeven symmetrische sleutelobject is incompatibel met de doelcontext [SWS_CRYPT_22118].
  • kUsageViolation: De bevoegdheidsvlaggen van de sleutel bevatten niet het dwingend vereiste gebruik kAllowMac [SWS_CRYPT_22118].

Wat betreft de uitvoeringsveiligheid is de interface gedefinieerd als thread-safe en exception safe (met noexcept) [SWS_CRYPT_22118]. In samenspel met het sleutelbeheer vormt deze de directe tegenhanger van de slotgebaseerde toewijzing: als een implementatie of een usecase het gebruik van gepersisteerde slots ondersteunt, wordt in plaats daarvan de overbelading voor KeySlot::Sptr gebruikt [SWS_CRYPT_50026].

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

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
keysymmetric key object used for MAC calculation

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
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22118
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22118@rel:R25-11#2a72244f
Content hash
2a72244f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22118
Status: valid/unmigrated Version: rel:R25-11#e40511f7 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_22118@rel:R25-11#e40511f7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#c6787c932026-09-30
  • R20-11rel:R20-11#02ea3abd2026-10-14
  • R21-11rel:R21-11#a4675ce22026-10-14
  • R22-11rel:R22-11#d5224dc92026-10-14
  • R23-11rel:R23-11#5cceac172026-10-14
  • R24-11rel:R24-11#6e177cb62026-10-14
  • R25-11rel:R25-11#e40511f72026-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_50026] 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 MAC calculation is started.

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

Gebruik

De virtuele lidfunctie SetKey van de interface ara::crypto::cryp::MessageAuthnCodeCtx uit het headerbestand ara/crypto/cryp/message_authn_code_ctx.h configureert de context voor de berekening of verificatie van een Message Authentication Code (MAC) [SWS_CRYPT_50026]. Als parameter accepteert de synchrone methode een smart pointer keySlot van het type KeySlot::Sptr, die een symmetrische sleutel bevat, en retourneert een ara::core::Result<void> [SWS_CRYPT_50026]. De binding van de sleutel is semantisch uitgesteld: de in het slot opgeslagen sleutel wordt pas gebruikt op het moment dat de MAC-berekening daadwerkelijk wordt gestart [SWS_CRYPT_50026]. Interpretatie: latere bijwerkingen van de slotinhoud tot aan de start van de berekening blijven zodoende vermoedelijk van kracht. Vraag Q-d1886811d8af71e3 (open)

Gelijktijdigheid en uitvoeringsveiligheid

De interface is gedefinieerd als noexcept, waarborgt uitzonderingsveiligheid (exception safe) en is expliciet gespecificeerd voor gelijktijdige aanroepen (thread-safe) [SWS_CRYPT_50026].

Foutafhandeling en wisselwerking

In geval van een fout garandeert de methode een strikte rollback-semantiek, zodat de voorgaande toestand van de context volledig behouden blijft [SWS_CRYPT_50026]. De volgende foutcodes kunnen in het resultaatobject optreden:

  • ara::crypto::CryptoErrc::kIncompatibleObject: de doorgegeven KeySlot is incompatibel met deze symmetrische sleutelcontext [SWS_CRYPT_50026].
  • ara::crypto::CryptoErrc::kUnsupported: de concrete implementatie van de context ondersteunt het instellen via KeySlot niet [SWS_CRYPT_50026]. In dit geval moet als alternatief de overload SetKey(SymmetricKey::Sptr) voor het direct doorgeven van een sleutel worden gebruikt [SWS_CRYPT_22118].

Deze gebruiksinstructie is geautomatiseerd opgesteld op basis van de specificatiegegevens.

Implementer's Guide volgt (complexiteit I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a symmetric 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 symmetric key 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_50026
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50026@rel:R25-11#c5d59105
Content hash
c5d59105
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50026
Status: valid/unmigrated Version: rel:R25-11#3de24834 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_50026@rel:R25-11#3de24834
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_22110] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

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

De methode Start van ara::crypto::cryp::MessageAuthnCodeCtx initialiseert de context voor een nieuwe MAC-berekening en stelt daarbij een initialisatievector of nonce-waarde in via de parameter iv ([SWS_CRYPT_22110]). Dit wordt bijvoorbeeld toegepast bij algoritmen zoals GMAC ([SWS_CRYPT_22110]). Voor berekeningen zonder expliciete initialisatievector is als alternatief de parameterloze overbelasting Start() beschikbaar ([SWS_CRYPT_22111]).

Gebruik en concurrency

De aanroep geschiedt synchroon en is gespecificeerd als thread-safe en exception safe ([SWS_CRYPT_22110]). Na een succesvolle aanroep kunnen opeenvolgende berichtdelen via Update aan de context worden overgedragen ([SWS_CRYPT_22113]). Een lopende, nog niet voltooide streamingbewerking kan indien nodig via Cancel worden afgebroken ([SWS_CRYPT_50027]).

Foutafhandeling

De methode retourneert een ara::core::Result<void>, die in geval van een fout rollback-semantiek heeft ([SWS_CRYPT_22110]). Mogelijke fouttoestanden zijn:

  • UninitializedContext: Aan de context is vooraf geen sleutel toegewezen ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is leeg ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUsageViolation: De machtigingen van de sleutel bevatten niet kAllowMac ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: De doorgegeven IV-grootte wordt niet ondersteund ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUnsupported: Streaming of het instellen van een IV wordt niet ondersteund door het algoritme respectievelijk de context ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kBusyResource: Een benodigde resource is bezet ([SWS_CRYPT_22110]).

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

Implementer's Guide volgt (complexiteit I1)

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

Parameter (in)

ParameterBeschreibung
ivan Initialization Vector (IV) or "nonce" 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::kInvalidInputSizerollback_semantics if the size of provided IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support streaming or the algorithm does not support setting an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22110@rel:R25-11#bcad07f9
Content hash
bcad07f9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22110
Status: valid/unmigrated Version: rel:R25-11#a5427060 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_22110@rel:R25-11#a5427060
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#ce38532b2026-09-30
  • R20-11rel:R20-11#15ffee6c2026-10-14
  • R21-11rel:R21-11#a3f8962f2026-10-14
  • R22-11rel:R22-11#fad6ef962026-10-14
  • R23-11rel:R23-11#765095392026-10-14
  • R24-11rel:R24-11#55625d952026-10-14
  • R25-11rel:R25-11#a54270602026-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_22111] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 891e10477d9e Herkomst Open vragen (1)
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::MessageAuthnCodeCtx voor een nieuwe MAC-berekening [SWS_CRYPT_22111]. De aanroep accepteert geen parameters en retourneert een ara::core::Result<void> [SWS_CRYPT_22111]. De uitvoering zal vermoedelijk synchroon plaatsvinden, aangezien direct een resultaatobject ter beschikking wordt gesteld. Vraag Q-1e6e36f4ed1176d3 (open)

Foutafhandeling en gelijktijdigheid

Als er bij de initialisatie een fout optreedt, geldt de rollback-semantiek en wordt een van de volgende foutcodes geretourneerd [SWS_CRYPT_22111]:

  • UninitializedContext: Er is vooraf geen sleutel aan de context toegewezen [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUnsupported: De context ondersteunt geen streaming of het algoritme vereist dwingend een initialisatievector (IV) [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kBusyResource: Een benodigde resource is bezet [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is leeg [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUsageViolation: De sleutel staat geen MAC-berekening toe zonder ingestelde kAllowMac [SWS_CRYPT_22111].

De functie is gespecificeerd als thread-safe en exceptieveilig (exception safe) [SWS_CRYPT_22111].

Samenspel in het streamingproces

Vereist het algoritme een IV (bijv. GMAC), dan moet in plaats daarvan de overbelasting Start(ReadOnlyMemRegion iv) worden gebruikt [SWS_CRYPT_22110]. Na een succesvolle aanroep kunnen berichtgegevens stapsgewijs via Update() worden doorgegeven [SWS_CRYPT_22113]. Een nog niet voltooide streamingbewerking kan via Cancel() worden verworpen [SWS_CRYPT_50027].

Deze gebruiksinstructie is gegenereerd door een AI-systeem op basis van de AUTOSAR-specificatie.

Implementer's Guide volgt (complexiteit I1)

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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 an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22111@rel:R25-11#02d1353c
Content hash
02d1353c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22111
Status: valid/unmigrated Version: rel:R25-11#7b2a29d5 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_22111@rel:R25-11#7b2a29d5
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d8957c992026-09-30
  • R20-11rel:R20-11#93def7c72026-10-14
  • R21-11rel:R21-11#268430762026-10-14
  • R22-11rel:R22-11#55642f832026-10-14
  • R23-11rel:R23-11#8f849ff62026-10-14
  • R24-11rel:R24-11#fa181e4f2026-10-14
  • R25-11rel:R25-11#7b2a29d52026-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 Update [SWS_CRYPT_22113] Upstream: RS_CRYPTO_02302

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

Update the MAC calculation context by a new part of the message.

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

Gebruik

De synchrone methode Update van de context ara::crypto::cryp::MessageAuthnCodeCtx dient ertoe om de lopende berekening van een Message Authentication Code (MAC) aan te vullen met een volgend fragment van het invoerbericht [SWS_CRYPT_22113]. Het te verwerken gegevenssegment wordt daarbij via parameter data doorgegeven in de vorm van een ReadOnlyMemRegion. Als retourwaarde levert de functie een ara::core::Result<void> op, die ofwel de succesvolle tussenstap bevestigt ofwel bij een fout inzicht geeft in de foutoorzaak [SWS_CRYPT_22113].

Foutafhandeling en gelijktijdigheid

In geval van een fout wordt een rollback-semantiek gegarandeerd, zodat de eerdere berekeningstoestand ongewijzigd blijft [SWS_CRYPT_22113]. Mogelijke foutoorzaken zijn:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: De berekening is vooraf niet geïnitieerd door de aanroep van de methode Start() [SWS_CRYPT_22113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: De grootte van het doorgegeven gegevensblok wordt niet ondersteund door de context [SWS_CRYPT_22113].

De methode is gedeclareerd als noexcept alsmede gespecificeerd als thread-safe en exceptieveilig (exception safe) [SWS_CRYPT_22113].

Samenspel

Om bufferfouten met ara::crypto::CryptoErrc::kInvalidInputSize te voorkomen, kan de maximaal toelaatbare invoergrootte voor afzonderlijke aanroepen vooraf worden opgevraagd via de methode GetMaximumChunkSize() [SWS_CRYPT_50033]. Na de opeenvolgende verwerking van alle berichtdelen zal de berekening van de MAC-tag volgens de interpretatie doorgaans worden afgerond via de methode Finish() [SWS_CRYPT_50033]. Vraag Q-7f8eaf8ebbf30d55 (open)

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

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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 digest 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_22113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22113@rel:R25-11#fee0a630
Content hash
fee0a630
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22113
Status: valid/unmigrated Version: rel:R25-11#36f72b69 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_22113@rel:R25-11#36f72b69
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#fa55dfba2026-09-30
  • R20-11rel:R20-11#f6d1433b2026-10-14
  • R21-11rel:R21-11#c608c8842026-10-14
  • R22-11rel:R22-11#a558bc872026-10-14
  • R23-11rel:R23-11#67ff09652026-10-14
  • R24-11rel:R24-11#8f531e602026-10-14
  • R25-11rel:R25-11#36f72b692026-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 Verify [SWS_CRYPT_50031] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

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

Gebruik

De methode Verify in ara::crypto::cryp::MessageAuthnCodeCtx ([SWS_CRYPT_50031]) dient voor de synchrone berekening van een MAC-digest over de invoerbuffer data en de directe vergelijking met de verwachte waarde expected. Optioneel kan via iv een initialisatievector worden doorgegeven. Als resultaat levert de functie een ara::core::Result<bool> op, die true bevat wanneer de berekende MAC overeenkomt met de verwachte bytesequentie, en anders false.

Foutafhandeling

Mislukt de verificatie om systemische of cryptografische redenen, dan levert de methode een ara::core::Result op met een overeenkomstige foutcode ([SWS_CRYPT_50031]):

  • UninitializedContext: wanneer de context vooraf niet is geïnitialiseerd door toewijzing van een sleutel.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: wanneer de geconfigureerde KeySlot leeg is.
  • ara::crypto::CryptoErrc::kUsageViolation: wanneer het toegestane gebruik van de sleutel kAllowMac niet omvat.
  • ara::crypto::CryptoErrc::kInvalidInputSize: wanneer de buffergrootte van data, expected of iv ontoelaatbaar is.
  • ara::crypto::CryptoErrc::kUnsupported: wanneer de single-call-uitvoering niet wordt ondersteund of het bereitstellen van de iv niet voldoet aan de vereisten van het algoritme.
  • ara::crypto::CryptoErrc::kBusyResource: bij bronconflicten.

Gelijktijdigheid en wisselwerking

De methode is gespecificeerd als thread-safe en exception safe ([SWS_CRYPT_50031]). Bij een fout geldt een rollback-semantiek. In tegenstelling tot asymmetrische handtekeningcontroles in ara::crypto::cryp::VerifierPublicCtx ([SWS_CRYPT_24112], [SWS_CRYPT_50024]) opereert Verify op symmetrische MAC-contexten. De maximaal in één enkele aanroep te verwerken buffergrootte is – analoog aan het opvragen van de buffer bij handtekeningverificateurs ([SWS_CRYPT_50025]) – vermoedelijk beperkt door de implementatie van de context. Vraag Q-51e7427e4e082881 (open)

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50031
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50031@rel:R25-11#e21ca463
Content hash
e21ca463
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50031
Status: valid/unmigrated Version: rel:R25-11#36679231 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_50031@rel:R25-11#36679231
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 VerifySubspan [SWS_CRYPT_50032] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

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

De methode VerifySubspan van de klasse ara::crypto::cryp::MessageAuthnCodeCtx dient voor de synchrone berekening van een MAC-digest en de aansluitende vergelijking van de meest significante bits ervan met een verwachte bytereeks [SWS_CRYPT_50032]. Zij verwerkt invoergegevens via data, de verwachte leidende bits via expected evenals een optionele initialisatievector via iv [SWS_CRYPT_50032]. Het resultaat wordt geretourneerd als ara::core::Result<bool> en signaleert bij succesvolle overeenkomst true, anders false [SWS_CRYPT_50032].

De interface is gespecificeerd als noexcept, is exception safe en thread-safe en past in geval van een fout rollback-semantiek toe [SWS_CRYPT_50032]. Mislukte aanroepen leveren specifieke foutcodes in de retourwaarde [SWS_CRYPT_50032]:

  • UninitializedContext: De context is vooraf niet geïnitialiseerd door toewijzing van een sleutel [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUsageViolation: Het toegestane gebruik van de sleutel omvat niet kAllowMac [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Een geconfigureerde KeySlot is momenteel leeg [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kInvalidInputSize: De grootte van de meegegeven gegevens, van de verwachte controlewaarde of van de IV wordt niet ondersteund [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUnsupported: De single-call-bewerking wordt niet ondersteund of het bereitstellen van de IV is in strijd met de vereisten van de context [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kBusyResource: Een benodigde resource is bezet [SWS_CRYPT_50032].

Deze gebruiksinstructie is automatisch gegenereerd op basis van de specificatie.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected most significant bits of the MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50032
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50032@rel:R25-11#b4c832bf
Content hash
b4c832bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50032
Status: valid/unmigrated Version: rel:R25-11#ff2bb246 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_50032@rel:R25-11#ff2bb246
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_22101] Upstream: RS_CRYPTO_02203

using Sptr = std::shared_ptr<MessageAuthnCodeCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22101@rel:R25-11#70c30bf8
Content hash
70c30bf8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22101
Status: valid/unmigrated Version: rel:R25-11#3fbb9742 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_22101@rel:R25-11#3fbb9742
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#553114f32026-09-30
  • R19-11rel:R19-11#2bb7b6d02026-10-14
  • R20-11rel:R20-11#7e9953b02026-10-14
  • R21-11rel:R21-11#7e9953b02026-10-14
  • R22-11rel:R22-11#5e819bc12026-10-14
  • R23-11rel:R23-11#6def4d652026-10-14
  • R24-11rel:R24-11#6def4d652026-10-14
  • R25-11rel:R25-11#3fbb97422026-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