DEENESPTFRRUARHIKOZHNL

classe 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

Guia do utilizadorGERADO POR IA

Oferece uma interface para cifragem e decifragem simétricas autenticadas com proteção de integridade.
GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: a1dee2a3fcf5 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Oferece uma interface para cifragem e decifragem simétricas autenticadas com proteção de integridade.

A interface ara::crypto::cryp::AuthCipherCtx destina-se à cifragem e decifragem autenticadas de dados, mantendo a confidencialidade e a integridade [SWS_CRYPT_23911]. Após a configuração da chave, o processamento ocorre como uma chamada única atômica ou como uma sequência em streaming composta por inicialização, dados de autenticação opcionais, atualizações de dados úteis e finalização. Como condição crítica de segurança, a decifragem falha se a tag de autenticação for inválida, de modo que os dados úteis decifrados só devem ser processados após validação bem-sucedida [SWS_CRYPT_50075].

Contexto

A interface ara::crypto::cryp::AuthCipherCtx define a interface de programação padronizada para operações de cifra autenticada (Authenticated Encryption with Associated Data, AEAD) dentro da AUTOSAR Adaptive Platform. Ela alia confidencialidade à proteção de integridade gerando ou validando sempre uma tag criptográfica de autenticação paralelamente à cifragem ou decifragem efetiva dos dados úteis. Aplicações chamadoras e objetos de chave atuam como parceiros centrais de interação: antes do uso, um contexto é vinculado a uma instância concreta de SymmetricKey [SWS_CRYPT_23911] ou configurado com um KeySlot persistido ou fornecido [SWS_CRYPT_50072]. Além do processamento passo a passo em streaming, a classe também suporta chamadas únicas autônomas para processamento de mensagens completas em uma única etapa [SWS_CRYPT_50078].

Ciclo de vida

Os contextos são gerenciados no escopo da aplicação por meio do tipo de ponteiro compartilhado ara::crypto::cryp::AuthCipherCtx::Sptr [SWS_CRYPT_20101]. (Interpretação: a criação do objeto ocorre tipicamente por meio de uma factory de provedor hierarquicamente superior, visto que AuthCipherCtx é especificada como uma interface pura). Pergunta Q-23125789874cf2f3 (aberta) Todas as funções-membro são declaradas como seguras contra exceções (exception safe) e seguras para threads (thread-safe) [SWS_CRYPT_23911], [SWS_CRYPT_24715]. O ciclo de vida funcional passa por estados claramente definidos:

  • Não inicializado: imediatamente após a instanciação. Chamadas para processamento de dados são rejeitadas, visto que ainda nenhuma chave foi atribuída [SWS_CRYPT_50081].
  • Chave configurada: mediante a chamada bem-sucedida de SetKey com um SymmetricKey [SWS_CRYPT_23911] ou um KeySlot [SWS_CRYPT_50072], o contexto transita para o estado operacional. A partir desse estado, operações do tipo single-shot podem ser executadas diretamente.
  • Streaming ativo: é acessado pela chamada de Start especificando-se a direção de transformação com vetor de inicialização (IV) [SWS_CRYPT_24715] ou sem IV explícito [SWS_CRYPT_50073].
  • Conclusão / Reset: uma operação de streaming em andamento é concluída regularmente por Finish [SWS_CRYPT_50075] ou FinishEncrypt [SWS_CRYPT_50076], ou cancelada prematuramente por meio de Cancel [SWS_CRYPT_50077]. Depois disso, o contexto fica novamente disponível para novas sequências de processamento.
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 do contexto, desde a vinculação da chave até a conclusão, passando pelo processamento em streaming. Fontes: [SWS_CRYPT_23911], [SWS_CRYPT_50072], [SWS_CRYPT_24715], [SWS_CRYPT_50075], [SWS_CRYPT_50077].

Caminho de utilização

Para o processamento de fluxo contínuo de dados, a interface requer uma sequência ordenada de chamadas:

  1. Configuração: atribuição da chave via SetKey [SWS_CRYPT_23911] ou SetKey com KeySlot [SWS_CRYPT_50072].
  2. Consulta de parâmetros: determinação opcional de limites e tamanhos de buffer por meio de GetMinimumChunkSize [SWS_CRYPT_50162], GetMaximumChunkSize [SWS_CRYPT_50082], GetMinimumInputIvSize [SWS_CRYPT_50163], GetMaximumInputIvSize [SWS_CRYPT_50164], GetTagSize [SWS_CRYPT_50161], bem como GetRequiredOutputBufferSize [SWS_CRYPT_50081].
  3. Início da operação: chamada de Start com definição da direção (criptografia ou descriptografia), bem como disponibilização do IV [SWS_CRYPT_24715] ou solicitação de um IV próprio do contexto [SWS_CRYPT_50073].
  4. Dados associados (AAD): se dados adicionais em texto simples devam ser incluídos no cálculo da integridade, eles serão passados via UpdateAuthenticatedData [SWS_CRYPT_20313]. O tamanho máximo permitido de AAD pode ser consultado via GetMaxAssociatedDataSize [SWS_CRYPT_20103]. Importante: os blocos de AAD devem ser transmitidos obrigatoriamente antes dos dados úteis propriamente ditos.
  5. Processamento de dados úteis: passagem passo a passo de blocos de dados por meio de UpdateConfidentialData [SWS_CRYPT_50074]. Na descriptografia, o texto simples é retornado antes que sua autenticidade seja confirmada; a aplicação só pode utilizar esses dados após a finalização bem-sucedida.
  6. Finalização: encerramento da operação por meio de Finish [SWS_CRYPT_50075] ou FinishEncrypt [SWS_CRYPT_50076], processando o bloco final e calculando ou verificando a tag de autenticação.

Para payloads compactos, existem alternativas de chamada única (single-call): ProcessSingleCall processa dados sem passagem de IV [SWS_CRYPT_50078], ProcessSingleCallWithInputIv aceita um IV externo [SWS_CRYPT_50079] e EncryptSingleCallWithOutputIv retorna um IV gerado pelo contexto ao chamador [SWS_CRYPT_50080].

Fluxo de uma criptografia autenticada em fluxoAplicaçãoAuthCipherCtxSetKey(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 sequência: sequência de chamadas de uma criptografia autenticada em fluxo. Fontes: [SWS_CRYPT_23911], [SWS_CRYPT_24715], [SWS_CRYPT_20313], [SWS_CRYPT_50074], [SWS_CRYPT_50075].

Cenários de erro

Métodos de AuthCipherCtx retornam resultados via ara::core::Result e possuem semântica de rollback em caso de falha. Os códigos de erro relevantes de ara::crypto::CryptoErrc são:

Este guia baseia-se exclusivamente no padrão AUTOSAR Adaptive (Release R25-11) e resume os requisitos da interface ara::crypto::cryp::AuthCipherCtx.

Mapa de membros

Diagrama de classes

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 detalhes

Selecione uma entrada no índice.

Métodos

Cancel função

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 função

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

FinishEncrypt função

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 função

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 função 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 função 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;

Aliases de tipo

Sptr alias de tipo

Smart pointer of the interface.

Documentação dos métodos

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 739ac0d710b6 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

usar

O método Cancel() da interface ara::crypto::cryp::AuthCipherCtx cancela uma operação de streaming ativa que foi previamente iniciada por meio de Start() e ainda não concluída [SWS_CRYPT_50077]. A função é disponibilizada através do cabeçalho ara/crypto/cryp/auth_cipher_ctx.h e opera de forma síncrona sem parâmetros de entrada [SWS_CRYPT_50077]. Ela retorna um ara::core::Result<void>, que está vazio em caso de sucesso.

Tratamento de erros e condições de contorno

Um cancelamento pressupõe que o processamento de dados tenha sido de fato iniciado previamente por Start(). Se a operação de streaming não foi iniciada, a chamada falha e retorna o código de erro ara::crypto::CryptoErrc::kProcessingNotStarted com semântica de rollback [SWS_CRYPT_50077].

simultaneidade

A operação está declarada como noexcept e, de acordo com a especificação, é classificada tanto como thread-safe quanto como exception safe [SWS_CRYPT_50077].

Interação

O padrão de cancelamento implementado por Cancel() é padronizado no módulo crypt. Uma semântica de interface idêntica e o mesmo código de erro ara::crypto::CryptoErrc::kProcessingNotStarted estão definidos para contextos de streaming correspondentes:

Esta nota de utilização foi gerada automaticamente com base na especificação AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#6b125c7d
Content hash
6b125c7d
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 6385ebfbc16d Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método síncrono EncryptSingleCallWithOutputIv da interface ara::crypto::cryp::AuthCipherCtx executa uma cifragem autenticada num único passo e gera autonomamente um vetor de inicialização [SWS_CRYPT_50080]. Processa dados de entrada de dataIn bem como dados adicionais opcionais authenticatedData e escreve o criptograma no buffer dataOut. O vetor de inicialização gerado é armazenado no buffer ivOut, enquanto a tag de autenticação é emitida através de tag [SWS_CRYPT_50080]. O tamanho do buffer para ivOut pode ser determinado previamente através do método GetOutputIvSize [SWS_CRYPT_50165]. Apesar da componente do nome Encrypt, o método provavelmente também pode ser utilizado para a desencriptação, uma vez que a especificação de erros indica explicitamente o comportamento para transformDirection == kDecrypt [SWS_CRYPT_50080]. Pergunta Q-66618567b20f99b9 (aberta)

Aplicam-se à chamada pré-condições e restrições essenciais:

  • O contexto tem de ter sido previamente inicializado com sucesso com SetKey; caso contrário, é reportado kUninitializedContext [SWS_CRYPT_50080].
  • A chave no Key-Slot configurado tem de ser compatível e apresentar a autorização adequada (por exemplo, kAllowDataEncrypt), caso contrário será retornado kUsageViolation ou kIncompatibleObject [SWS_CRYPT_50080].
  • Se os buffers de saída dataOut ou ivOut não forem suficientes, a chamada falha com kInsufficientCapacity [SWS_CRYPT_50080].
  • Se o contexto não suportar o processamento de passo único ou exigir a especificação externa de um IV, é retornado kUnsupported [SWS_CRYPT_50080].

A operação está especificada como thread-safe e segura para exceções, e garante semântica de rollback em caso de erro [SWS_CRYPT_50080]. Para cifragens simétricas puras sem processamento de tag, existe uma contraparte separada em SymmetricCipherCtx [SWS_CRYPT_50049].

Este texto foi gerado por uma IA com base na especificação.

Guia do implementador em breve (complexidade 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#58f8c76e
Content hash
58f8c76e
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 8b946dd1de69 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Utilização e semântica

O método Finish conclui sincronicamente a encriptação ou desencriptação dentro de um ara::crypto::cryp::AuthCipherCtx e calcula ou verifica a tag de autenticação, sem retornar um vetor de inicialização (IV) [SWS_CRYPT_50075]. O chamador passa os dados restantes através do buffer in e do buffer de destino out. Através do buffer tag, a tag calculada é emitida na encriptação, enquanto na desencriptação é passada a tag a verificar [SWS_CRYPT_50075]. O valor de retorno ara::core::Result<std::size_t> quantifica os bytes efetivamente escritos em out, que podem ser menores do que a capacidade do buffer de saída [SWS_CRYPT_50075].

Sequência e interação

Antes da chamada, o processamento de dados tem de ter sido obrigatoriamente iniciado por Start() [SWS_CRYPT_50075]. Se blocos de dados tiverem sido previamente processados através de UpdateConfidentialData, uma aplicação só pode utilizar o texto em claro resultante na desencriptação após autenticação bem-sucedida por Finish [SWS_CRYPT_50074]. O tamanho de buffer máximo necessário para out pode ser determinado previamente através de GetRequiredOutputBufferSize, especificando isFinal = true [SWS_CRYPT_50081].

Tratamento de erros e simultaneidade

O método está especificado como seguro para threads e seguro para exceções [SWS_CRYPT_50075]. Os erros são reportados através de ara::core::Result com semântica de rollback [SWS_CRYPT_50075]:

  • ProcessingNotStarted: O processamento de dados não foi iniciado previamente com Start() [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: o buffer de saída out é demasiado pequeno [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInvalidInputSize: O tamanho do buffer de in ou tag é inválido [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: A autenticidade dos dados não pode ser confirmada na desencriptação [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kUnsupported: O processamento em streaming não é suportado pelo contexto [SWS_CRYPT_50075].

Nota: Esta nota de utilização foi gerada automaticamente com base nos dados da especificação.

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#3d4bb547
Content hash
3d4bb547
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: fd75aa19665e Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

usar

O método FinishEncrypt conclui síncronamente uma operação de encriptação autenticada em ara::crypto::cryp::AuthCipherCtx, calcula a tag de autenticação e devolve o vetor de inicialização gerado pelo contexto através de ivOut [SWS_CRYPT_50076]. A chamada está especificada como thread-safe bem como segura contra exceções (exception safe) [SWS_CRYPT_50076]. Como resultado, a função retorna um ara::core::Result<std::size_t> com o número de bytes efetivamente gravados no buffer de saída out, podendo o tamanho de saída ser inferior à capacidade do buffer [SWS_CRYPT_50076]. Interpretação: Embora o nome aponte para encriptação, a especificação do parâmetro tag bem como o código de erro ara::crypto::CryptoErrc::kAuthTagNotValid indicam que a assinatura no contexto também deverá poder ser utilizada simetricamente para operações de desencriptação. Pergunta Q-6b924f12c32e0f33 (aberta)

Interação e dimensionamento de buffer

O processamento de dados tem de ter sido obrigatoriamente iniciado previamente com Start(); caso contrário, a função reporta o erro ProcessingNotStarted [SWS_CRYPT_50076]. Para o dimensionamento dos buffers, deve ser observada a interação com as seguintes funções de contexto:

  • A capacidade máxima necessária para out pode ser calculada previamente através de [SWS_CRYPT_50081] com o parâmetro isFinal = true, a fim de evitar o erro ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50076].
  • O tamanho de buffer mínimo e máximo para os dados de entrada in é determinado por [SWS_CRYPT_50162] bem como [SWS_CRYPT_50082].
  • O tamanho de buffer necessário para receber o vetor de inicialização gerado em ivOut pode ser consultado através de [SWS_CRYPT_50165].

Tratamento de erros e condições de contorno

Em caso de erro, todos os retornos possuem uma semântica de rollback definida [SWS_CRYPT_50076]. No caso de tamanhos de buffer inválidos para dados de entrada ou para a tag de autenticação, é retornado ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50076]. Além disso, a função fornece ara::crypto::CryptoErrc::kUnsupported caso o processamento de stream não seja suportado, nenhum IV seja utilizado ou o IV já tenha sido predefinido pela aplicação no arranque [SWS_CRYPT_50076].

Esta nota de utilização foi criada por uma IA e baseia-se exclusivamente nos dados da especificação.

Guia do implementador em breve (complexidade 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#9418d540
Content hash
9418d540
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

função 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#71c18f51
Content hash
71c18f51
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

função 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#0e05f59d
Content hash
0e05f59d
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

função 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#0c5aefda
Content hash
0c5aefda
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

função 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#1a1aa4b2
Content hash
1a1aa4b2
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

função 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#eaa802a5
Content hash
eaa802a5
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

função 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#fccc0511
Content hash
fccc0511
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

função 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#a6b03e4b
Content hash
a6b03e4b
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

função 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#74548f3a
Content hash
74548f3a
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: a5183289221a Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método síncrono e definido como thread-safe ProcessSingleCall de ara::crypto::cryp::AuthCipherCtx executa a cifragem ou decifragem de dados úteis e o cálculo ou verificação simultâneo da tag de autenticação em uma única operação sem vetor de inicialização (IV) [SWS_CRYPT_50078]. Por meio do buffer opcional authenticatedData, podem ser disponibilizados dados autenticados adicionais [SWS_CRYPT_50078]. O buffer tag serve como entrada para verificação na decifragem e como saída para armazenamento da tag de autenticação gerada na cifragem [SWS_CRYPT_50078]. Em caso de processamento bem-sucedido, ara::core::Result<std::size_t> retorna o número efetivo de bytes gravados em dataOut, que pode ser menor que a capacidade do buffer de destino [SWS_CRYPT_50078].

Antes da chamada, o contexto criptográfico deve ter sido inicializado por meio de uma chamada bem-sucedida de SetKey; caso contrário, a função falha com ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50078]. Além disso, a chave utilizada deve estar liberada para a direção de transformação solicitada (kAllowDataEncrypt ou kAllowDataDecrypt), pois, caso contrário, ara::crypto::CryptoErrc::kUsageViolation é reportado [SWS_CRYPT_50078]. Se o processamento em etapa única não for suportado ou se o contexto exigir um IV, a função retorna ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50078]. Se a autenticação falhar na decifragem, ara::crypto::CryptoErrc::kAuthTagNotValid é disparado [SWS_CRYPT_50078]. Erros no slot de chave associado são sinalizados via EmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource ou ara::crypto::CryptoErrc::kIncompatibleObject [SWS_CRYPT_50078].

Para o gerenciamento de buffers, o tamanho de saída máximo necessário para dataOut pode ser calculado previamente via GetRequiredOutputBufferSize com a flag isFinal = true definida [SWS_CRYPT_50081]; um buffer de saída pequeno demais resulta em ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50078]. Adicionalmente, o tamanho de dataIn deve estar em conformidade com os limites de GetMinimumChunkSize [SWS_CRYPT_50162] e GetMaximumChunkSize [SWS_CRYPT_50082] para evitar ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50078].

Esta nota de uso foi gerada automaticamente com base na especificação do AUTOSAR Adaptive R25-11.

Guia do implementador em breve (complexidade 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#4d8dc8e5
Content hash
4d8dc8e5
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 36312c01407d Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método [SWS_CRYPT_50079] da classe ara::crypto::cryp::AuthCipherCtx executa um processamento síncrono de passo único (single-call) para encriptação ou desencriptação de dados, com cálculo ou verificação simultânea da tag de autenticação.

Na chamada, os dados de entrada são passados através de dataIn e a direção através de transformDirection. O vetor de inicialização é passado através de iv, e dados de autenticação opcionais podem ser fornecidos através de authenticatedData [SWS_CRYPT_50079]. O buffer tag serve, no caso de encriptação, como saída para a tag calculada e, no caso de desencriptação, como entrada para a verificação [SWS_CRYPT_50079]. Em caso de sucesso, o valor de retorno ara::core::Result<std::size_t> fornece o número de bytes escritos em dataOut, que pode ser menor do que a capacidade do buffer [SWS_CRYPT_50079].

Em caso de erro, todos os códigos de erro possuem semântica de rollback [SWS_CRYPT_50079]:

  • ara::crypto::CryptoErrc::kUninitializedContext: Nenhuma chave foi previamente configurada via SetKey [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUsageViolation: A chave não possui a permissão necessária kAllowDataEncrypt ou kAllowDataDecrypt [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kEmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource ou ara::crypto::CryptoErrc::kIncompatibleObject: Um KeySlot configurado está vazio, ocupado ou não contém um SymmetricKey compatível [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kInvalidInputSize ou ara::crypto::CryptoErrc::kInsufficientCapacity: Os buffers de entrada, tag ou IV estão dimensionados de forma inválida ou dataOut oferece capacidade insuficiente [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: Na desencriptação, a autenticação falha [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUnsupported: O processamento single-shot não é suportado pelo contexto ou o contexto requer a definição ou emissão de um IV [SWS_CRYPT_50079].

A operação está definida como thread-safe e exception safe [SWS_CRYPT_50079]. Os comprimentos permitidos para iv podem ser consultados dinamicamente através de GetMinimumInputIvSize [SWS_CRYPT_50163] e GetMaximumInputIvSize [SWS_CRYPT_50164]. Em comparação com a cifra de bloco pura em SymmetricCipherCtx [SWS_CRYPT_50048], esta interface combina transformação criptográfica e verificação de integridade numa única chamada.

Este texto foi gerado por uma IA com base na especificação AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#32ce8801
Content hash
32ce8801
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: c987f167a8b5 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método SetKey configura a instância de ara::crypto::cryp::AuthCipherCtx para o uso de uma chave simétrica passada [SWS_CRYPT_23911]. Como parâmetro, é passado um shared pointer key (do tipo SymmetricKey::Sptr), que é utilizado para a criptografia ou descriptografia autenticada [SWS_CRYPT_23911]. A chamada ocorre de forma síncrona, está declarada como noexcept e retorna um ara::core::Result<void> [SWS_CRYPT_23911].

Em caso de erro, o resultado é revertido com semântica de rollback e fornece códigos de erro específicos [SWS_CRYPT_23911]:

  • ara::crypto::CryptoErrc::kUnsupported: caso o contexto suporte exclusivamente a configuração por meio de um KeySlot [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kIncompatibleObject: quando o tipo de chave passado não for compatível com o contexto atual [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kUsageViolation: se as flags de uso permitidas da chave não contiverem kAllowDataEncrypt para cifragem ou kAllowDataDecrypt para decifragem [SWS_CRYPT_23911].

De acordo com a especificação, a interface é classificada como segura para threads (thread-safe) e segura contra exceções (exception safe) [SWS_CRYPT_23911]. Na interação com o contexto do módulo, a chave presumivelmente deve ser definida via Start [SWS_CRYPT_24715] antes da inicialização de uma nova transformação. Pergunta Q-11f7daa370f5d438 (aberta)

Esta nota de uso foi gerada automaticamente com base no payload do AUTOSAR.

Guia do implementador em breve (complexidade 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#d58518a9
Content hash
d58518a9
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 44d0d6c36fa2 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

A função SetKey na interface ara::crypto::cryp::AuthCipherCtx configura o contexto para operações criptográficas de forma a utilizar a chave simétrica armazenada num key slot fornecido, assim que a encriptação ou desencriptação autenticada for executada [SWS_CRYPT_50072].

Utilização: A chamada síncrona é efetuada através da interface de ara/crypto/cryp/auth_cipher_ctx.h. Como parâmetro keySlot é passada uma instância de KeySlot::Sptr, que encapsula uma chave simétrica [SWS_CRYPT_50072]. A função retorna um ara::core::Result<void>, que confirma o sucesso ou contém um código de erro [SWS_CRYPT_50072].

Tratamento de erros: Caso a implementação concreta do contexto suporte exclusivamente a configuração direta através de um objeto SymmetricKey e não disponibilize a definição via KeySlot, a chamada falha. Neste caso, é retornado o erro ara::crypto::CryptoErrc::kUnsupported com semântica de rollback [SWS_CRYPT_50072].

Concorrência e restrições: A função está especificada como thread-safe e exception safe [SWS_CRYPT_50072]. Ela pode ser chamada concorrentemente e assegura que, em situações de exceção, não permaneça nenhum estado inconsistente.

Interação: Como alternativa funcional, está disponível a sobrecarga SetKey com um SymmetricKey::Sptr direto [SWS_CRYPT_23911]. Após a vinculação bem-sucedida da chave, o contexto é inicializado através de Start com a direção da operação bem como com o vetor de inicialização [SWS_CRYPT_24715]. Assinaturas análogas com KeySlot::Sptr existem adicionalmente em MessageAuthnCodeCtx [SWS_CRYPT_50026] e SymmetricKeyWrapperCtx [SWS_CRYPT_50034].

Este texto foi criado por uma IA e baseia-se na especificação AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#da6d6f0b
Content hash
da6d6f0b
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: da3f0fb3ff33 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método Start inicializa o contexto ara::crypto::cryp::AuthCipherCtx para uma nova cifragem ou decifragem e define o vetor de inicialização (IV) ou valor nonce a ser utilizado [SWS_CRYPT_24715]. Por meio do parâmetro transformDirection, a direção da transformação é definida, enquanto iv passa o vetor como ReadOnlyMemRegion [SWS_CRYPT_24715]. O tamanho de IV permitido pode ser determinado via GetMinimumInputIvSize() bem como GetMaximumInputIvSize(); em caso de comprimento divergente, a função reporta o erro ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_24715].

Antes da chamada, SetKey deve ter sido executado com sucesso; caso contrário, ara::crypto::CryptoErrc::kUninitializedContext é retornado [SWS_CRYPT_24715]. Um KeySlot configurado não pode estar vazio (EmptyKeySlot) nem ocupado (ara::crypto::CryptoErrc::kBusyResource) [SWS_CRYPT_24715]. Além disso, a chave armazenada deve ser um SymmetricKey adequado (caso contrário, ara::crypto::CryptoErrc::kIncompatibleObject) e estar autorizada para a direção desejada (kAllowDataEncrypt ou kAllowDataDecrypt, caso contrário, ara::crypto::CryptoErrc::kUsageViolation) [SWS_CRYPT_24715]. Se faltar o suporte para processamento contínuo (streaming) ou para a definição de um IV na direção selecionada, a chamada falha com ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_24715]. Todos os erros apresentam semântica de rollback [SWS_CRYPT_24715].

A operação é declarada como thread-safe bem como exception-safe (noexcept) [SWS_CRYPT_24715]. Na interação de fluxos criptográficos, após uma inicialização bem-sucedida, deve seguir tipicamente a passagem de dados autenticados adicionais via UpdateAuthenticatedData [SWS_CRYPT_20313]. Pergunta Q-e023e27f1cd24507 (aberta)

Esta nota de uso foi gerada automaticamente com base no AUTOSAR Release R25-11.

Guia do implementador em breve (complexidade 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#49ce6754
Content hash
49ce6754
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: f698e30e2198 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

usar

O método puramente virtual Start da classe ara::crypto::cryp::AuthCipherCtx inicializa o contexto de forma síncrona para uma encriptação ou desencriptação iminente [SWS_CRYPT_50073]. Através do parâmetro transformDirection, indica-se se o contexto é preparado para encriptação ou desencriptação. Esta sobrecarga sem vetor de inicialização (IV) só pode ser utilizada se o contexto criptográfico não pressupuser um IV na direção de transformação selecionada ou se o determinar por si próprio [SWS_CRYPT_50073]. O valor de retorno é um ara::core::Result<void> vazio em caso de sucesso ou um código de erro correspondente.

Tratamento de erros e pré-requisitos

Antes da chamada, o contexto tem de ter sido configurado com sucesso através de SetKey com uma chave; caso contrário, a função falha com ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50073]. Além disso, ocorrem em caso de erro os seguintes valores de retorno:

  • ara::crypto::CryptoErrc::kUnsupported, se o processamento de stream não for suportado pelo contexto ou se o contexto exigir obrigatoriamente a indicação explícita de um IV na direção de transformação selecionada [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kUsageViolation, se a utilização permitida da chave no KeySlot configurado no momento da chamada não incluir a permissão necessária kAllowDataEncrypt para encriptação ou kAllowDataDecrypt para desencriptação [SWS_CRYPT_50073].
  • EmptyKeySlot ou ara::crypto::CryptoErrc::kBusyResource, caso um KeySlot configurado esteja atualmente vazio ou bloqueado [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kIncompatibleObject, se o KeySlot configurado não contiver nenhum SymmetricKey ou se este tipo de chave não for suportado pelo contexto [SWS_CRYPT_50073].

Se ocorrer um erro, aplica-se a semântica de rollback especificada (rollback_semantics) [SWS_CRYPT_50073].

Concorrência e interação

A função está declarada com noexcept=0, assegura segurança contra exceções e foi concebida para ser thread-safe [SWS_CRYPT_50073]. Se o algoritmo exigir o fornecimento externo de um vetor de inicialização, deve ser utilizada, em alternativa, a sobrecarga Start(CryptoTransform, ReadOnlyMemRegion) [SWS_CRYPT_24715]. Após a inicialização bem-sucedida, dados adicionais autenticados podem ser integrados no cálculo da tag de autenticação através de UpdateAuthenticatedData [SWS_CRYPT_20313].

Esta nota de uso foi gerada automaticamente com base na especificação AUTOSAR Adaptive R25-11.

Guia do implementador em breve (complexidade 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#725c6ffc
Content hash
725c6ffc
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: f3852a997444 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método UpdateAuthenticatedData da interface ara::crypto::cryp::AuthCipherCtx serve para atualizar passo a passo o cálculo da tag de autenticação com mais um fragmento de dados autenticados adicionais (Additional Authenticated Data) [SWS_CRYPT_20313]. O buffer correspondente é passado como ReadOnlyMemRegion por meio do parâmetro authenticatedData [SWS_CRYPT_20313].

Em relação ao contexto de chamada e à concorrência, a operação está definida como thread-safe e exception safe [SWS_CRYPT_20313]. Para a chamada aplicam-se condições estritas de ordenação:

  • A transformação deve ter sido iniciada previamente por meio do método Start(); caso contrário, ara::crypto::CryptoErrc::kProcessingNotStarted é reportado [SWS_CRYPT_20313].
  • A função não pode mais ser chamada se UpdateConfidentialData já tiver sido executado; em caso de não cumprimento, é retornado o erro ara::crypto::CryptoErrc::kInvalidUsageOrder [SWS_CRYPT_20313].

Como valor de retorno, a função fornece um ara::core::Result<void>, que está vazio em caso de sucesso ou encapsula um código de erro ocorrido [SWS_CRYPT_20313]. Todos os erros apresentam semântica de rollback [SWS_CRYPT_20313]:

  • ara::crypto::CryptoErrc::kInvalidInputSize: O tamanho do buffer de entrada passado é inválido [SWS_CRYPT_20313].
  • ara::crypto::CryptoErrc::kUnsupported: O processamento de stream não é suportado pelo contexto atual [SWS_CRYPT_20313].

Este texto foi gerado por uma IA e serve como orientação. A especificação AUTOSAR é vinculativa.

Guia do implementador em breve (complexidade 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#d2c22303
Content hash
d2c22303
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

função 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().

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 0a7976c267f4 Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O método UpdateConfidentialData da classe ara::crypto::cryp::AuthCipherCtx serve para a cifragem ou decifragem passo a passo de dados úteis confidenciais no âmbito de um contexto de cifragem autenticada [SWS_CRYPT_50074]. São passados a ele o buffer de entrada in (tipo ReadOnlyMemRegion) com uma parte do texto em claro ou texto cifrado, bem como o buffer de saída out (tipo ReadWriteMemRegion) [SWS_CRYPT_50074]. Como valor de retorno síncrono, a função fornece um ara::core::Result<std::size_t>, que, em caso de sucesso, contém o número de bytes efetivamente gravados; este pode ser menor que a capacidade de out [SWS_CRYPT_50074].

Relativamente ao fluxo e à concorrência, aplicam-se as seguintes condições:

  • Ordem de execução e integridade: Antes do processamento, a operação deve ter sido iniciada via Start() [SWS_CRYPT_50074]. Se o método for utilizado para decifragem, o texto em claro é emitido sem verificação prévia de autenticidade; a aplicação não deve, sob hipótese alguma, utilizar esses dados antes da verificação final por meio de Finish() [SWS_CRYPT_50074]. Dados autenticados adicionais podem ser incluídos em paralelo no cálculo da tag via UpdateAuthenticatedData [SWS_CRYPT_20313].
  • Segurança de threads e de exceções: A operação está declarada como thread-safe bem como exception-safe e não lança exceções (noexcept) [SWS_CRYPT_50074].

Se o processamento falhar, aplica-se a semântica de rollback com o retorno de um código de erro correspondente em ara::core::Result [SWS_CRYPT_50074]:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: O processamento ainda não foi iniciado via Start() [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: O buffer de saída out está subdimensionado [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInvalidInputSize: O tamanho do buffer in é inválido [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kUnsupported: O processamento de fluxo contínuo (stream) não é suportado pelo contexto [SWS_CRYPT_50074].

Este texto foi gerado por uma IA com base na especificação AUTOSAR R25-11.

Guia do implementador em breve (complexidade 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#8da58699
Content hash
8da58699
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

Documentação dos aliases 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