DEENESPTFRRUARHIKOZHNL

clase 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

Guía del usuarioGENERADO POR IA

Sirve para el cálculo y la verificación basados en claves de Message Authentication Codes criptográficos.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b9d1594d1774 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Sirve para el cálculo y la verificación basados en claves de Message Authentication Codes criptográficos.

La interfaz permite el cálculo y la verificación basados en claves de Message Authentication Codes para mensajes de cualquier longitud. Tras la inicialización con una clave simétrica mediante [SWS_CRYPT_22118], los digests MAC pueden procesarse bien en un único paso o bien en un procedimiento de streaming mediante llamadas de inicio, actualización y finalización. El resultado de verificación obtenido puede consultarse a continuación o cotejarse directamente con un valor nominal. Todos los métodos están especificados como seguros para subprocesos y señalan flujos defectuosos o capacidades de búfer insuficientes mediante valores de retorno estandarizados de acuerdo con [SWS_CRYPT_22116].

Contexto

La interfaz MessageAuthnCodeCtx define operaciones criptográficas para la generación y verificación de códigos de autenticación de mensajes basados en clave (Message Authentication Codes, MAC). Permite la comprobación de autenticidad e integridad de cantidades arbitrarias de datos, tanto a través de flujos incrementales de datos como a través de bloques de memoria contiguos individuales. La gestión de instancias se realiza a través del tipo de puntero inteligente suministrado Sptr [SWS_CRYPT_22101].

Como interlocutores centrales actúan los componentes de aplicación invocadores así como objetos de clave. Un contexto puede configurarse bien directamente con un objeto de clave simétrica SymmetricKey [SWS_CRYPT_22118] o bien a través de un espacio de almacenamiento lógico KeySlot [SWS_CRYPT_50026]. La transferencia de datos se realiza a través de estructuras de búfer como ReadOnlyMemRegion para datos de entrada así como ReadWriteMemRegion para digests MAC calculados.

Ciclo de vida

Una instancia de contexto atraviesa una secuencia de estados definida desde la inicialización hasta la puesta a disposición del resultado de MAC:

  • Uninitialized: tras la creación, el contexto aún no posee ninguna clave y rechaza las llamadas de cálculo.
  • Configured: mediante la llamada a SetKey() con una clave [SWS_CRYPT_22118] o un almacén de claves [SWS_CRYPT_50026] se inicializa el contexto. En este estado pueden ejecutarse métodos de llamada única (Single-Call) o iniciarse una sesión de streaming.
  • Processing: la llamada a Start() sin vector de inicialización [SWS_CRYPT_22111] o con IV [SWS_CRYPT_22110] abre el procesamiento en streaming. Mediante llamadas repetidas a Update() [SWS_CRYPT_22113] se introducen bloques de datos. Es posible una cancelación a través de Cancel() [SWS_CRYPT_50027].
  • Finished: el método Finish() [SWS_CRYPT_22115] concluye el cálculo. A continuación, el resultado puede consultarse o compararse.

Interpretación: tras la finalización o cancelación, el contexto permanece presumiblemente en el estado configurado y puede reutilizarse para nuevas operaciones. Pregunta Q-b61229b77ae88ab0 (abierta) Todos los métodos de la interfaz están especificados como seguros para subprocesos y a prueba de excepciones.

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()

Diagrama de estados: ciclo de vida y transiciones de estado del contexto MAC. Fuentes: [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]

Ruta de uso

La interfaz admite dos rutas de uso típicas: streaming incremental y procesamiento de llamada única (Single-Call).

En la ruta de streaming, el invocador vincula primero la clave a través de SetKey() [SWS_CRYPT_22118]. Antes de comenzar, pueden consultarse parámetros del algoritmo como el tamaño de IV recomendado a través de GetRecommendedIvSize() [SWS_CRYPT_50135], así como el tamaño máximo de fragmento a través de GetMaximumChunkSize() [SWS_CRYPT_50033]. Tras la llamada a Start() [SWS_CRYPT_22110], los fragmentos de mensaje se procesan sucesivamente mediante Update() [SWS_CRYPT_22113]. Tan pronto como se han transferido todos los datos, Finish() concluye el cálculo [SWS_CRYPT_22115]. El digest generado se copia a continuación con GetDigest() en un búfer [SWS_CRYPT_22116], cuyo tamaño mínimo puede determinarse previamente mediante GetDigestSize() [SWS_CRYPT_50134]. Alternativamente, Compare() [SWS_CRYPT_50133] o CompareSubspan() [SWS_CRYPT_50028] permiten la comparación directa con un valor de referencia esperado.

Cálculo en streaming de un Message Authentication CodeAplicaciónMessageAuthnCodeCtxSetKey(key)Result<void>Start(iv)Result<void>loopPara cada bloque de datosUpdate(chunk)Result<void>Finish()Result<void>GetDigest(digest)Result<size_t>

Diagrama de secuencias: desarrollo del cálculo incremental de MAC en modo streaming. Fuentes: [SWS_CRYPT_22118], [SWS_CRYPT_22110], [SWS_CRYPT_22113], [SWS_CRYPT_22115], [SWS_CRYPT_22116]

Si el mensaje completo ya está disponible por completo, el cálculo puede realizarse sin streaming mediante Generate() [SWS_CRYPT_50029] o de forma truncada mediante GenerateSubspan() [SWS_CRYPT_50030] en un solo paso. Para la verificación están disponibles de forma análoga los métodos Verify() [SWS_CRYPT_50031] y VerifySubspan() [SWS_CRYPT_50032].

Escenarios de error

Los errores se señalan a través del tipo de retorno ara::core::Result y cubren las siguientes causas:

Esta guía de clase se basa en la especificación de AUTOSAR Adaptive R25-11 para el módulo crypto.

Mapa de miembros

Diagrama de clases

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

Vista de detalle

Selecciona una entrada en el índice.

Métodos

Cancel función

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 función

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 función

Finish the MAC calculation.

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

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 función

Write the calculated MAC digest into the provided output buffer.

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

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 función 2

Configure the context to use the provided key.

Sobrecargas 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 función 2

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

Sobrecargas 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 función

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

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

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;
VerifySubspan función

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;

Alias de tipo

Sptr alias de tipo

Smart pointer of the interface.

Documentación de los métodos

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 53954aee5980 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método virtual puro Cancel sirve en la interfaz ara::crypto::cryp::MessageAuthnCodeCtx para cancelar una operación en flujo continua previamente iniciada mediante Start() y aún no finalizada [SWS_CRYPT_50027]. La llamada se efectúa de forma síncrona, no admite parámetros de entrada y devuelve, en caso de éxito, un ara::core::Result<void> vacío que confirma la cancelación satisfactoria de la operación [SWS_CRYPT_50027].

Si el procesamiento de datos no se inició correctamente antes de la llamada mediante el método Start(), la ejecución falla. En este caso, la función devuelve un resultado con el código de error específico ara::crypto::CryptoErrc::kProcessingNotStarted garantizando una semántica de reversión (rollback) [SWS_CRYPT_50027]. En cuanto a la seguridad de ejecución, la interfaz está especificada como segura para hilos (thread-safe) y garantiza seguridad frente a excepciones (exception safe), ya que está declarada como noexcept y no lanza excepciones [SWS_CRYPT_50027].

El comportamiento de cancelación idéntico para procesamientos en flujo aún no finalizados es compartido por todas las interfaces de contexto afines del módulo criptográfico:

Interpretación: Al cancelar la operación incompleta, el contexto debería restablecerse a un estado limpio que permita una posterior reinicialización a través de Start(). Pregunta Q-a8fa5cb85c3dab50 (abierta)

Esta nota de uso se ha generado de forma automatizada sobre la base de la especificación AUTOSAR Adaptive R25-11.

Guía del implementador pendiente (complejidad 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#883614a2
Content hash
883614a2
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 9af675c314c3 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método puramente virtual Compare de la clase ara::crypto::cryp::MessageAuthnCodeCtx sirve para cotejar el tamaño y el contenido de un Message Authentication Code (MAC) calculado con un digest esperado [SWS_CRYPT_50133]. Como parámetro, el digest MAC esperado se transfiere a través de ReadOnlyMemRegion expected. La función devuelve un ara::core::Result<bool> que contiene true si el valor MAC calculado coincide exactamente con el valor esperado, y en caso contrario false [SWS_CRYPT_50133].

Manejo de errores

En caso de error, se devuelve un código de error en el objeto de resultado, aplicándose una semántica de reversión [SWS_CRYPT_50133]:

  • ara::crypto::CryptoErrc::kProcessingNotFinished: Se notifica si el cálculo del digest no se ha concluido previamente mediante la llamada al método Finish() [SWS_CRYPT_50133].
  • ara::crypto::CryptoErrc::kInvalidInputSize: Ocurre si el tamaño de búfer transferido del digest MAC esperado no es compatible con el contexto [SWS_CRYPT_50133].

Concurrencia y restricciones

El método está declarado como const, así como noexcept, y según la especificación es seguro frente a subprocesos (thread-safe) y seguro frente a excepciones (exception safe) [SWS_CRYPT_50133]. Una condición previa fundamental es el cálculo del digest completado con éxito previamente mediante Finish() [SWS_CRYPT_50133].

Interacción

A diferencia de Compare, que valida la coincidencia completa de todo el digest MAC [SWS_CRYPT_50133], CompareSubspan únicamente compara en el mismo contexto los bits más significativos (most significant bits) con el valor esperado [SWS_CRYPT_50028]. Para funciones hash sin clave existe una función Compare homónima en ara::crypto::cryp::HashFunctionCtx [SWS_CRYPT_50154].

Esta nota de uso fue generada automáticamente sobre la base de la especificación 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#56accd7a
Content hash
56accd7a
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 4c36a4e7dbbc Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método síncrono CompareSubspan de la clase ara::crypto::cryp::MessageAuthnCodeCtx compara los bits más significativos (Most Significant Bits) de un valor MAC calculado con una referencia predeterminada [SWS_CRYPT_50028]. El valor de comparación esperado se pasa mediante el parámetro expected como ReadOnlyMemRegion [SWS_CRYPT_50028]. El resultado se devuelve como ara::core::Result<bool> y contiene true en caso de identidad de los bits más significativos, así como false en caso de discrepancias [SWS_CRYPT_50028].

Tratamiento de errores y condiciones de ejecución

Para una comparación válida, el cálculo del valor de comprobación debe estar concluido. Si no existe una llamada previa al método Finish(), la llamada falla con el código de error ara::crypto::CryptoErrc::kProcessingNotFinished [SWS_CRYPT_50028]. Si el tamaño de búfer del parámetro expected pasado no es admisible para el procedimiento utilizado, el método notifica ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50028]. Ambos tipos de error garantizan la semántica de rollback [SWS_CRYPT_50028].

Concurrencia y contexto de ejecución

La operación está especificada como noexcept (exception-safe) y clasificada como thread-safe [SWS_CRYPT_50028]. Interpretación: la seguridad para subprocesos declarada probablemente se refiera al estado posterior a la finalización de Finish(), de modo que múltiples subprocesos puedan verificar en paralelo el mismo resumen procesado (digest) calculado. Pregunta Q-ac8b7ead6a5b508e (abierta)

Esta nota de uso se generó automáticamente a partir de la especificación 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#468fb42e
Content hash
468fb42e
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

función Finish [SWS_CRYPT_22115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02203

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

Finish the MAC calculation.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 9113df4242ca Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método Finish() finaliza de forma vinculante el cálculo en curso de un Message Authentication Code (MAC) dentro de la interfaz MessageAuthnCodeCtx [SWS_CRYPT_22115]. La llamada se realiza de forma síncrona, no toma parámetros y devuelve ara::core::Result<void>, lo que en el caso regular de éxito representa un resultado vacío [SWS_CRYPT_22115].

En caso de error, la función devuelve el código de error ara::crypto::CryptoErrc::kProcessingNotStarted si el cálculo del MAC no se ha iniciado con éxito antes de la llamada; en tal caso, se aplica una semántica de reversión (rollback) [SWS_CRYPT_22115]. La operación está declarada como noexcept y, según la especificación, está especificada tanto a prueba de excepciones (exception safe) como segura para subprocesos (thread-safe) [SWS_CRYPT_22115].

En el flujo de procesamiento, Finish() constituye el enlace entre el procesamiento de datos y la evaluación: tras la llamada, el digest de MAC generado se puede transferir a un búfer provisto mediante GetDigest() [SWS_CRYPT_22116] o verificarse directamente contra un valor de referencia con CompareSubspan() [SWS_CRYPT_50028]. Mientras que GetMaximumChunkSize() [SWS_CRYPT_50033] describe de forma genérica tamaños de búfer para Update() o Finish(), Finish() aquí no procesa datos directamente; su mención en el requisito probablemente refleje un patrón uniforme en todos los contextos criptográficos. Pregunta Q-79b4f4ecf3998e48 (abierta)

Esta nota de uso se ha generado automáticamente a partir de la especificación de 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#fa5314ce
Content hash
fa5314ce
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 1f27dd6e39dc Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función miembro sincrónica Generate de la clase ara::crypto::cryp::MessageAuthnCodeCtx sirve, según [SWS_CRYPT_50029], para el cálculo de un Message Authentication Code (MAC) en un único paso y escribe el resumen calculado en el búfer de salida proporcionado.

Para la llamada se pasan los siguientes parámetros:

  • data: datos de entrada para el cálculo del MAC como ReadOnlyMemRegion.
  • digest: área de memoria de destino de tipo ReadWriteMemRegion en la que se escribe el resumen.
  • iv: un vector de inicialización opcional como ara::core::Optional<ReadOnlyMemRegion>.

En caso de éxito, la función devuelve un ara::core::Result<std::size_t> que contiene el tamaño en bytes del resumen MAC escrito [SWS_CRYPT_50029].

Si se produce un error, se devuelve un código de error con semántica de reversión [SWS_CRYPT_50029]:

  • UninitializedContext: el contexto todavía no se ha inicializado mediante la asignación de una clave.
  • ara::crypto::CryptoErrc::kUsageViolation: la clave utilizada no posee el indicador de uso requerido kAllowMac. Interpretación: presumiblemente, se generará y configurará previamente una clave simétrica adecuada mediante GenerateSymmetricKey [SWS_CRYPT_20721]. Pregunta Q-d22f397bbc02487b (abierta)
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Un KeySlot configurado está actualmente vacío.
  • ara::crypto::CryptoErrc::kUnsupported: no se admite el procesamiento mediante llamada única o la especificación del vector de inicialización no cumple los requisitos del algoritmo (VI ausente o indicado de forma no permitida).
  • ara::crypto::CryptoErrc::kInvalidInputSize: no se admite el tamaño del búfer de los datos de entrada o del VI.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: el búfer de destino digest es demasiado pequeño para el resumen MAC.
  • ara::crypto::CryptoErrc::kBusyResource: un recurso del sistema requerido está ocupado.

En lo relativo a la concurrencia, el método está especificado como thread-safe y exception safe [SWS_CRYPT_50029]. Está declarado como const noexcept y no modifica el estado del contexto durante su ejecución.

Esta nota de uso se ha generado automáticamente y se basa en la especificación AUTOSAR Adaptive de la versión 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#ad180297
Content hash
ad180297
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 9f5519d31718 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método GenerateSubspan de la clase ara::crypto::cryp::MessageAuthnCodeCtx calcula en un único paso un Message Authentication Code (MAC) para los datos de entrada data y escribe el inicio (los bytes más significativos, MSB) del digest calculado en el búfer de salida truncatedDigest [SWS_CRYPT_50030]. Mediante el parámetro opcional iv se puede pasar un vector de inicialización si es necesario [SWS_CRYPT_50030]. El retorno directo de ara::core::Result<std::size_t> probablemente indique una ejecución síncrona; si el proceso se completa con éxito, se devuelve el número de bytes escritos del digest de MAC [SWS_CRYPT_50030]. Pregunta Q-167c6d44b9f39fed (abierta)

Para el caso de error, la especificación define una semántica de reversión y prevé los siguientes códigos de error [SWS_CRYPT_50030]:

  • UninitializedContext: El contexto no se inicializó previamente mediante la asignación de una clave [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Un KeySlot configurado está actualmente vacío [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUsageViolation: El uso permitido de la clave no incluye kAllowMac [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUnsupported: No se admite el procesamiento en un único paso, o bien la configuración del IV no concuerda con el contexto (falta el IV requerido o se ha suministrado un IV no permitido) [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kInvalidInputSize: No se admite el tamaño de los datos pasados data o del iv [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kBusyResource: un recurso necesario está ocupado [SWS_CRYPT_50030].

En lo que respecta al entorno de ejecución, el método está especificado como thread-safe y ofrece seguridad frente a excepciones (noexcept) [SWS_CRYPT_50030]. Para una llamada sin fallos se requiere la provisión previa en el contexto de una clave con la autorización correspondiente [SWS_CRYPT_50030].

Este texto ha sido generado por una IA y sirve como guía orientativa. El documento vinculante es la especificación oficial de AUTOSAR.

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#89444587
Content hash
89444587
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

función 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#6c18e667
Content hash
6c18e667
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

función 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#e200eff0
Content hash
e200eff0
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

función 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#9d8eb83a
Content hash
9d8eb83a
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

función 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#d0c6d6a4
Content hash
d0c6d6a4
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: c93b5656f1ba Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método SetKey configura una instancia de ara::crypto::cryp::MessageAuthnCodeCtx para el cálculo posterior de MAC con una clave simétrica proporcionada [SWS_CRYPT_22118]. La llamada se realiza de forma síncrona y recibe el objeto de clave como puntero inteligente SymmetricKey::Sptr. Como resultado, la función devuelve un ara::core::Result<void> que está vacío en caso de éxito o encapsula un código de error específico en caso de error [SWS_CRYPT_22118].

Si la asignación falla, se aplica una semántica de reversión que preserva el estado anterior del contexto [SWS_CRYPT_22118]. Se especifican los siguientes estados de error de ara::crypto::CryptoErrc:

  • kUnsupported: El contexto admite exclusivamente la vinculación mediante un KeySlot en lugar de a través de objetos de clave directos [SWS_CRYPT_22118].
  • kIncompatibleObject: El objeto de clave simétrica pasado es incompatible con el contexto de destino [SWS_CRYPT_22118].
  • kUsageViolation: Los indicadores de autorización de la clave no contienen el uso obligatorio kAllowMac [SWS_CRYPT_22118].

En cuanto a la seguridad de ejecución, la interfaz está definida como thread-safe y exception safe (con noexcept) [SWS_CRYPT_22118]. En interacción con la gestión de claves, representa la contraparte directa de la asignación basada en ranuras: si una implementación o un caso de uso admite la utilización de ranuras persistidas, se utiliza en su lugar la sobrecarga para KeySlot::Sptr [SWS_CRYPT_50026].

Este texto ha sido generado por una IA sobre la base de la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#db78d081
Content hash
db78d081
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 0efaaf10920d Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

La función miembro virtual SetKey de la interfaz ara::crypto::cryp::MessageAuthnCodeCtx del archivo de cabecera ara/crypto/cryp/message_authn_code_ctx.h configura el contexto para el cálculo o la verificación de un Message Authentication Code (MAC) [SWS_CRYPT_50026]. Como parámetro, el método sincrónico recibe un puntero inteligente keySlot de tipo KeySlot::Sptr que contiene una clave simétrica, y devuelve un ara::core::Result<void> [SWS_CRYPT_50026]. La vinculación de la clave es semánticamente diferida: la clave almacenada en el slot solo se utiliza en el momento en que se inicia efectivamente el cálculo del MAC [SWS_CRYPT_50026]. Interpretación: Las actualizaciones posteriores del contenido del slot hasta el inicio del cálculo deberían, por tanto, surtir efecto. Pregunta Q-d1886811d8af71e3 (abierta)

Concurrencia y seguridad de ejecución

La interfaz está definida como noexcept, garantiza seguridad frente a excepciones (exception safe) y está especificada explícitamente para la invocación concurrente (thread-safe) [SWS_CRYPT_50026].

Tratamiento de errores e interacción

En caso de error, el método garantiza una estricta semántica de reversión, de modo que el estado anterior del contexto se conserva por completo [SWS_CRYPT_50026]. En el objeto de resultado pueden presentarse los siguientes códigos de error:

  • ara::crypto::CryptoErrc::kIncompatibleObject: El KeySlot transferido es incompatible con este contexto de clave simétrica [SWS_CRYPT_50026].
  • ara::crypto::CryptoErrc::kUnsupported: La implementación concreta del contexto no admite el establecimiento mediante KeySlot [SWS_CRYPT_50026]. En este caso, debe utilizarse alternativamente la sobrecarga SetKey(SymmetricKey::Sptr) para la transferencia directa de una clave [SWS_CRYPT_22118].

Esta nota de uso se ha generado automáticamente a partir de los datos de especificación.

Guía del implementador pendiente (complejidad 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#f277bb13
Content hash
f277bb13
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

función 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)

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 42d35ba25b44 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método Start de ara::crypto::cryp::MessageAuthnCodeCtx inicializa el contexto para un nuevo cálculo de MAC y establece en ello un vector de inicialización o valor nonce a través del parámetro iv ([SWS_CRYPT_22110]). Esto se utiliza, por ejemplo, en algoritmos como GMAC ([SWS_CRYPT_22110]). Para cálculos sin vector de inicialización explícito está disponible alternativamente la sobrecarga sin parámetros Start() ([SWS_CRYPT_22111]).

Uso y concurrencia

La llamada se realiza de forma síncrona y está especificada como thread-safe y exception safe ([SWS_CRYPT_22110]). Tras una llamada correcta, se pueden transferir partes sucesivas del mensaje al contexto mediante Update ([SWS_CRYPT_22113]). Una operación de transmisión continua (streaming) en curso aún no finalizada puede cancelarse en caso necesario mediante Cancel ([SWS_CRYPT_50027]).

Manejo de errores

El método devuelve un ara::core::Result<void> que posee semántica de reversión en caso de error ([SWS_CRYPT_22110]). Los posibles estados de error son:

  • UninitializedContext: No se asignó previamente ninguna clave al contexto ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Un KeySlot configurado está vacío ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUsageViolation: Los permisos de la clave no contienen kAllowMac ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: El tamaño de IV proporcionado no es compatible ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUnsupported: El algoritmo o el contexto no admiten el streaming ni el establecimiento de un IV ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kBusyResource: Un recurso necesario está ocupado ([SWS_CRYPT_22110]).

Esta nota de uso fue generada por una IA sobre la base de la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#2823948c
Content hash
2823948c
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

función Start [SWS_CRYPT_22111] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 891e10477d9e Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método Start() inicializa una instancia de ara::crypto::cryp::MessageAuthnCodeCtx para un nuevo cálculo de MAC [SWS_CRYPT_22111]. La llamada no acepta parámetros y devuelve un ara::core::Result<void> [SWS_CRYPT_22111]. Es de suponer que la ejecución se realiza de forma síncrona, ya que se proporciona directamente un objeto de resultado. Pregunta Q-1e6e36f4ed1176d3 (abierta)

Tratamiento de errores y concurrencia

Si se produce un error durante la inicialización, se aplica la semántica de reversión y se devuelve uno de los siguientes códigos de error [SWS_CRYPT_22111]:

  • UninitializedContext: no se ha asignado previamente ninguna clave al contexto [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUnsupported: el contexto no admite streaming o el algoritmo requiere obligatoriamente un vector de inicialización (IV) [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kBusyResource: un recurso necesario está ocupado [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: un KeySlot configurado está vacío [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUsageViolation: la clave no permite el cálculo de MAC sin haber establecido kAllowMac [SWS_CRYPT_22111].

La función está especificada como segura para subprocesos y segura frente a excepciones (exception safe) [SWS_CRYPT_22111].

Interacción en el flujo de streaming

Si el algoritmo requiere un IV (p. ej., GMAC), se debe utilizar en su lugar la sobrecarga Start(ReadOnlyMemRegion iv) [SWS_CRYPT_22110]. Tras una llamada correcta, los datos del mensaje se pueden pasar progresivamente a través de Update() [SWS_CRYPT_22113]. Una operación de streaming que aún no haya concluido se puede descartar mediante Cancel() [SWS_CRYPT_50027].

Esta nota de uso ha sido generada por un sistema de IA a partir de la especificación AUTOSAR.

Guía del implementador pendiente (complejidad 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#479fba1b
Content hash
479fba1b
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 017c756799dd Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método síncrono Update del contexto ara::crypto::cryp::MessageAuthnCodeCtx sirve para complementar el cálculo en curso de un Message Authentication Code (MAC) con un fragmento adicional del mensaje de entrada [SWS_CRYPT_22113]. La sección de datos que se va a procesar se pasa mediante el parámetro data en forma de ReadOnlyMemRegion. Como valor de retorno, la función proporciona un ara::core::Result<void> que confirma el paso intermedio exitoso o, en caso de error, informa sobre la causa del error [SWS_CRYPT_22113].

Tratamiento de errores y concurrencia

En caso de error, se garantiza una semántica de rollback, de modo que el estado de cálculo previo permanece inalterado [SWS_CRYPT_22113]. Las posibles causas de error son:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: el cálculo no se inició previamente mediante la llamada al método Start() [SWS_CRYPT_22113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: el contexto no admite el tamaño del bloque de datos proporcionado [SWS_CRYPT_22113].

El método está declarado como noexcept y especificado como seguro para subprocesos (thread-safe) y seguro frente a excepciones (exception safe) [SWS_CRYPT_22113].

Interacción

Para evitar errores de búfer con ara::crypto::CryptoErrc::kInvalidInputSize, el tamaño de entrada máximo permitido para llamadas individuales se puede consultar previamente a través del método GetMaximumChunkSize() [SWS_CRYPT_50033]. Tras procesar sucesivamente todas las partes del mensaje, según la interpretación, el cálculo de la etiqueta MAC concluiría típicamente a través del método Finish() [SWS_CRYPT_50033]. Pregunta Q-7f8eaf8ebbf30d55 (abierta)

Este texto ha sido generado por una IA a partir de la especificación de AUTOSAR.

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#2b838551
Content hash
2b838551
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 7407e2d0a067 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método Verify en ara::crypto::cryp::MessageAuthnCodeCtx ([SWS_CRYPT_50031]) sirve para el cálculo sincrónico de un resumen MAC sobre el búfer de entrada data y su comparación directa con el valor esperado expected. De forma opcional, se puede pasar un vector de inicialización a través de iv. Como resultado, la función devuelve un ara::core::Result<bool> que contiene true si el MAC calculado coincide con la secuencia de bytes esperada; en caso contrario, false.

Manejo de errores

Si la verificación falla por razones sistémicas o criptográficas, el método devuelve un ara::core::Result con el código de error correspondiente ([SWS_CRYPT_50031]):

  • UninitializedContext: si el contexto no se ha inicializado previamente mediante la asignación de una clave.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: si el KeySlot configurado está vacío.
  • ara::crypto::CryptoErrc::kUsageViolation: si el uso permitido de la clave no incluye kAllowMac.
  • ara::crypto::CryptoErrc::kInvalidInputSize: si el tamaño del búfer de data, expected o iv no es válido.
  • ara::crypto::CryptoErrc::kUnsupported: si no se admite la ejecución mediante llamada única o la provisión del iv no se corresponde con las exigencias del algoritmo.
  • ara::crypto::CryptoErrc::kBusyResource: en caso de conflictos de recursos.

Concurrencia e interacción

El método está especificado como thread-safe y exception safe ([SWS_CRYPT_50031]). En caso de error, se aplica una semántica de reversión. A diferencia de las comprobaciones de firma asimétrica en ara::crypto::cryp::VerifierPublicCtx ([SWS_CRYPT_24112], [SWS_CRYPT_50024]), Verify opera sobre contextos MAC simétricos. El tamaño de búfer máximo procesable en una llamada única probablemente esté limitado —de forma análoga a la consulta de búfer en los verificadores de firma ([SWS_CRYPT_50025])— por la implementación del contexto. Pregunta Q-51e7427e4e082881 (abierta)

Este texto ha sido generado por una IA sobre la base de la especificación 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#d405421a
Content hash
d405421a
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: afcf3e6e2c9f Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método VerifySubspan de la clase ara::crypto::cryp::MessageAuthnCodeCtx sirve para calcular de forma síncrona un digest de MAC y comparar a continuación sus bits más significativos con una secuencia de bytes esperada [SWS_CRYPT_50032]. Procesa datos de entrada a través de data, los bits iniciales esperados a través de expected, así como un vector de inicialización opcional a través de iv [SWS_CRYPT_50032]. El resultado se devuelve como ara::core::Result<bool> y, en caso de coincidencia exitosa, indica true, o de lo contrario false [SWS_CRYPT_50032].

La interfaz está especificada como noexcept, es exception safe así como thread-safe y aplica una semántica de reversión en caso de error [SWS_CRYPT_50032]. Las llamadas fallidas entregan códigos de error específicos en el valor de retorno [SWS_CRYPT_50032]:

  • UninitializedContext: El contexto no se inicializó previamente mediante la asignación de una clave [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUsageViolation: el uso permitido de la clave no incluye kAllowMac [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Un KeySlot configurado está actualmente vacío [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kInvalidInputSize: No se admite el tamaño de los datos pasados, del valor de comprobación esperado o del IV [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUnsupported: No se admite la operación de llamada única (single-call) o el suministro del IV contradice los requisitos del contexto [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kBusyResource: un recurso necesario está ocupado [SWS_CRYPT_50032].

Esta nota de uso fue generada automáticamente sobre la base de la especificación.

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#0a3c7e77
Content hash
0a3c7e77
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

Documentación de los alias de tipo

alias de tipo 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#92680d1b
Content hash
92680d1b
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