DEENESPTFRRUARHIKOZHNL

clase ara::crypto::cryp::SymmetricCipherCtx

[SWS_CRYPT_50136] Upstream: RS_CRYPTO_02201

class SymmetricCipherCtx :           public CryptoContext {...};

Interface for Symmetric Cipher Operations.

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

Guía del usuarioGENERADO POR IA

Sirve como interfaz para operaciones de cifrado y descifrado simétricos en flujos de datos o llamadas únicas.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 0261b663ca0d Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Sirve como interfaz para operaciones de cifrado y descifrado simétricos en flujos de datos o llamadas únicas.

La clase ara::crypto::cryp::SymmetricCipherCtx sirve como interfaz segura para hilos para operaciones de cifrado y descifrado simétricos en AUTOSAR Adaptive [SWS_CRYPT_50044]. Tras la configuración de una clave mediante SetKey(), los datos pueden procesarse bien en una sola llamada o bien paso a paso en un ciclo de streaming compuesto por Start(), Update() y Finish() [SWS_CRYPT_50138], [SWS_CRYPT_50139]. Todos los métodos están especificados como noexcept y señalan errores como la falta de inicialización o búferes demasiado pequeños mediante ara::core::Result [SWS_CRYPT_50140].

Contexto

La interfaz ara::crypto::cryp::SymmetricCipherCtx encapsula transformaciones criptográficas simétricas, que abarcan tanto operaciones de cifrado como de descifrado. Dentro de la arquitectura criptográfica, la clase actúa como contexto de ejecución para algoritmos simétricos y coopera con objetos de clave así como con búferes de memoria. Para la configuración de la clave criptográfica, la clase interactúa bien directamente con claves volátiles mediante SymmetricKey [SWS_CRYPT_50138] o bien con claves gestionadas de forma persistente o aislada mediante KeySlot [SWS_CRYPT_50043]. Los textos claros y cifrados que se van a procesar, así como los vectores de inicialización (IV), se transfieren y reciben a través de áreas de memoria del tipo ReadOnlyMemRegion y ReadWriteMemRegion [SWS_CRYPT_50048], [SWS_CRYPT_50049].

Ciclo de vida

El ciclo de vida y las relaciones de propiedad de la interfaz se controlan principalmente a través del alias de puntero inteligente tipado Sptr (std::shared_ptr<SymmetricCipherCtx>) [SWS_CRYPT_50137]. En la práctica, es probable que la provisión de una instancia concreta se realice a través de un método de fábrica criptográfica superior (interpretación), ya que la propia definición de la interfaz no designa funciones de creación. Pregunta Q-5b5f5ffdf964c91f (abierta)

Tras la instanciación, el contexto pasa por varias fases operativas:

  • No inicializado: inmediatamente después de la instanciación, el contexto no tiene asignada ninguna clave. Cualquier invocación de procesamiento en esta fase provoca el error CryptoErrc::kUninitializedContext [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • Inicializado / clave vinculada: mediante la invocación de SetKey() con un SymmetricKey [SWS_CRYPT_50138] o KeySlot [SWS_CRYPT_50043], el contexto queda listo para su uso. A partir de este estado se pueden ejecutar operaciones sin estado de llamada única (single-call) o iniciar un proceso de streaming con estado.
  • Procesamiento en streaming: una invocación de Start() inicia una transformación paso a paso [SWS_CRYPT_50044], [SWS_CRYPT_23625]. En esta fase se pueden transformar datos mediante Update() [SWS_CRYPT_50139] y modificar la posición mediante Seek() [SWS_CRYPT_23613]. El estado de streaming se finaliza de forma regular mediante Finish() [SWS_CRYPT_50045] o FinishEncrypt() [SWS_CRYPT_23618], o bien se descarta de forma anticipada mediante Cancel() [SWS_CRYPT_50046]. Después, el contexto regresa al estado básico inicializado.

Todos los métodos de SymmetricCipherCtx están declarados como noexcept, garantizan la seguridad frente a excepciones («exception safe») y están especificados como seguros para hilos («thread-safe») para el acceso concurrente [SWS_CRYPT_50044], [SWS_CRYPT_50139].

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

Diagrama de estados: ciclo de vida y transiciones de estado del contexto de cifrado simétrico. Fuentes: [SWS_CRYPT_50138], [SWS_CRYPT_50044], [SWS_CRYPT_50139], [SWS_CRYPT_50045], [SWS_CRYPT_50046]

Ruta de uso

Antes de la transformación de datos propiamente dicha, se recomienda determinar los tamaños de búfer y de fragmento (chunk) requeridos. Mediante GetMinimumChunkSize() [SWS_CRYPT_50144] y GetMaximumChunkSize() [SWS_CRYPT_50050] se pueden determinar los límites admisibles para bloques de entrada. Si se requieren vectores de inicialización, sus límites de longitud pueden consultarse mediante GetMinimumInputIvSize() [SWS_CRYPT_50141], GetMaximumInputIvSize() [SWS_CRYPT_50142] o GetOutputIvSize() [SWS_CRYPT_50143]. El tamaño de búfer de destino máximo necesario para una operación se calcula mediante GetRequiredOutputBufferSize() [SWS_CRYPT_50140].

Para el cifrado o descifrado paso a paso en flujo se aplica el siguiente procedimiento estándar:

  1. Configurar clave: vinculación de la clave criptográfica al contexto mediante SetKey() [SWS_CRYPT_50138].
  2. Iniciar transformación: invocación de Start() especificando la dirección de transformación (cifrado o descifrado) y un IV opcional [SWS_CRYPT_23625] o bien sin IV [SWS_CRYPT_50044].
  3. Transformar bloques de datos: invocación reiterada de Update() para la transferencia paso a paso de datos de entrada y la obtención de datos de salida [SWS_CRYPT_50139]. En caso necesario, se puede navegar dentro del flujo de datos mediante Seek() [SWS_CRYPT_23613].
  4. Conclusión: finalización mediante Finish() [SWS_CRYPT_50045] o mediante FinishEncrypt(), en caso de que deba devolverse el IV generado por el contexto [SWS_CRYPT_23618].

Como alternativa a este patrón de streaming, la interfaz admite llamadas únicas síncronas. Si se dispone de toda la carga útil, la operación puede ejecutarse directamente mediante ProcessSingleCall() [SWS_CRYPT_50047], ProcessSingleCallWithInputIv() [SWS_CRYPT_50048] o, para la generación de IV propia del contexto, mediante EncryptSingleCallWithOutputIv() [SWS_CRYPT_50049].

Cifrado simétrico de flujo de datosAplicaciónSymmetricCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>loopMientras haya bloques disponiblesUpdate(in, out)Result<size_t>FinishEncrypt(in, out, ivOut)Result<size_t>

Diagrama de secuencia: secuencia típica de invocación de un cifrado en streaming. Fuentes: [SWS_CRYPT_50138], [SWS_CRYPT_23625], [SWS_CRYPT_50139], [SWS_CRYPT_23618]

Escenarios de error

Los métodos de la clase señalan errores mediante ara::core::Result con códigos del dominio de errores ara::crypto::CryptoErrc. Las condiciones de error esenciales incluyen:

  • CryptoErrc::kUninitializedContext: ocurre cuando se invocan llamadas de procesamiento como Start() [SWS_CRYPT_50044], rutinas de llamada única [SWS_CRYPT_50047] o GetRequiredOutputBufferSize() [SWS_CRYPT_50140] antes de haber configurado una clave mediante SetKey().
  • CryptoErrc::kProcessingNotStarted: se desencadena cuando se ejecutan funciones de streaming como Update() [SWS_CRYPT_50139], Finish() [SWS_CRYPT_50045], FinishEncrypt() [SWS_CRYPT_23618], Seek() [SWS_CRYPT_23613] o Cancel() [SWS_CRYPT_50046] sin una invocación previa y exitosa de Start().
  • CryptoErrc::kInsufficientCapacity: el búfer de destino proporcionado para datos o IV es menor que la capacidad mínima requerida [SWS_CRYPT_50139], [SWS_CRYPT_50049].
  • CryptoErrc::kUsageViolation y CryptoErrc::kIncompatibleObject: el tipo de clave transferido es inadecuado para la transformación o las reglas de uso almacenadas en la clave prohíben la operación (p. ej., falta de kAllowDataEncryption o kAllowDataDecryption) [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • CryptoErrc::kEmptyKeySlot y CryptoErrc::kBusyResource: indica que un KeySlot configurado no contiene ninguna clave en tiempo de ejecución o que un recurso requerido para la operación criptográfica está bloqueado [SWS_CRYPT_50048], [SWS_CRYPT_50049].
  • CryptoErrc::kUnsupported: se devuelve cuando un modo de funcionamiento (como procesamiento en flujo, llamada única o Seek()) no está soportado por el contexto o algoritmo seleccionado [SWS_CRYPT_23613], [SWS_CRYPT_50047].

Esta guía fue elaborada por un asistente de IA en base a las prescripciones de especificación.

Mapa de miembros

Diagrama de clases

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

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

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 in a single-call and return an IV generated by the context.

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

Finalize the encryption/decryption without returning an IV.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Sobrecargas SetKey 2
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50043
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_50138
Start 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_23625
virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0; SWS_CRYPT_50044
Update función

Encrypt or decrypt a data buffer.

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion 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_50046] Upstream: RS_CRYPTO_02302

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

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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 0bea3f0e1d0d 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 Cancel() de la clase ara::crypto::cryp::SymmetricCipherCtx sirve para la cancelación anticipada de una operación de streaming en curso que fue iniciada previamente con Start() y aún no ha finalizado [SWS_CRYPT_50046]. La interfaz está declarada sin parámetros en ara/crypto/cryp/symmetric_cipher_ctx.h y devuelve un ara::core::Result<void> vacío en caso de ejecución correcta [SWS_CRYPT_50046].

Si el procesamiento de datos no se inició previamente mediante la llamada a Start(), la operación falla con el código de error específico ara::crypto::CryptoErrc::kProcessingNotStarted y semántica de reversión (rollback) [SWS_CRYPT_50046]. Para el contexto de llamada, la especificación garantiza seguridad para hilos (thread-safe), así como seguridad frente a excepciones (exception safe) con declaración noexcept [SWS_CRYPT_50046]. Interpretación: debido a la semántica de reversión, es probable que tras una cancelación el objeto vuelva a un estado inicial preparado. Pregunta Q-b6deb8db5367acc5 (abierta)

Este patrón funcional está definido de manera coherente en todos los contextos criptográficos de streaming en AUTOSAR Adaptive. Se aplican firmas y semánticas de error idénticas para las clases de contexto VerifierPublicCtx ([SWS_CRYPT_50023]), MessageAuthnCodeCtx ([SWS_CRYPT_50027]), SignerPrivateCtx ([SWS_CRYPT_50041]), HashFunctionCtx ([SWS_CRYPT_50058]), DecryptorPrivateCtx ([SWS_CRYPT_50069]), AuthCipherCtx ([SWS_CRYPT_50077]) y EncryptorPublicCtx ([SWS_CRYPT_50089]).

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

Guía del implementador pendiente (complejidad I1)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50046@rel:R25-11#ad39f0ad
Content hash
ad39f0ad
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50046
Status: valid/unmigrated Version: rel:R25-11#f0ef0c54 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50046@rel:R25-11#f0ef0c54
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función EncryptSingleCallWithOutputIv [SWS_CRYPT_50049] Upstream: RS_CRYPTO_02302

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

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

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

Uso y gestión de búferes

El método síncrono EncryptSingleCallWithOutputIv realiza un cifrado simétrico en una sola llamada y devuelve el vector de inicialización generado por el contexto a través del búfer ivOut [SWS_CRYPT_50049]. Los datos de entrada se pasan a través de in, mientras que out recibe los datos cifrados [SWS_CRYPT_50049]. En caso de ejecución correcta, el resultado ara::core::Result<std::size_t> proporciona el tamaño real de los datos de salida generados, el cual puede ser menor que la capacidad total de out [SWS_CRYPT_50049]. Si el algoritmo seleccionado no requiere un vector de inicialización, no se escriben datos en ivOut [SWS_CRYPT_50049].

Interacción y condiciones previas

Antes de la llamada, el contexto debe inicializarse mediante una clave adecuada [SWS_CRYPT_50049]. Para garantizar una capacidad suficiente del búfer ivOut, la longitud de IV requerida se puede determinar previamente mediante GetOutputIvSize() [SWS_CRYPT_50143]. Si adicionalmente se requiere una autenticación con cálculo de etiqueta, ara::crypto::cryp::AuthCipherCtx ofrece la contraparte correspondiente [SWS_CRYPT_50080].

Tratamiento de errores y concurrencia

La interfaz está especificada como segura para subprocesos (thread-safe) y segura frente a excepciones («exception safe»), y aplica una semántica de reversión en caso de errores [SWS_CRYPT_50049]. Interpretación: Es de esperar que esta semántica de reversión asegure que, ante la aparición de errores, el estado del contexto permanezca intacto y no queden datos incompletos en el búfer como válidos. Pregunta Q-841087731518d866 (abierta) Entre los errores relevantes se incluyen:

  • UninitializedContext: Todavía no se ha asignado ninguna clave al contexto [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: La capacidad de out o ivOut es insuficiente [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUnsupported: El cifrado mediante llamada única no está soportado o el algoritmo fuerza la especificación de un IV de entrada [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUsageViolation o ara::crypto::CryptoErrc::kIncompatibleObject: El tipo de clave no coincide con la transformación o el uso de la clave no permite el cifrado de datos [SWS_CRYPT_50049].

Esta nota de uso fue generada por una IA basándose en las especificaciones de AUTOSAR Adaptive.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext

Parameter (out)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call encryption is not supported, or if the algorithm requires providing an input IV
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption for encryption
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction (encrypt)

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50049
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50049@rel:R25-11#079d9c83
Content hash
079d9c83
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50049
Status: valid/unmigrated Version: rel:R25-11#f2ba22b4 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50049@rel:R25-11#f2ba22b4
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función Finish [SWS_CRYPT_50045] Upstream: RS_CRYPTO_02302

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

Finalize the encryption/decryption without returning an IV.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 041cbaba2731 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 sincrónico Finish finaliza un cifrado o descifrado simétrico dentro de ara::crypto::cryp::SymmetricCipherCtx sin devolver un vector de inicialización ([SWS_CRYPT_50045]). Procesa el último fragmento de datos del búfer de entrada in (ReadOnlyMemRegion) y escribe los datos resultantes en el búfer de salida out (ReadWriteMemRegion) ([SWS_CRYPT_50045]). El tamaño de búfer necesario para ello puede consultarse previamente a través de GetRequiredOutputBufferSize() ([SWS_CRYPT_50045]). El valor de retorno de tipo ara::core::Result<std::size_t> proporciona, en caso de éxito, el número exacto de bytes escritos, que puede ser menor que la capacidad total de out ([SWS_CRYPT_50045]).

Manejo de errores

En caso de error, el método devuelve un ara::core::Result con códigos de error específicos ([SWS_CRYPT_50045]):

  • ProcessingNotStarted: el procesamiento de datos no se inició previamente mediante Start() ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInsufficientCapacity: el búfer de salida out es demasiado pequeño ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: el tamaño de los datos de entrada no se puede procesar ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidArgument: los datos de entrada pasados no son válidos ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kUnsupported: el contexto actual no admite el procesamiento por secuencias (stream) ([SWS_CRYPT_50045]).

Si se produce uno de los errores CryptoErrc, se aplica una semántica de reversión ([SWS_CRYPT_50045]).

Concurrencia e interacción

La operación está definida como thread-safe y exception safe ([SWS_CRYPT_50045]). Antes de la llamada, la transformación debe haberse iniciado obligatoriamente mediante Start() ([SWS_CRYPT_50045]). El tamaño de entrada máximo permitido para llamadas individuales a Finish() puede determinarse a través de GetMaximumChunkSize() ([SWS_CRYPT_50050]). Tras la finalización, la ejecución de la transformación presumiblemente habrá concluido y probablemente se requerirá una nueva llamada a Start() para operaciones posteriores. Pregunta Q-c4ffc8028e8f522b (abierta)

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

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

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50045
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50045@rel:R25-11#7202725e
Content hash
7202725e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50045
Status: valid/unmigrated Version: rel:R25-11#b9951f15 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50045@rel:R25-11#b9951f15
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función FinishEncrypt [SWS_CRYPT_23618] Upstream: RS_CRYPTO_02302

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

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

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

El método FinishEncrypt finaliza una operación de cifrado y devuelve el vector de inicialización (IV) generado por el contexto [SWS_CRYPT_23618]. Procesa el búfer de datos de entrada final in y escribe los datos resultantes en el búfer de salida out, así como el IV en ivOut. Como valor de retorno, proporciona un ara::core::Result<std::size_t> con el tamaño real de los datos de salida escritos, el cual puede ser menor que la capacidad de out [SWS_CRYPT_23618].

Para una ejecución sin errores, las dimensiones de los búferes y el estado del contexto deben coordinarse previamente:

  • El tamaño de búfer requerido para out se puede determinar mediante [SWS_CRYPT_50140] con el parámetro isFinal = true establecido. Si out se dimensiona demasiado pequeño, la llamada falla con CryptoErrc::kInsufficientCapacity [SWS_CRYPT_23618].
  • El tamaño esperado para ivOut se puede consultar mediante [SWS_CRYPT_50143].
  • El tamaño de entrada de in debe encontrarse entre los límites mínimo y máximo definidos por [SWS_CRYPT_50144] y [SWS_CRYPT_50050]; de lo contrario, se devuelve CryptoErrc::kInvalidInputSize [SWS_CRYPT_23618].

Si el procesamiento de datos no fue iniciado previamente por Start(), el método notifica CryptoErrc::kProcessingNotStarted [SWS_CRYPT_23618]. Si el búfer de entrada contiene datos no válidos, se genera CryptoErrc::kInvalidArgument [SWS_CRYPT_23618]. El error CryptoErrc::kUnsupported ocurre cuando no se admite el procesamiento en flujo (stream), el contexto no utiliza ningún IV o ya se pasó un IV en Start() [SWS_CRYPT_23618]. Todos los errores poseen semántica de rollback [SWS_CRYPT_23618]. Según la especificación, la llamada es segura para subprocesos y segura frente a excepciones (noexcept) [SWS_CRYPT_23618].

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/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23618
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23618@rel:R25-11#b8113eb7
Content hash
b8113eb7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23618
Status: valid/unmigrated Version: rel:R25-11#dcc35b13 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_23618@rel:R25-11#dcc35b13
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c50d30f82026-09-30
  • R19-11rel:R19-11#c41ea37b2026-10-14
  • R20-11rel:R20-11#06f18fb12026-10-14
  • R21-11rel:R21-11#3725bc5a2026-10-14
  • R22-11rel:R22-11#724878ec2026-10-14
  • R23-11rel:R23-11#8e98bdf02026-10-14
  • R24-11rel:R24-11#1d9181d92026-10-14
  • R25-11rel:R25-11#dcc35b132026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetMaximumChunkSize [SWS_CRYPT_50050] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50050@rel:R25-11#a7c4b651
Content hash
a7c4b651
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50050
Status: valid/unmigrated Version: rel:R25-11#439b3c69 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50050@rel:R25-11#439b3c69
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetMaximumInputIvSize [SWS_CRYPT_50142] Upstream: RS_CRYPTO_02309

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

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

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50142@rel:R25-11#828300b3
Content hash
828300b3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50142
Status: valid/unmigrated Version: rel:R25-11#2fd32b15 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50142@rel:R25-11#2fd32b15
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetMinimumChunkSize [SWS_CRYPT_50144] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50144@rel:R25-11#6fa883a2
Content hash
6fa883a2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50144
Status: valid/unmigrated Version: rel:R25-11#8dfc91ab Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50144@rel:R25-11#8dfc91ab
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetMinimumInputIvSize [SWS_CRYPT_50141] Upstream: RS_CRYPTO_02309

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

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

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50141@rel:R25-11#c26c77dc
Content hash
c26c77dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50141
Status: valid/unmigrated Version: rel:R25-11#a69e1387 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50141@rel:R25-11#a69e1387
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetOutputIvSize [SWS_CRYPT_50143] Upstream: RS_CRYPTO_02309

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50143@rel:R25-11#d2129f23
Content hash
d2129f23
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50143
Status: valid/unmigrated Version: rel:R25-11#11f7dfe6 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50143@rel:R25-11#11f7dfe6
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función GetRequiredOutputBufferSize [SWS_CRYPT_50140] Upstream: RS_CRYPTO_02302

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

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

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

Parameter (in)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50140@rel:R25-11#3526beaa
Content hash
3526beaa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50140
Status: valid/unmigrated Version: rel:R25-11#3cd4a32f Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50140@rel:R25-11#3cd4a32f
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función ProcessSingleCall [SWS_CRYPT_50047] Upstream: RS_CRYPTO_02302

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

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

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

El método ProcessSingleCall realiza un cifrado o descifrado en una única llamada sincrónica sin vector de inicialización (IV) ([SWS_CRYPT_50047]). Como parámetros de entrada sirven el búfer de datos in (ReadOnlyMemRegion) y la dirección de transformación transformDirection (CryptoTransform), mientras que el resultado se escribe en el búfer out (ReadWriteMemRegion). En caso de ejecución correcta, la función devuelve un ara::core::Result<std::size_t> que contiene el número de bytes escritos; este valor puede ser menor que la capacidad total del búfer de salida.

En cuanto a concurrencia y seguridad, el método está especificado como thread-safe y exception safe ([SWS_CRYPT_50047]). El tamaño de entrada procesable de in está sujeto a los límites definidos por el contexto, que pueden consultarse a través de [SWS_CRYPT_50144] (GetMinimumChunkSize) y [SWS_CRYPT_50050] (GetMaximumChunkSize).

Todos los casos de error siguen una semántica de reversión ([SWS_CRYPT_50047]):

  • ara::crypto::CryptoErrc::kUninitializedContext: el contexto no se inicializó previamente mediante la asignación de una clave.
  • ara::crypto::CryptoErrc::kUnsupported: no se admite el procesamiento mediante llamada única o la transformación requiere establecer o leer un IV.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: el búfer de salida out no ofrece suficiente capacidad.
  • ara::crypto::CryptoErrc::kInvalidInputSize: el contexto no puede procesar el tamaño de entrada.
  • ara::crypto::CryptoErrc::kUsageViolation: el uso de la clave no cubre la operación solicitada (kAllowDataEncryption o kAllowDataDecryption).
  • ara::crypto::CryptoErrc::kIncompatibleObject, kEmptyKeySlot, kInvalidArgument o kBusyResource: la clave es incompatible, la ranura de clave está vacía, los datos de entrada no son válidos o los recursos necesarios están ocupados.

En interacción con otras interfaces, la llamada requiere un contexto completamente configurado; para cifrados con autenticación y procesamiento de etiquetas adicional, en AuthCipherCtx está disponible la interfaz alternativa [SWS_CRYPT_50078].

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

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if the context requires setting or returning an IV in the passed transformDirection
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50047@rel:R25-11#aa56da06
Content hash
aa56da06
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50047
Status: valid/unmigrated Version: rel:R25-11#c5198454 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50047@rel:R25-11#c5198454
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función ProcessSingleCallWithInputIv [SWS_CRYPT_50048] Upstream: RS_CRYPTO_02302

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

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

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

El método ProcessSingleCallWithInputIv en ara::crypto::cryp::SymmetricCipherCtx realiza un cifrado o descifrado simétrico de datos en una única llamada sincrónica (Single-Call) [SWS_CRYPT_50048]. En este proceso, el vector de inicialización utilizado para la transformación se pasa explícitamente a través del búfer de entrada iv.

Uso e interacción

A través de transformDirection se controla si los datos de in se cifran o se descifran. El resultado se escribe en el búfer out. El ara::core::Result<std::size_t> devuelto contiene el número real de bytes escritos, que puede resultar inferior a la capacidad total de out [SWS_CRYPT_50048].

Para el dimensionamiento de los búferes se dispone de funciones auxiliares:

  • El tamaño de búfer requerido para out se puede calcular previamente mediante GetRequiredOutputBufferSize con el parámetro isFinal = true [SWS_CRYPT_50140].
  • La longitud admisible para iv se puede determinar para la dirección de transformación seleccionada a través de GetMinimumInputIvSize [SWS_CRYPT_50141] así como GetMaximumInputIvSize [SWS_CRYPT_50142].
  • Si adicionalmente se requiere la generación o verificación de una etiqueta de autenticación, se debe utilizar en su lugar ara::crypto::cryp::AuthCipherCtx::ProcessSingleCallWithInputIv [SWS_CRYPT_50079].

Tratamiento de errores y concurrencia

La operación está definida como thread-safe y exception safe [SWS_CRYPT_50048]. Todos los errores poseen semántica de reversión (rollback):

  • CryptoErrc::kUninitializedContext o CryptoErrc::kEmptyKeySlot: No se ha asignado ninguna clave al contexto o el KeySlot está vacío [SWS_CRYPT_50048].
  • CryptoErrc::kUsageViolation: La clave no permite la dirección seleccionada (falta kAllowDataEncryption o kAllowDataDecryption) [SWS_CRYPT_50048].
  • CryptoErrc::kIncompatibleObject: El tipo de clave es incompatible con la transformación [SWS_CRYPT_50048].
  • CryptoErrc::kInsufficientCapacity: El búfer de salida out es demasiado pequeño [SWS_CRYPT_50048].
  • CryptoErrc::kInvalidInputSize o CryptoErrc::kInvalidArgument: El tamaño de búfer o el contenido de in no son válidos [SWS_CRYPT_50048].
  • CryptoErrc::kUnsupported: El procesamiento mediante llamada única (single-call) o los IV de entrada no están soportados [SWS_CRYPT_50048].
  • CryptoErrc::kBusyResource: un recurso necesario está ocupado [SWS_CRYPT_50048].

Este texto ha sido generado por una IA y sirve de apoyo para el uso del elemento de especificación.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if single-call processing with an input IV is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50048
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50048@rel:R25-11#59eb397c
Content hash
59eb397c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50048
Status: valid/unmigrated Version: rel:R25-11#06bfc8c8 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50048@rel:R25-11#06bfc8c8
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función Seek [SWS_CRYPT_23613] Upstream: RS_CRYPTO_02304

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

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

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

El método Seek de la interfaz ara::crypto::cryp::SymmetricCipherCtx establece la posición del siguiente byte que se va a procesar dentro de un flujo de datos [SWS_CRYPT_23613]. Debido a la ausencia de tipos de retorno asíncronos como futuros, es probable que la llamada se realice de forma síncrona. Pregunta Q-fccf732722263f60 (abierta)

usar

El posicionamiento se controla mediante dos parámetros [SWS_CRYPT_23613]:

  • offset: Desplazamiento en bytes dentro del flujo de datos, referido bien al inicio del flujo o bien a la posición actual [SWS_CRYPT_23613].
  • fromBegin: Punto de referencia del posicionamiento; true direcciona el desplazamiento desde el inicio del flujo, false de forma relativa a la posición actual [SWS_CRYPT_23613].

La función está declarada como noexcept y devuelve un ara::core::Result<void>, el cual señala la finalización con éxito o contiene un objeto de error producido [SWS_CRYPT_23613].

Concurrencia y restricciones

Según la especificación, Seek está clasificado como seguro frente a excepciones (exception safe) y seguro para subprocesos (thread-safe) [SWS_CRYPT_23613]. El requisito para la ejecución es que el procesamiento de datos se haya iniciado previamente mediante la llamada a Start() [SWS_CRYPT_23613].

Manejo de errores

Todos los casos de error están sujetos a una semántica de reversión definida (rollback_semantics), de modo que el estado interno permanece coherente en caso de error [SWS_CRYPT_23613]:

  • ara::crypto::CryptoErrc::kUnsupported: La operación seek no es compatible con el contexto criptográfico actual [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kProcessingNotStarted: El procesamiento de datos no se inició previamente mediante Start() [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kOutOfBounds: El desplazamiento resultante es demasiado pequeño o demasiado grande para el flujo de datos [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kInvalidArgument: El desplazamiento resultante no está alineado con un límite de bloque, a pesar de que el contexto requiere alineación de bloque [SWS_CRYPT_23613].

Este texto ha sido creado por una IA.

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

Parameter (in)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23613
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23613@rel:R25-11#2c0d3862
Content hash
2c0d3862
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23613
Status: valid/unmigrated Version: rel:R25-11#383a800f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_23613@rel:R25-11#383a800f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6a4153822026-09-30
  • R19-11rel:R19-11#9c63158a2026-10-14
  • R20-11rel:R20-11#36a48d2b2026-10-14
  • R21-11rel:R21-11#f3b5692c2026-10-14
  • R22-11rel:R22-11#a11f983a2026-10-14
  • R23-11rel:R23-11#10ff1b922026-10-14
  • R24-11rel:R24-11#23dbf8e42026-10-14
  • R25-11rel:R25-11#383a800f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función SetKey [SWS_CRYPT_50043] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 72406ca015ea 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 SetKey configura la instancia de ara::crypto::cryp::SymmetricCipherCtx de modo que utilice para futuras operaciones criptográficas la clave procedente del KeySlot pasado [SWS_CRYPT_50043].

Uso y contexto de llamada

La llamada se realiza de forma sincrónica y toma como parámetro keySlot un KeySlot::Sptr que contiene un SymmetricKey [SWS_CRYPT_50043]. El valor de retorno es un ara::core::Result<void> que señala el éxito o transmite un código de error en caso de fallo [SWS_CRYPT_50043]. La configuración hace que la clave almacenada en la ranura no se utilice hasta el momento en el que se inicia el cifrado o descifrado propiamente dicho [SWS_CRYPT_50043].

Manejo de errores

En caso de error no se lanza ninguna excepción (el método está especificado como noexcept y exception safe), sino que se devuelve un código de error con semántica de reversión [SWS_CRYPT_50043]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: el KeySlot pasado es incompatible con el contexto de cifrado [SWS_CRYPT_50043].
  • ara::crypto::CryptoErrc::kUnsupported: la implementación del contexto admite exclusivamente el establecimiento de una clave directa (como SymmetricKey) y ninguna asignación a través de un KeySlot [SWS_CRYPT_50043].

Concurrencia e interacción

El método está designado como thread-safe [SWS_CRYPT_50043]. Interpretación: presumiblemente, la lectura efectiva del material de clave no se producirá hasta el inicio del cifrado o descifrado, de modo que la ranura debe permanecer consistente hasta el inicio de la transformación. Pregunta Q-799125800ab0f93c (abierta) El concepto de configurar contextos a través de KeySlot::Sptr en lugar de objetos de clave directos se corresponde con el patrón uniforme de contextos criptográficos relacionados, incluidos KeyDerivationFunctionCtx [SWS_CRYPT_50010], MessageAuthnCodeCtx [SWS_CRYPT_50026], SymmetricKeyWrapperCtx [SWS_CRYPT_50034] y VerifierPublicCtx [SWS_CRYPT_50018].

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

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a SymmetricKey.

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50043
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50043@rel:R25-11#5357c02c
Content hash
5357c02c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50043
Status: valid/unmigrated Version: rel:R25-11#e7e7c9ab Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50043@rel:R25-11#e7e7c9ab
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función SetKey [SWS_CRYPT_50138] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

Configure the context to use the provided symmetric key.

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

usar

El método SetKey sirve para configurar una instancia de ara::crypto::cryp::SymmetricCipherCtx para el uso de una clave simétrica transferida [SWS_CRYPT_50138]. Como parámetro de entrada, la función recibe la clave a utilizar como puntero inteligente key del tipo SymmetricKey::Sptr. La llamada se realiza de forma síncrona y devuelve un ara::core::Result<void>, que está vacío en caso de asignación correcta o proporciona un código de error en caso de fallo [SWS_CRYPT_50138]. La declaración está incluida mediante la cabecera ara/crypto/cryp/symmetric_cipher_ctx.h.

Manejo de errores

El tratamiento de errores garantiza semántica de reversión (rollback), de modo que el contexto permanece en su estado anterior ante un fallo en la asignación [SWS_CRYPT_50138]. Se definen dos errores específicos:

  • ara::crypto::CryptoErrc::kUnsupported: se produce cuando el contexto admite exclusivamente la asignación de una clave a través de un KeySlot [SWS_CRYPT_50138].
  • ara::crypto::CryptoErrc::kIncompatibleObject: se devuelve cuando el objeto de clave transferido no es compatible con el contexto [SWS_CRYPT_50138].

Concurrencia e interacción

La función virtual está definida como noexcept, se considera segura frente a excepciones (exception-safe) y, según la especificación, se ejecuta de forma segura para subprocesos (thread-safe) [SWS_CRYPT_50138]. Interfaces similares para la asignación de SymmetricKey::Sptr se encuentran en contextos criptográficos afines como AuthCipherCtx [SWS_CRYPT_23911] y SymmetricKeyWrapperCtx [SWS_CRYPT_24018]. La interacción con contenedores de claves la ilustran además clases de contexto que aceptan alternativamente KeySlot::Sptr [SWS_CRYPT_50034].

Esta nota de uso se ha generado automáticamente a partir de la especificación AUTOSAR R25-11.

Guía del implementador pendiente (complejidad I2)

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

Parameter (in)

ParameterBeschreibung
keythe SymmetricKey to be used.

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50138@rel:R25-11#e36c3921
Content hash
e36c3921
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50138
Status: valid/unmigrated Version: rel:R25-11#aa2f4130 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50138@rel:R25-11#aa2f4130
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función Start [SWS_CRYPT_23625] Upstream: RS_CRYPTO_02302

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

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

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

usar

El método Start inicializa el contexto ara::crypto::cryp::SymmetricCipherCtx para una nueva operación síncrona de cifrado o descifrado y establece el vector de inicialización (IV) o valor nonce asociado [SWS_CRYPT_23625]. Mediante el parámetro transformDirection se define la dirección de la transformación, mientras que iv proporciona el vector de inicialización como ReadOnlyMemRegion [SWS_CRYPT_23625]. El tamaño admisible del búfer puede consultarse previamente mediante los métodos GetMinimumInputIvSize() y GetMaximumInputIvSize() [SWS_CRYPT_23625]. La llamada devuelve un ara::core::Result<void>, está declarada como noexcept y se considera segura frente a excepciones (exception safe) [SWS_CRYPT_23625].

Manejo de errores

En caso de error, se devuelve un código de error con semántica de reversión [SWS_CRYPT_23625]:

  • ara::crypto::CryptoErrc::kUninitializedContext: El contexto no se inicializó previamente mediante la asignación de una clave [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kInvalidInputSize: El tamaño de IV proporcionado no es compatible [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUnsupported: El contexto no admite el establecimiento de un IV en la dirección de transformación especificada o el procesamiento de flujo [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: Un KeySlot configurado está actualmente vacío [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUsageViolation: El uso permitido de la clave no incluye kAllowDataEncryption para el cifrado o kAllowDataDecryption para el descifrado [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kIncompatibleObject: El tipo de clave es incompatible con la transformación o la dirección de la transformación [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kBusyResource: un recurso necesario está ocupado [SWS_CRYPT_23625].

Concurrencia e interacción

La función está especificada como segura para subprocesos (thread-safe) [SWS_CRYPT_23625]. En el flujo de un procesamiento de flujo, Start actúa como paso iniciador al que siguen, por ejemplo, operaciones de posicionamiento mediante Seek [SWS_CRYPT_23613] o la finalización mediante FinishEncrypt [SWS_CRYPT_23618].

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

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support setting an IV in the given transform Direction or if stream processing is not supported by the context
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23625@rel:R25-11#b5a2d133
Content hash
b5a2d133
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23625
Status: valid/unmigrated Version: rel:R25-11#608e87fd Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_23625@rel:R25-11#608e87fd
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a536a6ca2026-09-30
  • R20-11rel:R20-11#6996665a2026-10-14
  • R21-11rel:R21-11#c2b5cf1e2026-10-14
  • R22-11rel:R22-11#25b4dab42026-10-14
  • R23-11rel:R23-11#e01d837d2026-10-14
  • R24-11rel:R24-11#26e85c6c2026-10-14
  • R25-11rel:R25-11#608e87fd2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función Start [SWS_CRYPT_50044] Upstream: RS_CRYPTO_02302

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

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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 09affb4844e4 Procedencia
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::SymmetricCipherCtx de forma síncrona para un próximo cifrado o descifrado ([SWS_CRYPT_50044]). Se utiliza cuando para la dirección de transformación predefinida mediante el parámetro transformDirection no es necesario ningún vector de inicialización (IV) o el contexto genera este por sí mismo ([SWS_CRYPT_50044]). Por el contrario, si en la dirección elegida el contexto requiere un IV explícito, debe invocarse la sobrecarga con parámetro de IV ([SWS_CRYPT_23625]).

Tratamiento de errores y concurrencia

La operación está especificada como segura para subprocesos y a prueba de excepciones ([SWS_CRYPT_50044]). En caso de error, la función devuelve un ara::core::Result<void> con semántica de reversión ([SWS_CRYPT_50044]). Los motivos de error relevantes son:

  • ara::crypto::CryptoErrc::kUninitializedContext: No se asignó previamente ninguna clave al contexto ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUnsupported: No se admite el procesamiento por flujos (stream) o la operación requiere obligatoriamente el establecimiento de un IV en esta dirección ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUsageViolation: La clave no posee la autorización requerida kAllowDataEncryption o kAllowDataDecryption ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kIncompatibleObject o ara::crypto::CryptoErrc::kEmptyKeySlot: El tipo de clave no se corresponde con la transformación o bien el espacio de claves configurado está vacío ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kBusyResource: Un recurso requerido está ocupado actualmente ([SWS_CRYPT_50044]).

Interacción

Tras una inicialización correcta, el flujo de datos puede posicionarse en caso necesario mediante Seek ([SWS_CRYPT_23613]). Si el contexto mismo determinó el IV, este se entrega al llamante al final del cifrado mediante FinishEncrypt ([SWS_CRYPT_23618]).

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

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV in the given transformDirection or if stream processing is not supported by the context
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50044
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50044@rel:R25-11#7083c832
Content hash
7083c832
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50044
Status: valid/unmigrated Version: rel:R25-11#842f896d Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50044@rel:R25-11#842f896d
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

función Update [SWS_CRYPT_50139] Upstream: RS_CRYPTO_02302

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

Encrypt or decrypt a data buffer.

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

El método síncrono Update() sirve en ara::crypto::cryp::SymmetricCipherCtx para cifrar o descifrar paso a paso flujos de datos parciales [SWS_CRYPT_50139]. Procesa un búfer de entrada in (tipo ReadOnlyMemRegion) con texto en claro o texto cifrado y escribe los datos transformados en el búfer de salida out (tipo ReadWriteMemRegion) [SWS_CRYPT_50139]. El valor de retorno ara::core::Result<std::size_t> proporciona, en caso de éxito, el número exacto de bytes efectivamente escritos en out, que puede ser inferior a la capacidad total del búfer de destino [SWS_CRYPT_50139].

Para la llamada se aplican condiciones previas y reglas de búfer establecidas:

  • Orden de ejecución: El procesamiento de datos debe haberse iniciado obligatoriamente con anterioridad mediante el método Start(); de lo contrario, la llamada falla con ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50139].
  • Dimensionamiento del búfer: El tamaño de entrada máximo permitido por llamada individual se puede determinar mediante GetMaximumChunkSize() [SWS_CRYPT_50050]; el método responde a tamaños de búfer no válidos con ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50139]. El búfer de salida necesario se puede consultar mediante GetRequiredOutputBufferSize() [SWS_CRYPT_50139]; un búfer demasiado pequeño conduce a ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50139].
  • Soporte de streaming: Si el contexto concreto no admite el procesamiento continuo de secuencias (stream), la llamada falla con ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50139].

La interfaz está especificada como thread-safe y exception safe, y garantiza una semántica de reversión ante cualquier error [SWS_CRYPT_50139]. En el ciclo de procesamiento interactúa con GetMaximumChunkSize(), así como con operaciones finales como Finish() o FinishEncrypt() [SWS_CRYPT_50050].

Esta nota de uso ha sido generada de forma automatizada a partir de la especificación R25-11 de AUTOSAR.

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

Parameter (in)

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

Parameter (out)

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

Rückgabewert

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

Fehler

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50139@rel:R25-11#35583fae
Content hash
35583fae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50139
Status: valid/unmigrated Version: rel:R25-11#50161066 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50139@rel:R25-11#50161066
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Documentación de los alias de tipo

alias de tipo Sptr [SWS_CRYPT_50137] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<SymmetricCipherCtx>;

Smart pointer of the interface.

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50137@rel:R25-11#672741fb
Content hash
672741fb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50137
Status: valid/unmigrated Version: rel:R25-11#61315479 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50137@rel:R25-11#61315479
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill