DEENESPTFRRUARHIKOZHNL

clase ara::crypto::cryp::AuthCipherCtx

[SWS_CRYPT_20100] Upstream: RS_CRYPTO_02207

class AuthCipherCtx :           public CryptoContext {...};

Authenticated Cipher Context interface.

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

Guía del usuarioGENERADO POR IA

Proporciona una interfaz para el cifrado y descifrado simétrico autenticado con protección de integridad.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: a1dee2a3fcf5 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Proporciona una interfaz para el cifrado y descifrado simétrico autenticado con protección de integridad.

La interfaz ara::crypto::cryp::AuthCipherCtx sirve para el cifrado y descifrado autenticado de datos preservando la confidencialidad y la integridad [SWS_CRYPT_23911]. Tras configurar la clave, el procesamiento se realiza bien como una llamada única atómica o bien como una secuencia transmitida por flujo que consta de inicialización, datos de autenticación opcionales, actualizaciones de datos útiles y finalización. Como condición de seguridad crítica, el descifrado falla ante una etiqueta de autenticación no válida, de modo que los datos útiles descifrados solo deben procesarse tras una validación correcta [SWS_CRYPT_50075].

Contexto

La interfaz ara::crypto::cryp::AuthCipherCtx define la interfaz de programación estandarizada para operaciones de cifrado autenticado (Authenticated Encryption with Associated Data, AEAD) dentro de la AUTOSAR Adaptive Platform. Combina confidencialidad con protección de integridad, ya que, además del cifrado o descifrado real de los datos útiles, siempre se genera o valida una etiqueta de autenticación criptográfica. Actúan como interlocutores centrales las aplicaciones llamadoras y los objetos de clave: antes de su uso, un contexto se vincula a una instancia concreta de SymmetricKey [SWS_CRYPT_23911] o bien se configura con un KeySlot persistido o provisto [SWS_CRYPT_50072]. Además del procesamiento escalonado por flujo, la clase también admite llamadas únicas autosuficientes para procesar mensajes completos en un solo paso [SWS_CRYPT_50078].

Ciclo de vida

Los contextos se gestionan en el ámbito de la aplicación a través del tipo de puntero compartido ara::crypto::cryp::AuthCipherCtx::Sptr [SWS_CRYPT_20101]. (Interpretación: la creación de objetos se realiza normalmente a través de una fábrica de proveedores superior, ya que AuthCipherCtx está especificada como una interfaz pura). Pregunta Q-23125789874cf2f3 (abierta) Todas las funciones miembro están declaradas como seguras contra excepciones (exception safe) y seguras para subprocesos (thread-safe) [SWS_CRYPT_23911], [SWS_CRYPT_24715]. El ciclo de vida funcional atraviesa estados claramente definidos:

  • No inicializado: inmediatamente después de la instanciación. Las llamadas para el procesamiento de datos se rechazan, ya que todavía no se ha asignado ninguna clave [SWS_CRYPT_50081].
  • Clave configurada: mediante la llamada exitosa a SetKey con un SymmetricKey [SWS_CRYPT_23911] o un KeySlot [SWS_CRYPT_50072], el contexto pasa al estado operativo. Desde este estado se pueden ejecutar directamente operaciones de disparo único.
  • Flujo activo: se accede mediante la llamada a Start especificando la dirección de transformación con vector de inicialización (IV) [SWS_CRYPT_24715] o sin IV explícito [SWS_CRYPT_50073].
  • Finalización / restablecimiento: una operación de flujo en curso se finaliza de forma regular mediante Finish [SWS_CRYPT_50075] o FinishEncrypt [SWS_CRYPT_50076], o bien se cancela prematuramente mediante Cancel [SWS_CRYPT_50077]. A continuación, el contexto vuelve a estar listo para nuevas secuencias de procesamiento.
Lebenszyklus Uninitialized Uninitialized KeyConfigured KeyConfigured Uninitialized->KeyConfigured SetKey() KeyConfigured->KeyConfigured ProcessSingleCall() StreamingActive StreamingActive KeyConfigured->StreamingActive Start() StreamingActive->KeyConfigured Finish() / Cancel() StreamingActive->StreamingActive UpdateAuthenticatedData() UpdateConfidentialData()

Diagrama de estados: fases de estado del contexto desde la vinculación de claves hasta la finalización, pasando por el procesamiento de flujo. Fuentes: [SWS_CRYPT_23911], [SWS_CRYPT_50072], [SWS_CRYPT_24715], [SWS_CRYPT_50075], [SWS_CRYPT_50077].

Ruta de uso

Para el procesamiento continuo del flujo de datos, la interfaz requiere una secuencia ordenada de llamadas:

  1. Configuración: asignación de la clave mediante SetKey [SWS_CRYPT_23911] o SetKey con KeySlot [SWS_CRYPT_50072].
  2. Consulta de parámetros: determinación opcional de valores límite y tamaños de búfer mediante GetMinimumChunkSize [SWS_CRYPT_50162], GetMaximumChunkSize [SWS_CRYPT_50082], GetMinimumInputIvSize [SWS_CRYPT_50163], GetMaximumInputIvSize [SWS_CRYPT_50164], GetTagSize [SWS_CRYPT_50161] así como GetRequiredOutputBufferSize [SWS_CRYPT_50081].
  3. Inicio de la operación: invocación de Start especificando la dirección (cifrado o descifrado) así como proporcionando el IV [SWS_CRYPT_24715] o solicitando un IV propio del contexto [SWS_CRYPT_50073].
  4. Datos asociados (AAD): si deben incluirse datos adicionales en texto claro en el cálculo de integridad, estos se transmiten mediante UpdateAuthenticatedData [SWS_CRYPT_20313]. El tamaño máximo admisible de AAD se puede consultar mediante GetMaxAssociatedDataSize [SWS_CRYPT_20103]. Importante: los bloques AAD deben transmitirse obligatoriamente antes de los datos útiles propiamente dichos.
  5. Procesamiento de datos útiles: transferencia paso a paso de bloques de datos mediante UpdateConfidentialData [SWS_CRYPT_50074]. En el descifrado, el texto claro se devuelve antes de que se haya establecido su autenticidad; la aplicación solo debe utilizar estos datos tras una finalización correcta.
  6. Finalización: conclusión de la operación mediante Finish [SWS_CRYPT_50075] o FinishEncrypt [SWS_CRYPT_50076], con lo cual se procesa el bloque final y se calcula o verifica la etiqueta de autenticación.

Para cargas útiles compactas existen alternativas de llamada única (single-call): ProcessSingleCall procesa datos sin transferencia de IV [SWS_CRYPT_50078], ProcessSingleCallWithInputIv acepta un IV externo [SWS_CRYPT_50079], y EncryptSingleCallWithOutputIv devuelve al llamador un IV generado por el contexto [SWS_CRYPT_50080].

Flujo de un cifrado autenticado en streamingAplicaciónAuthCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>optZusatzdaten vorhandenUpdateAuthenticatedData(aad)Result<void>loopfuer jeden DatenblockUpdateConfidentialData(in, out)Result<size_t>Finish(in, out, tag)Result<size_t>

Diagrama de secuencia: secuencia de invocación de un cifrado autenticado en streaming. Fuentes: [SWS_CRYPT_23911], [SWS_CRYPT_24715], [SWS_CRYPT_20313], [SWS_CRYPT_50074], [SWS_CRYPT_50075].

Escenarios de error

Los métodos de AuthCipherCtx devuelven resultados mediante ara::core::Result y poseen semántica de reversión (rollback) en caso de error. Los códigos de error relevantes de ara::crypto::CryptoErrc son:

Esta guía se basa exclusivamente en el estándar AUTOSAR Adaptive (Release R25-11) y resume los requisitos para la interfaz ara::crypto::cryp::AuthCipherCtx.

Mapa de miembros

Diagrama de clases

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

G nara__crypto__cryp__AuthCipherCtx142 AuthCipherCtx + Cancel() + EncryptSingleCallWithOutputIv() + Finish() + FinishEncrypt() + GetMaxAssociatedDataSize() + GetMaximumChunkSize() + GetMaximumInputIvSize() + GetMinimumChunkSize() + GetMinimumInputIvSize() + GetOutputIvSize() + GetRequiredOutputBufferSize() + GetTagSize() + ProcessSingleCall() + ProcessSingleCallWithInputIv() + SetKey() + Start() … 2 weitere nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__AuthCipherCtx142->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;

Perform encryption and calculate/verify of the authentication tag in a single-call and return an IV generated by the context.

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, ReadWriteMemRegion ivOut, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;
Finish función

Finalize the en-/decryption and calculate/verify the authentication tag without returning an IV.

FinishEncrypt función

Finalize the encryption and calculate the authentication tag and return the IV generated by the context.

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

Get maximum supported size of associated public data.

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

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

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

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

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

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

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

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

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

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

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

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

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

Get the output tag size.

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

Perform en-/decryption and calculate/verify of the authentication tag in a single-call without setting or returning an IV.

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMemRegion tag, CryptoTransform transformDirection, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call, providing an IV to be used during en-/decryption.

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, CryptoTransform transformDirection, ReadOnlyMemRegion iv, ara::core::Optional< ReadOnlyMemRegion > authenticatedData) noexcept=0;
SetKey función 2

The interface shall configure the context to use the provided SymmetricKey.

Sobrecargas SetKey 2
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_23911
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50072
Start función 2

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

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

Update the tag calculation by a new chunk of additional authenticated data.

virtual ara::core::Result< void > UpdateAuthenticatedData (ReadOnlyMem Region authenticatedData) noexcept=0;

Encrypt or decrypt confidential data. When used for decryption, the plaintext is returned without verifying its authenticity. An application must not use the data before verifying its authenticity using Finish().

virtual ara::core::Result< std::size_t > UpdateConfidentialData (Read OnlyMemRegion in, ReadWriteMemRegion out) 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_50077] 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: 739ac0d710b6 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método Cancel() de la interfaz ara::crypto::cryp::AuthCipherCtx cancela una operación de streaming activa que se inició previamente mediante Start() y aún no ha concluido [SWS_CRYPT_50077]. La función se proporciona a través de la cabecera ara/crypto/cryp/auth_cipher_ctx.h y opera sincrónicamente sin parámetros de entrada [SWS_CRYPT_50077]. Devuelve un ara::core::Result<void>, que está vacío en caso de éxito.

Tratamiento de errores y condiciones límite

Una cancelación presupone que el procesamiento de datos se haya iniciado efectivamente con anterioridad mediante Start(). Si la operación de streaming no se inició, la llamada falla y devuelve el código de error ara::crypto::CryptoErrc::kProcessingNotStarted con semántica de reversión [SWS_CRYPT_50077].

concurrencia

La operación está declarada como noexcept y, según la especificación, está clasificada tanto como thread-safe como exception safe [SWS_CRYPT_50077].

Interacción

El patrón de cancelación implementado por Cancel() está estandarizado en el módulo crypt. Se han definido una semántica de interfaz idéntica y el mismo código de error ara::crypto::CryptoErrc::kProcessingNotStarted para los contextos de streaming correspondientes:

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

Guía del implementador pendiente (complejidad I1)

Header-Datei#include "ara/crypto/cryp/auth_cipher_ctx.h"
Scopeclass ara::crypto::cryp::AuthCipherCtx
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_50077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50077@rel:R25-11#92c0fa68
Content hash
92c0fa68
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50077
Status: valid/unmigrated Version: rel:R25-11#863ca4bd 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_50077@rel:R25-11#863ca4bd
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 EncryptSingleCallWithOutputIv [SWS_CRYPT_50080] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, ReadWriteMemRegion ivOut, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform encryption and calculate/verify of the authentication tag in a single-call and return an IV generated by the context.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 6385ebfbc16d 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 EncryptSingleCallWithOutputIv de la interfaz ara::crypto::cryp::AuthCipherCtx ejecuta un cifrado autenticado en un solo paso y genera de forma autónoma un vector de inicialización [SWS_CRYPT_50080]. Procesa datos de entrada de dataIn así como datos adicionales opcionales authenticatedData y escribe el criptograma en el búfer dataOut. El vector de inicialización generado se almacena en el búfer ivOut, mientras que la etiqueta de autenticación se emite a través de tag [SWS_CRYPT_50080]. El tamaño de búfer para ivOut se puede determinar previamente mediante el método GetOutputIvSize [SWS_CRYPT_50165]. A pesar del componente del nombre Encrypt, es de suponer que el método probablemente también se pueda utilizar para el descifrado, ya que la especificación de errores detalla explícitamente el comportamiento para transformDirection == kDecrypt [SWS_CRYPT_50080]. Pregunta Q-66618567b20f99b9 (abierta)

Para la llamada se aplican condiciones previas y restricciones esenciales:

  • El contexto debe haberse inicializado previamente con éxito mediante SetKey; de lo contrario, se notifica kUninitializedContext [SWS_CRYPT_50080].
  • La clave en el Key-Slot configurado debe ser compatible y presentar el permiso adecuado (p. ej., kAllowDataEncrypt); de lo contrario, se devuelve kUsageViolation o kIncompatibleObject [SWS_CRYPT_50080].
  • Si los búferes de salida dataOut o ivOut no son suficientes, la llamada falla con kInsufficientCapacity [SWS_CRYPT_50080].
  • Si el contexto no soporta el procesamiento en un solo paso o requiere una especificación externa de IV, se devuelve kUnsupported [SWS_CRYPT_50080].

La operación está especificada como thread-safe así como segura frente a excepciones y garantiza semántica de reversión en caso de error [SWS_CRYPT_50080]. Para cifrados simétricos puros sin procesamiento de etiquetas existe un homólogo independiente en SymmetricCipherCtx [SWS_CRYPT_50049].

Este texto fue generado por una IA a partir de la especificación.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data
ivOutan output data buffer that the initialization vector (IV) generated by the context will be written to

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer or authentication tag is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50080
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50080@rel:R25-11#653f834b
Content hash
653f834b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50080
Status: valid/unmigrated Version: rel:R25-11#1fa18617 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_50080@rel:R25-11#1fa18617
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_50075] Upstream: RS_CRYPTO_02302

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

Finalize the en-/decryption and calculate/verify the authentication tag without returning an IV.

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

Uso y semántica

El método Finish finaliza síncronamente el cifrado o descifrado dentro de un ara::crypto::cryp::AuthCipherCtx y calcula o comprueba la etiqueta de autenticación sin devolver un vector de inicialización (IV) [SWS_CRYPT_50075]. El llamador pasa los datos restantes a través del búfer in así como el búfer de destino out. A través del búfer tag se entrega la etiqueta calculada en el cifrado, mientras que en el descifrado se pasa la etiqueta que se va a comprobar [SWS_CRYPT_50075]. El valor de retorno ara::core::Result<std::size_t> cuantifica los bytes realmente escritos en out, que pueden ser menos que la capacidad del búfer de salida [SWS_CRYPT_50075].

Secuencia e interacción

Antes de la llamada, el procesamiento de datos debe haberse iniciado obligatoriamente mediante Start() [SWS_CRYPT_50075]. Si previamente se procesaron bloques de datos mediante UpdateConfidentialData, una aplicación solo debe utilizar el texto en claro resultante en el descifrado tras una autenticación correcta mediante Finish [SWS_CRYPT_50074]. El tamaño de búfer máximo requerido para out se puede determinar previamente mediante GetRequiredOutputBufferSize indicando isFinal = true [SWS_CRYPT_50081].

Tratamiento de errores y concurrencia

El método está especificado como seguro para subprocesos y seguro frente a excepciones [SWS_CRYPT_50075]. Los errores se notifican mediante ara::core::Result con semántica de reversión [SWS_CRYPT_50075]:

  • ProcessingNotStarted: El procesamiento de datos no se inició previamente con Start() [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: El búfer de salida out es demasiado pequeño [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInvalidInputSize: El tamaño de búfer de in o tag no es válido [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: No se puede confirmar la autenticidad de los datos durante el descifrado [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kUnsupported: El procesamiento en flujo no está soportado por el contexto [SWS_CRYPT_50075].

Nota: Esta nota de uso se generó automáticamente sobre la base de los datos de especificación.

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

Parameter (in)

ParameterBeschreibung
inan input data buffer that contains a part of the plaintext/ciphertext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the en-/decrypted data is written to

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag for encryption: an output data buffer that the authentication tag is written to

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif data processing has not been started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer or the authentication tag is invalid
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the processed data cannot be authenticated during decryption
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50075
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50075@rel:R25-11#76059671
Content hash
76059671
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50075
Status: valid/unmigrated Version: rel:R25-11#61f4f343 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_50075@rel:R25-11#61f4f343
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 FinishEncrypt [SWS_CRYPT_50076] Upstream: RS_CRYPTO_02302

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

Finalize the encryption and calculate the authentication tag and return the IV generated by the context.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: fd75aa19665e 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 FinishEncrypt concluye de forma síncrona una operación de cifrado autenticado en ara::crypto::cryp::AuthCipherCtx, calcula la etiqueta de autenticación y devuelve a través de ivOut el vector de inicialización generado por el contexto [SWS_CRYPT_50076]. La llamada está especificada como segura frente a hilos y segura frente a excepciones (exception safe) [SWS_CRYPT_50076]. Como resultado, la función devuelve un ara::core::Result<std::size_t> con el número de bytes realmente escritos en el búfer de salida out, pudiendo ser el tamaño de salida menor que la capacidad del búfer [SWS_CRYPT_50076]. Interpretación: Aunque el nombre apunta a un cifrado, la especificación del parámetro tag así como el código de error ara::crypto::CryptoErrc::kAuthTagNotValid indican que es probable que la firma en el contexto se utilice también simétricamente para operaciones de descifrado. Pregunta Q-6b924f12c32e0f33 (abierta)

Interacción y dimensionamiento del búfer

El procesamiento de datos debe haberse iniciado obligatoriamente de forma previa con Start(); de lo contrario, la función notifica el error ProcessingNotStarted [SWS_CRYPT_50076]. Para el dimensionamiento del búfer debe tenerse en cuenta la interacción con las siguientes funciones del contexto:

  • La capacidad máxima requerida para out puede calcularse de antemano a través de [SWS_CRYPT_50081] con el parámetro isFinal = true a fin de evitar el error ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50076].
  • El tamaño de búfer mínimo y máximo para los datos de entrada in se determina mediante [SWS_CRYPT_50162] y [SWS_CRYPT_50082].
  • El tamaño de búfer necesario para albergar el vector de inicialización generado en ivOut puede consultarse a través de [SWS_CRYPT_50165].

Tratamiento de errores y condiciones límite

En caso de error, todas las respuestas poseen una semántica de reversión definida [SWS_CRYPT_50076]. Si los tamaños de búfer son inválidos para datos de entrada o para la etiqueta de autenticación, se devuelve ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50076]. Además, la función devuelve ara::crypto::CryptoErrc::kUnsupported si no se admite el procesamiento por secuencias, no se utiliza ningún IV o la aplicación ya especificó el IV al inicio [SWS_CRYPT_50076].

Esta nota de uso ha sido generada por una IA y se basa exclusivamente en los datos de la especificación.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer that contains a part of the plaintext/ciphertext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the en-/decrypted data is written to
ivOutan output data buffer that contains the IV

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag for encryption: an output data buffer that the authentication tag is written to

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50076
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50076@rel:R25-11#08a8c5b2
Content hash
08a8c5b2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50076
Status: valid/unmigrated Version: rel:R25-11#7ffd5c95 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_50076@rel:R25-11#7ffd5c95
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 GetMaxAssociatedDataSize [SWS_CRYPT_20103] Upstream: RS_CRYPTO_02309

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

Get maximum supported size of associated public data.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >maximal supported size of associated public data in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20103
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20103@rel:R25-11#aaf07f87
Content hash
aaf07f87
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20103
Status: valid/unmigrated Version: rel:R25-11#7d3e4b66 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_20103@rel:R25-11#7d3e4b66
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#91aa2c602026-09-30
  • R20-11rel:R20-11#91749f732026-10-14
  • R21-11rel:R21-11#c88a3b9a2026-10-14
  • R22-11rel:R22-11#e871a6a52026-10-14
  • R23-11rel:R23-11#84dddf6c2026-10-14
  • R24-11rel:R24-11#c2f0c3512026-10-14
  • R25-11rel:R25-11#7d3e4b662026-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 GetMaximumChunkSize [SWS_CRYPT_50082] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50082
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50082@rel:R25-11#7ca6ccab
Content hash
7ca6ccab
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50082
Status: valid/unmigrated Version: rel:R25-11#f8e55f72 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_50082@rel:R25-11#f8e55f72
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 GetMaximumInputIvSize [SWS_CRYPT_50164] Upstream: RS_CRYPTO_02309

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

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

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

Parameter (in)

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50164
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50164@rel:R25-11#eda5da9f
Content hash
eda5da9f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50164
Status: valid/unmigrated Version: rel:R25-11#1567e5b7 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_50164@rel:R25-11#1567e5b7
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 GetMinimumChunkSize [SWS_CRYPT_50162] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50162
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50162@rel:R25-11#2ec8da58
Content hash
2ec8da58
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50162
Status: valid/unmigrated Version: rel:R25-11#aa502d0a 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_50162@rel:R25-11#aa502d0a
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 GetMinimumInputIvSize [SWS_CRYPT_50163] Upstream: RS_CRYPTO_02309

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

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

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

Parameter (in)

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50163
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50163@rel:R25-11#a2517885
Content hash
a2517885
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50163
Status: valid/unmigrated Version: rel:R25-11#452ee080 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_50163@rel:R25-11#452ee080
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 GetOutputIvSize [SWS_CRYPT_50165] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50165
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50165@rel:R25-11#8e5b887b
Content hash
8e5b887b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50165
Status: valid/unmigrated Version: rel:R25-11#b902740e 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_50165@rel:R25-11#b902740e
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 GetRequiredOutputBufferSize [SWS_CRYPT_50081] Upstream: RS_CRYPTO_02302

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

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

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

Parameter (in)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50081
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50081@rel:R25-11#79f7fe2d
Content hash
79f7fe2d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50081
Status: valid/unmigrated Version: rel:R25-11#6a6a83e1 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_50081@rel:R25-11#6a6a83e1
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 GetTagSize [SWS_CRYPT_50161] Upstream: RS_CRYPTO_02309

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

Get the output tag size.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the authentication tag in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50161
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50161@rel:R25-11#fe00c1a0
Content hash
fe00c1a0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50161
Status: valid/unmigrated Version: rel:R25-11#f81af579 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_50161@rel:R25-11#f81af579
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 ProcessSingleCall [SWS_CRYPT_50078] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMemRegion tag, CryptoTransform transformDirection, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call without setting or returning an IV.

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

El método ProcessSingleCall de ara::crypto::cryp::AuthCipherCtx, síncrono y definido como seguro para subprocesos, ejecuta el cifrado o descifrado de datos útiles y el cálculo o la verificación simultáneos de la etiqueta de autenticación en una sola operación sin vector de inicialización (IV) [SWS_CRYPT_50078]. A través del búfer opcional authenticatedData se pueden proporcionar datos autenticados adicionales [SWS_CRYPT_50078]. El búfer tag sirve como entrada para la verificación en el descifrado y como salida para almacenar la etiqueta de autenticación generada en el cifrado [SWS_CRYPT_50078]. En caso de procesamiento correcto, ara::core::Result<std::size_t> devuelve el número real de bytes escritos en dataOut, que puede ser menor que la capacidad del búfer de destino [SWS_CRYPT_50078].

Antes de la llamada, el contexto criptográfico debe haberse inicializado mediante una llamada exitosa a SetKey; de lo contrario, la función falla con ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50078]. Además, la clave utilizada debe estar habilitada para la dirección de transformación solicitada (kAllowDataEncrypt o kAllowDataDecrypt), ya que de lo contrario se notifica ara::crypto::CryptoErrc::kUsageViolation [SWS_CRYPT_50078]. Si no se admite el procesamiento en un solo paso o si el contexto requiere un IV, la función devuelve ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50078]. Si la autenticación falla durante el descifrado, se desencadena ara::crypto::CryptoErrc::kAuthTagNotValid [SWS_CRYPT_50078]. Los errores en la ranura de clave asignada se señalan mediante EmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource o ara::crypto::CryptoErrc::kIncompatibleObject [SWS_CRYPT_50078].

Para la gestión de búferes, el tamaño de salida máximo requerido para dataOut puede calcularse previamente mediante GetRequiredOutputBufferSize con el flag isFinal = true establecido [SWS_CRYPT_50081]; un búfer de salida demasiado pequeño da lugar a ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50078]. Adicionalmente, el tamaño de dataIn debe corresponder a los límites de GetMinimumChunkSize [SWS_CRYPT_50162] y GetMaximumChunkSize [SWS_CRYPT_50082] para evitar ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50078].

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

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
transformDirectionthe transformation direction, i.e., encryption or decryption
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting or returning an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer or authentication tag is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50078
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50078@rel:R25-11#b41a1f34
Content hash
b41a1f34
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50078
Status: valid/unmigrated Version: rel:R25-11#e0ad5fae 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_50078@rel:R25-11#e0ad5fae
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 ProcessSingleCallWithInputIv [SWS_CRYPT_50079] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, CryptoTransform transformDirection, ReadOnlyMemRegion iv, ara::core::Optional< ReadOnlyMemRegion > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call, providing an IV to be used during en-/decryption.

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

El método [SWS_CRYPT_50079] de la clase ara::crypto::cryp::AuthCipherCtx lleva a cabo un procesamiento síncrono en un solo paso (single-call) para el cifrado o descifrado de datos con el cálculo o la comprobación simultáneos de la etiqueta de autenticación.

En la llamada, los datos de entrada se especifican mediante dataIn y la dirección mediante transformDirection. El vector de inicialización se pasa a través de iv, y se pueden proporcionar datos de autenticación opcionales mediante authenticatedData [SWS_CRYPT_50079]. El búfer tag sirve en el caso de cifrado como salida para la etiqueta calculada y en el caso de descifrado como entrada para la verificación [SWS_CRYPT_50079]. En caso de éxito, el valor de retorno ara::core::Result<std::size_t> proporciona el número de bytes escritos en dataOut, que puede ser menor que la capacidad del búfer [SWS_CRYPT_50079].

En caso de error, todos los códigos de error poseen semántica de reversión [SWS_CRYPT_50079]:

  • ara::crypto::CryptoErrc::kUninitializedContext: No se configuró previamente ninguna clave mediante SetKey [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUsageViolation: La clave no posee el permiso requerido kAllowDataEncrypt o kAllowDataDecrypt [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kEmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource o ara::crypto::CryptoErrc::kIncompatibleObject: Un KeySlot configurado está vacío, ocupado o no contiene un SymmetricKey compatible [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kInvalidInputSize o ara::crypto::CryptoErrc::kInsufficientCapacity: Los búferes para entrada, etiqueta o IV están dimensionados de forma no válida o dataOut ofrece una capacidad insuficiente [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: En el descifrado falla la autenticación [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUnsupported: El procesamiento de disparo único (single-shot) no está soportado por el contexto o el contexto requiere establecer o emitir un IV [SWS_CRYPT_50079].

La operación está definida como thread-safe y exception safe [SWS_CRYPT_50079]. Las longitudes admisibles para iv se pueden consultar dinámicamente mediante GetMinimumInputIvSize [SWS_CRYPT_50163] y GetMaximumInputIvSize [SWS_CRYPT_50164]. En comparación con el cifrado por bloques puro en SymmetricCipherCtx [SWS_CRYPT_50048], esta interfaz vincula la transformación criptográfica y la comprobación de integridad en una sola llamada.

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

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan Initialization Vector (IV) or "nonce" value
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting or returning an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer, authentication tag, or IV is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50079
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50079@rel:R25-11#caa444c3
Content hash
caa444c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50079
Status: valid/unmigrated Version: rel:R25-11#971c6b5c 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_50079@rel:R25-11#971c6b5c
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_23911] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

The interface shall configure the context to use the provided SymmetricKey.

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

El método SetKey configura la instancia de ara::crypto::cryp::AuthCipherCtx para el uso de una clave simétrica pasada [SWS_CRYPT_23911]. Como parámetro se pasa un puntero compartido key (de tipo SymmetricKey::Sptr), que se utiliza para el cifrado o descifrado autenticado [SWS_CRYPT_23911]. La llamada se realiza de forma síncrona, está declarada como noexcept y devuelve un ara::core::Result<void> [SWS_CRYPT_23911].

En caso de error, el resultado se restablece con semántica de rollback y proporciona códigos de error específicos [SWS_CRYPT_23911]:

  • ara::crypto::CryptoErrc::kUnsupported: en caso de que el contexto admita exclusivamente la configuración mediante un KeySlot [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kIncompatibleObject: cuando el tipo de clave pasado no es compatible con el contexto actual [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kUsageViolation: cuando los flags de uso permitidos de la clave no contienen kAllowDataEncrypt para cifrado o kAllowDataDecrypt para descifrado [SWS_CRYPT_23911].

Según la especificación, la interfaz está clasificada como segura para subprocesos (thread-safe) y segura frente a excepciones (exception safe) [SWS_CRYPT_23911]. En interacción con el contexto del módulo, es de suponer que la clave se establezca antes de la inicialización de una nueva transformación a través de Start [SWS_CRYPT_24715]. Pregunta Q-11f7daa370f5d438 (abierta)

Esta nota de uso se generó automáticamente a partir del payload de AUTOSAR.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
keysymmetric key object used for authenticated en-/decryption

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 SymmetricKey is incompatible with this AuthCipher Ctx
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the provided SymmetricKey does not include kAllowDataEncrypt for encryption, or kAllowDataDecrypt for decryption, respectively

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23911
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23911@rel:R25-11#91c5d9a6
Content hash
91c5d9a6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23911
Status: valid/unmigrated Version: rel:R25-11#205c09dd 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_23911@rel:R25-11#205c09dd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7fa81c372026-09-30
  • R19-11rel:R19-11#fcb0604e2026-10-14
  • R20-11rel:R20-11#43c209ac2026-10-14
  • R21-11rel:R21-11#9babec8c2026-10-14
  • R22-11rel:R22-11#a5a2e9812026-10-14
  • R23-11rel:R23-11#1982ebed2026-10-14
  • R24-11rel:R24-11#3524b4832026-10-14
  • R25-11rel:R25-11#205c09dd2026-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_50072] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

The interface shall configure the context to use the key stored in the provided KeySlot when the authenticated encrypt or decrypt operation is executed.

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

La función SetKey en la interfaz ara::crypto::cryp::AuthCipherCtx configura el contexto para operaciones criptográficas de modo que se utilice la clave simétrica almacenada en un key slot proporcionado tan pronto como se ejecute el cifrado o descifrado autenticado [SWS_CRYPT_50072].

Uso: La llamada síncrona se realiza a través de la interfaz de ara/crypto/cryp/auth_cipher_ctx.h. Como parámetro keySlot se pasa una instancia de KeySlot::Sptr que encapsula una clave simétrica [SWS_CRYPT_50072]. La función devuelve un ara::core::Result<void> que confirma el éxito o contiene un código de error [SWS_CRYPT_50072].

Tratamiento de errores: Si la implementación concreta del contexto solo admite la configuración directa mediante un objeto SymmetricKey y no ofrece el establecimiento a través de KeySlot, la llamada fallará. En este caso se devuelve el error ara::crypto::CryptoErrc::kUnsupported con semántica de reversión [SWS_CRYPT_50072].

Concurrencia y restricciones: La función está especificada como thread-safe y exception safe [SWS_CRYPT_50072]. Puede llamarse de forma concurrente y asegura que, en situaciones de excepción, no permanezca ningún estado inconsistente.

Interacción: Como alternativa funcional está disponible la sobrecarga SetKey con un SymmetricKey::Sptr directo [SWS_CRYPT_23911]. Una vez efectuada la vinculación de clave, el contexto se inicializa a través de Start con la dirección de la operación así como el vector de inicialización [SWS_CRYPT_24715]. Existen asimismo firmas análogas con KeySlot::Sptr en MessageAuthnCodeCtx [SWS_CRYPT_50026] y SymmetricKeyWrapperCtx [SWS_CRYPT_50034].

Este texto ha sido generado por una IA y se basa en la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad I2)

Header-Datei#include "ara/crypto/cryp/auth_cipher_ctx.h"
Scopeclass ara::crypto::cryp::AuthCipherCtx
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::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_50072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50072@rel:R25-11#e7dc5051
Content hash
e7dc5051
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50072
Status: valid/unmigrated Version: rel:R25-11#3dd5795a 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_50072@rel:R25-11#3dd5795a
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_24715] Upstream: RS_CRYPTO_02302

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

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

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

El método Start inicializa el contexto ara::crypto::cryp::AuthCipherCtx para un nuevo cifrado o descifrado y establece el vector de inicialización (IV) o valor nonce que se va a utilizar [SWS_CRYPT_24715]. Mediante el parámetro transformDirection se define la dirección de transformación, mientras que iv pasa el vector como ReadOnlyMemRegion [SWS_CRYPT_24715]. El tamaño de IV admisible se puede determinar a través de GetMinimumInputIvSize() y GetMaximumInputIvSize(); en caso de longitud divergente, la función notifica el error ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_24715].

Antes de la llamada, SetKey debe haberse ejecutado con éxito; de lo contrario, se devuelve ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_24715]. Un KeySlot configurado no debe estar ni vacío (EmptyKeySlot) ni ocupado (ara::crypto::CryptoErrc::kBusyResource) [SWS_CRYPT_24715]. Además, la clave almacenada debe ser un SymmetricKey adecuado (de lo contrario, ara::crypto::CryptoErrc::kIncompatibleObject) y estar autorizada para la dirección deseada (kAllowDataEncrypt o kAllowDataDecrypt; de lo contrario, ara::crypto::CryptoErrc::kUsageViolation) [SWS_CRYPT_24715]. Si falta la compatibilidad con el procesamiento en flujo (stream) o con el establecimiento de un IV en la dirección seleccionada, la llamada falla con ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_24715]. Todos los errores presentan semántica de rollback [SWS_CRYPT_24715].

La operación está declarada como thread-safe y exception-safe (noexcept) [SWS_CRYPT_24715]. En la interacción de secuencias criptográficas, tras una inicialización exitosa típicamente seguiría la transferencia de datos autenticados adicionales a través de UpdateAuthenticatedData [SWS_CRYPT_20313]. Pregunta Q-e023e27f1cd24507 (abierta)

Esta nota de uso se creó de forma automatizada a partir de la versión R25-11 de AUTOSAR.

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support setting an IV in the given transform Direction
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the configured KeySlot is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided IV is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_24715
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24715@rel:R25-11#958535b9
Content hash
958535b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24715
Status: valid/unmigrated Version: rel:R25-11#dacbb482 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_24715@rel:R25-11#dacbb482
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#85d3f6962026-09-30
  • R19-11rel:R19-11#ea0e49642026-10-14
  • R20-11rel:R20-11#e9fc84162026-10-14
  • R21-11rel:R21-11#a59d78ec2026-10-14
  • R22-11rel:R22-11#dca7e5782026-10-14
  • R23-11rel:R23-11#640bb79c2026-10-14
  • R24-11rel:R24-11#f389a1072026-10-14
  • R25-11rel:R25-11#dacbb4822026-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_50073] Upstream: RS_CRYPTO_02302

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

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

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

usar

El método puramente virtual Start de la clase ara::crypto::cryp::AuthCipherCtx inicializa el contexto de forma síncrona para un cifrado o descifrado pendiente [SWS_CRYPT_50073]. Mediante el parámetro transformDirection se indica si el contexto se prepara para cifrado o descifrado. Esta sobrecarga sin vector de inicialización (IV) solo puede utilizarse si el contexto criptográfico no requiere un IV en la dirección de transformación seleccionada o si lo determina él mismo [SWS_CRYPT_50073]. El valor de retorno es un ara::core::Result<void> vacío en caso de éxito o un código de error correspondiente.

Tratamiento de errores y precondiciones

Antes de la llamada, el contexto debe haberse configurado correctamente a través de SetKey con una clave; de lo contrario, la función fallará con ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50073]. Además, en caso de error se producen los siguientes valores de retorno:

  • ara::crypto::CryptoErrc::kUnsupported, si el contexto no admite el procesamiento por secuencias (stream) o si el contexto exige obligatoriamente la indicación explícita de un IV en la dirección de transformación seleccionada [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kUsageViolation, si el uso permitido de la clave en el KeySlot configurado en el momento de la llamada no incluye el permiso necesario kAllowDataEncrypt para el cifrado o bien kAllowDataDecrypt para el descifrado [SWS_CRYPT_50073].
  • EmptyKeySlot o bien ara::crypto::CryptoErrc::kBusyResource, en caso de que un KeySlot configurado esté actualmente vacío o bloqueado [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kIncompatibleObject, si el KeySlot configurado no contiene ningún SymmetricKey o si este tipo de clave no es compatible con el contexto [SWS_CRYPT_50073].

Si se produce un error, se aplica la semántica de reversión especificada (rollback_semantics) [SWS_CRYPT_50073].

Concurrencia e interacción

La función está declarada con noexcept=0, garantiza la seguridad frente a excepciones y está diseñada de forma segura frente a hilos [SWS_CRYPT_50073]. Si el algoritmo exige la provisión externa de un vector de inicialización, debe utilizarse en su lugar la sobrecarga Start(CryptoTransform, ReadOnlyMemRegion) [SWS_CRYPT_24715]. Tras una inicialización correcta, pueden incorporarse datos autenticados adicionales a través de UpdateAuthenticatedData en el cálculo de la etiqueta de autenticación [SWS_CRYPT_20313].

Esta indicación de uso se generó automáticamente a partir de la especificación AUTOSAR Adaptive R25-11.

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV in the given transformDirection
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50073
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50073@rel:R25-11#4aa0cd06
Content hash
4aa0cd06
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50073
Status: valid/unmigrated Version: rel:R25-11#24eaa91a 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_50073@rel:R25-11#24eaa91a
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 UpdateAuthenticatedData [SWS_CRYPT_20313] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > UpdateAuthenticatedData (ReadOnlyMem Region authenticatedData) noexcept=0;

Update the tag calculation by a new chunk of additional authenticated data.

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

El método UpdateAuthenticatedData de la interfaz ara::crypto::cryp::AuthCipherCtx sirve para actualizar el cálculo de la etiqueta de autenticación paso a paso con un fragmento adicional de datos autenticados adicionales (Additional Authenticated Data) [SWS_CRYPT_20313]. A través del parámetro authenticatedData se transmite el búfer correspondiente como ReadOnlyMemRegion [SWS_CRYPT_20313].

En cuanto al contexto de llamada y la concurrencia, la operación está definida como thread-safe, así como exception safe [SWS_CRYPT_20313]. Para la llamada rigen condiciones estrictas de orden:

  • La transformación debe haberse iniciado previamente a través del método Start(); de lo contrario, se notifica ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_20313].
  • La función ya no debe llamarse si UpdateConfidentialData ya se ha ejecutado; en caso de incumplimiento, se devuelve el error ara::crypto::CryptoErrc::kInvalidUsageOrder [SWS_CRYPT_20313].

Como valor de retorno, la función proporciona un ara::core::Result<void> que está vacío en caso de éxito o encapsula un código de error producido [SWS_CRYPT_20313]. Todos los errores presentan semántica de reversión (rollback) [SWS_CRYPT_20313]:

  • ara::crypto::CryptoErrc::kInvalidInputSize: el tamaño del búfer de entrada transmitido no es válido [SWS_CRYPT_20313].
  • ara::crypto::CryptoErrc::kUnsupported: el procesamiento de flujo (stream) no es admitido por el contexto actual [SWS_CRYPT_20313].

Este texto fue generado por una IA y sirve como guía orientativa. El texto vinculante es la especificación AUTOSAR.

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

ParameterBeschreibung
authenticatedDataa part of the additional authenticated data

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the processing was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidUsageOrderrollback_semantics if UpdateConfidentialData has already been called
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20313
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20313@rel:R25-11#5af0296d
Content hash
5af0296d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20313
Status: valid/unmigrated Version: rel:R25-11#fcb70f91 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_20313@rel:R25-11#fcb70f91
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e6b736912026-09-30
  • R19-11rel:R19-11#f75b41ea2026-10-14
  • R20-11rel:R20-11#4c46c8f42026-10-14
  • R21-11rel:R21-11#50979c0c2026-10-14
  • R22-11rel:R22-11#f4a00d3a2026-10-14
  • R23-11rel:R23-11#a528f60f2026-10-14
  • R24-11rel:R24-11#7dfc69482026-10-14
  • R25-11rel:R25-11#fcb70f912026-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 UpdateConfidentialData [SWS_CRYPT_50074] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > UpdateConfidentialData (Read OnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt or decrypt confidential data. When used for decryption, the plaintext is returned without verifying its authenticity. An application must not use the data before verifying its authenticity using Finish().

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

El método UpdateConfidentialData de la clase ara::crypto::cryp::AuthCipherCtx sirve para el cifrado o descifrado paso a paso de datos útiles confidenciales en el marco de un contexto de cifrado autenticado [SWS_CRYPT_50074]. Se le pasan el búfer de entrada in (tipo ReadOnlyMemRegion) con una parte del texto en claro o cifrado, así como el búfer de salida out (tipo ReadWriteMemRegion) [SWS_CRYPT_50074]. Como valor de retorno síncrono, la función devuelve un ara::core::Result<std::size_t>, el cual contiene en caso de éxito el número de bytes realmente escritos; este puede ser inferior a la capacidad de out [SWS_CRYPT_50074].

En lo que respecta a la secuencia y a la concurrencia, se aplican las siguientes condiciones:

  • Secuencia de ejecución e integridad: antes del procesamiento, el proceso debe haberse iniciado mediante Start() [SWS_CRYPT_50074]. Si el método se utiliza para el descifrado, el texto en claro se emite sin comprobación previa de autenticidad; la aplicación no debe utilizar en ningún caso estos datos antes de la verificación final mediante Finish() [SWS_CRYPT_50074]. Se pueden incorporar datos autenticados adicionales de forma paralela en el cálculo de la etiqueta a través de UpdateAuthenticatedData [SWS_CRYPT_20313].
  • Seguridad de subprocesos y frente a excepciones: la operación está declarada como thread-safe y exception-safe, y no lanza excepciones (noexcept) [SWS_CRYPT_50074].

Si el procesamiento falla, se aplica la semántica de reversión devolviendo un código de error correspondiente en ara::core::Result [SWS_CRYPT_50074]:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: El procesamiento todavía no se ha iniciado mediante Start() [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: El búfer de salida out tiene unas dimensiones demasiado pequeñas [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInvalidInputSize: El tamaño del búfer in no es válido [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kUnsupported: El procesamiento de flujo no es compatible con el contexto [SWS_CRYPT_50074].

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

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50074
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50074@rel:R25-11#8668aaa2
Content hash
8668aaa2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50074
Status: valid/unmigrated Version: rel:R25-11#342cdc85 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_50074@rel:R25-11#342cdc85
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_20101] Upstream: RS_CRYPTO_02207

using Sptr = std::shared_ptr<AuthCipherCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/auth_cipher_ctx.h"
Scopeclass ara::crypto::cryp::AuthCipherCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20101@rel:R25-11#2ecde319
Content hash
2ecde319
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20101
Status: valid/unmigrated Version: rel:R25-11#56d76308 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_20101@rel:R25-11#56d76308
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6cded4ce2026-09-30
  • R19-11rel:R19-11#d499b7852026-10-14
  • R20-11rel:R20-11#38ae99fd2026-10-14
  • R21-11rel:R21-11#15df77a52026-10-14
  • R22-11rel:R22-11#22ad2b2d2026-10-14
  • R23-11rel:R23-11#d20afa502026-10-14
  • R24-11rel:R24-11#d20afa502026-10-14
  • R25-11rel:R25-11#56d763082026-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