DEENESPTFRRUARHIKOZHNL

classe 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

Guide utilisateurGÉNÉRÉ PAR IA

Sert d'interface pour les opérations de chiffrement et de déchiffrement symétriques en flux de données ou en appels uniques.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 0261b663ca0d Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Sert d'interface pour les opérations de chiffrement et de déchiffrement symétriques en flux de données ou en appels uniques.

La classe ara::crypto::cryp::SymmetricCipherCtx sert d'interface thread-safe pour les opérations de chiffrement et de déchiffrement symétriques dans AUTOSAR Adaptive [SWS_CRYPT_50044]. Après la configuration d'une clé via SetKey(), les données peuvent être traitées soit en un seul appel, soit pas à pas dans un cycle de streaming composé de Start(), Update() et Finish() [SWS_CRYPT_50138], [SWS_CRYPT_50139]. Toutes les méthodes sont spécifiées comme noexcept et signalent les erreurs, telles qu'une initialisation manquante ou des tampons trop petits, via ara::core::Result [SWS_CRYPT_50140].

Contexte

L'interface ara::crypto::cryp::SymmetricCipherCtx encapsule les transformations cryptographiques symétriques, qui englobent à la fois des opérations de chiffrement et de déchiffrement. Au sein de l'architecture cryptographique, la classe agit comme contexte d'exécution pour les algorithmes symétriques et coopère avec des objets de clé ainsi que des tampons mémoire. Pour configurer la clé cryptographique, la classe interagit soit directement avec des clés volatiles via SymmetricKey [SWS_CRYPT_50138], soit avec des clés gérées de manière persistante ou isolée via KeySlot [SWS_CRYPT_50043]. Les textes clairs et chiffrés à traiter ainsi que les vecteurs d'initialisation (IV) sont transmis et reçus via des zones de mémoire de type ReadOnlyMemRegion et ReadWriteMemRegion [SWS_CRYPT_50048], [SWS_CRYPT_50049].

Cycle de vie

Le cycle de vie et les relations de propriété de l'interface sont principalement gérés via l'alias de pointeur intelligent typé Sptr (std::shared_ptr<SymmetricCipherCtx>) [SWS_CRYPT_50137]. La mise à disposition d'une instance concrète devrait s'effectuer en pratique via une méthode de fabrique cryptographique de niveau supérieur (interprétation), étant donné que la définition d'interface elle-même ne présente aucune fonction de création. Question Q-5b5f5ffdf964c91f (ouverte)

Après l'instanciation, le contexte traverse plusieurs phases d'exploitation :

  • Non initialisé : immédiatement après l'instanciation, aucune clé n'est associée au contexte. Tout appel de traitement au cours de cette phase entraîne l'erreur CryptoErrc::kUninitializedContext [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • Initialisé / clé liée : par l'appel de SetKey() avec un SymmetricKey [SWS_CRYPT_50138] ou un KeySlot [SWS_CRYPT_50043], le contexte devient opérationnel. À partir de cet état, il est possible soit d'exécuter des opérations sans état en un seul appel, soit de démarrer un processus de streaming avec état.
  • Traitement par streaming : un appel de Start() initie une transformation pas à pas [SWS_CRYPT_50044], [SWS_CRYPT_23625]. Durant cette phase, des données peuvent être transformées via Update() [SWS_CRYPT_50139] et la position peut être modifiée via Seek() [SWS_CRYPT_23613]. L'état de streaming est normalement terminé par Finish() [SWS_CRYPT_50045] ou FinishEncrypt() [SWS_CRYPT_23618], ou rejeté prématurément via Cancel() [SWS_CRYPT_50046]. Le contexte retourne ensuite à l'état initial initialisé.

Toutes les méthodes de SymmetricCipherCtx sont déclarées comme noexcept, garantissent la sécurité vis-à-vis des exceptions (« exception safe ») et sont spécifiées comme sûres pour les accès concurrents (« thread-safe ») [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()

Diagramme d'états : cycle de vie et transitions d'état du contexte de chiffrement symétrique. Sources : [SWS_CRYPT_50138], [SWS_CRYPT_50044], [SWS_CRYPT_50139], [SWS_CRYPT_50045], [SWS_CRYPT_50046]

Parcours d'utilisation

Avant la transformation proprement dite des données, il est recommandé de déterminer les tailles requises pour les tampons et les blocs. GetMinimumChunkSize() [SWS_CRYPT_50144] et GetMaximumChunkSize() [SWS_CRYPT_50050] permettent d'obtenir les limites admissibles pour les blocs d'entrée. Si des vecteurs d'initialisation sont requis, leurs limites de longueur peuvent être interrogées au moyen de GetMinimumInputIvSize() [SWS_CRYPT_50141], GetMaximumInputIvSize() [SWS_CRYPT_50142] ou GetOutputIvSize() [SWS_CRYPT_50143]. La taille maximale requise du tampon cible pour une opération est calculée au moyen de GetRequiredOutputBufferSize() [SWS_CRYPT_50140].

Pour le chiffrement ou déchiffrement pas à pas en flux continu, le déroulement standard suivant s'applique :

  1. Configurer la clé : liaison de la clé cryptographique au contexte via SetKey() [SWS_CRYPT_50138].
  2. Démarrer la transformation : appel de Start() en indiquant le sens de transformation (chiffrement ou déchiffrement) et un IV optionnel [SWS_CRYPT_23625] ou sans IV [SWS_CRYPT_50044].
  3. Transformer les blocs de données : appel répété de Update() pour la transmission pas à pas des données d'entrée et la récupération des données de sortie [SWS_CRYPT_50139]. En cas de besoin, il est possible de naviguer au sein du flux de données via Seek() [SWS_CRYPT_23613].
  4. Achèvement : finalisation via Finish() [SWS_CRYPT_50045] ou via FinishEncrypt(), dans la mesure où l'IV généré par le contexte doit être renvoyé [SWS_CRYPT_23618].

Comme alternative à ce modèle de streaming, l'interface prend en charge des appels uniques synchrones. Lorsque la totalité de la charge utile est disponible, l'opération peut être exécutée directement via ProcessSingleCall() [SWS_CRYPT_50047], ProcessSingleCallWithInputIv() [SWS_CRYPT_50048] ou, pour une génération d'IV propre au contexte, via EncryptSingleCallWithOutputIv() [SWS_CRYPT_50049].

Chiffrement symétrique de flux de donnéesApplicationSymmetricCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>loopTant que des blocs sont présentsUpdate(in, out)Result<size_t>FinishEncrypt(in, out, ivOut)Result<size_t>

Diagramme de séquence : séquence d'appels typique d'un chiffrement en streaming. Sources : [SWS_CRYPT_50138], [SWS_CRYPT_23625], [SWS_CRYPT_50139], [SWS_CRYPT_23618]

Scénarios d'erreur

Les méthodes de la classe signalent les erreurs via ara::core::Result avec des codes du domaine d'erreur ara::crypto::CryptoErrc. Les conditions d'erreur essentielles comprennent :

  • CryptoErrc::kUninitializedContext : survient lorsque des appels de traitement tels que Start() [SWS_CRYPT_50044], des routines en appel unique [SWS_CRYPT_50047] ou GetRequiredOutputBufferSize() [SWS_CRYPT_50140] sont appelés avant qu'une clé n'ait été enregistrée via SetKey().
  • CryptoErrc::kProcessingNotStarted : est déclenché lorsque des fonctions de streaming telles que Update() [SWS_CRYPT_50139], Finish() [SWS_CRYPT_50045], FinishEncrypt() [SWS_CRYPT_23618], Seek() [SWS_CRYPT_23613] ou Cancel() [SWS_CRYPT_50046] sont exécutées sans appel préalable réussi de Start().
  • CryptoErrc::kInsufficientCapacity : le tampon cible fourni pour les données ou les IV est plus petit que la capacité minimale requise [SWS_CRYPT_50139], [SWS_CRYPT_50049].
  • CryptoErrc::kUsageViolation et CryptoErrc::kIncompatibleObject : le type de clé transmis est inadapté à la transformation ou les règles d'utilisation enregistrées dans la clé interdisent l'opération (par ex. absence de kAllowDataEncryption ou de kAllowDataDecryption) [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • CryptoErrc::kEmptyKeySlot et CryptoErrc::kBusyResource : indique qu'un KeySlot configuré ne contient aucune clé à l'exécution ou qu'une ressource requise pour l'opération cryptographique est bloquée [SWS_CRYPT_50048], [SWS_CRYPT_50049].
  • CryptoErrc::kUnsupported : est renvoyé lorsqu'un mode de fonctionnement (comme le traitement en flux continu, l'appel unique ou Seek()) n'est pas pris en charge par le contexte ou l'algorithme sélectionné [SWS_CRYPT_23613], [SWS_CRYPT_50047].

Ce guide a été élaboré par un assistant IA à partir des prescriptions de spécification.

Carte des membres

Diagramme de classes

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

Vue détaillée

Sélectionnez une entrée dans le plan.

Méthodes

Cancel fonction

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 fonction

Finalize the encryption/decryption without returning an IV.

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

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 fonction

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 fonction 2

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

Surcharges 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 fonction 2

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

Surcharges 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 fonction

Encrypt or decrypt a data buffer.

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

Alias de type

Sptr alias de type

Smart pointer of the interface.

Documentation des méthodes

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 0bea3f0e1d0d Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone Cancel() de la classe ara::crypto::cryp::SymmetricCipherCtx sert à interrompre prématurément une opération de streaming en cours, préalablement initiée avec Start() et non encore terminée [SWS_CRYPT_50046]. L'interface est déclarée sans paramètre dans ara/crypto/cryp/symmetric_cipher_ctx.h et renvoie un ara::core::Result<void> vide en cas d'exécution réussie [SWS_CRYPT_50046].

Si le traitement des données n'a pas été démarré au préalable par l'appel de Start(), l'opération échoue avec le code d'erreur spécifique ara::crypto::CryptoErrc::kProcessingNotStarted et une sémantique de rollback [SWS_CRYPT_50046]. Pour le contexte d'appel, la spécification garantit la sécurité des threads (thread-safe) ainsi que la sécurité vis-à-vis des exceptions (exception safe) avec déclaration noexcept [SWS_CRYPT_50046]. Interprétation : en raison de la sémantique de rollback, l'objet devrait revenir après une interruption à un état initial prêt. Question Q-b6deb8db5367acc5 (ouverte)

Ce modèle fonctionnel est défini de manière cohérente sur l'ensemble des contextes de streaming cryptographiques dans AUTOSAR Adaptive. Des signatures et des sémantiques d'erreur identiques s'appliquent aux classes de contexte VerifierPublicCtx ([SWS_CRYPT_50023]), MessageAuthnCodeCtx ([SWS_CRYPT_50027]), SignerPrivateCtx ([SWS_CRYPT_50041]), HashFunctionCtx ([SWS_CRYPT_50058]), DecryptorPrivateCtx ([SWS_CRYPT_50069]), AuthCipherCtx ([SWS_CRYPT_50077]) et EncryptorPublicCtx ([SWS_CRYPT_50089]).

Ce texte a été élaboré par une IA et repose sur la spécification AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité 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#da12f4fa
Content hash
da12f4fa
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 9c4059afbb11 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation et gestion des tampons

La méthode synchrone EncryptSingleCallWithOutputIv effectue un chiffrement symétrique en un seul appel et renvoie le vecteur d'initialisation généré par le contexte via le tampon ivOut [SWS_CRYPT_50049]. Les données d'entrée sont transmises via in, tandis que out reçoit les données chiffrées [SWS_CRYPT_50049]. En cas d'exécution réussie, le résultat ara::core::Result<std::size_t> fournit la taille réelle des données de sortie générées, qui peut être inférieure à la capacité totale de out [SWS_CRYPT_50049]. Si l'algorithme sélectionné ne requiert aucun vecteur d'initialisation, aucune donnée n'est écrite dans ivOut [SWS_CRYPT_50049].

Interaction et préconditions

Avant l'appel, le contexte doit être initialisé à l'aide d'une clé appropriée [SWS_CRYPT_50049]. Afin de garantir une capacité suffisante du tampon ivOut, la longueur d'IV requise peut être déterminée au préalable via GetOutputIvSize() [SWS_CRYPT_50143]. Si une authentification avec calcul de tag est en outre requise, ara::crypto::cryp::AuthCipherCtx propose le pendant correspondant [SWS_CRYPT_50080].

Gestion des erreurs et concurrence

L'interface est spécifiée comme sûre du point de vue des threads (thread-safe) et sûre face aux exceptions (« exception safe ») et applique une sémantique de rollback en cas d'erreur [SWS_CRYPT_50049]. Interprétation : cette sémantique de rollback devrait garantir qu'en cas d'erreurs survenues, l'état du contexte reste intact et qu'aucune donnée incomplète ne reste considérée comme valide dans le tampon. Question Q-841087731518d866 (ouverte) Parmi les erreurs pertinentes figurent :

  • UninitializedContext : aucune clé n'a encore été attribuée au contexte [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kInsufficientCapacity : la capacité de out ou de ivOut est insuffisante [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUnsupported : le chiffrement en appel unique (single-call) n'est pas pris en charge ou l'algorithme impose la spécification d'un IV d'entrée [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUsageViolation ou ara::crypto::CryptoErrc::kIncompatibleObject : le type de clé ne correspond pas à la transformation ou l'utilisation de la clé n'autorise pas le chiffrement de données [SWS_CRYPT_50049].

Cette note d'utilisation a été générée par une IA sur la base des spécifications d'AUTOSAR Adaptive.

Guide de l'implémenteur à venir (complexité 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#9255295e
Content hash
9255295e
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 041cbaba2731 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode synchrone Finish finalise un chiffrement ou déchiffrement symétrique au sein de ara::crypto::cryp::SymmetricCipherCtx sans renvoi de vecteur d'initialisation ([SWS_CRYPT_50045]). Elle traite le dernier segment de données issu du tampon d'entrée in (ReadOnlyMemRegion) et écrit les données résultantes dans le tampon de sortie out (ReadWriteMemRegion) ([SWS_CRYPT_50045]). La taille de tampon requise à cet effet peut être interrogée au préalable via GetRequiredOutputBufferSize() ([SWS_CRYPT_50045]). En cas de succès, la valeur de retour de type ara::core::Result<std::size_t> fournit le nombre exact d'octets écrits, qui peut être inférieur à la capacité totale de out ([SWS_CRYPT_50045]).

Gestion des erreurs

En cas d'erreur, la méthode fournit un ara::core::Result avec des codes d'erreur spécifiques ([SWS_CRYPT_50045]) :

  • ProcessingNotStarted : le traitement des données n'a pas été initié au préalable par Start() ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInsufficientCapacity : le tampon de sortie out est trop petit ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidInputSize : la taille des données d'entrée ne peut pas être traitée ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidArgument : les données d'entrée transmises sont non valides ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kUnsupported : le traitement de flux n'est pas pris en charge par le contexte actuel ([SWS_CRYPT_50045]).

Si l'une des erreurs CryptoErrc survient, une sémantique de rollback s'applique ([SWS_CRYPT_50045]).

Concurrence et interaction

L'opération est définie comme thread-safe et exception safe ([SWS_CRYPT_50045]). Avant l'appel, la transformation doit impérativement avoir été commencée par Start() ([SWS_CRYPT_50045]). La taille d'entrée maximale autorisée pour des appels individuels de Finish() peut être déterminée via GetMaximumChunkSize() ([SWS_CRYPT_50050]). Après la finalisation, l'exécution de la transformation devrait être terminée et un nouvel appel de Start() deviendra vraisemblablement nécessaire pour d'autres opérations. Question Q-c4ffc8028e8f522b (ouverte)

Ce texte a été généré par une IA sur la base de la spécification 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#3a74916a
Content hash
3a74916a
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : c0e4f2ad1bdc Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode FinishEncrypt termine une opération de chiffrement et renvoie le vecteur d'initialisation (IV) généré par le contexte [SWS_CRYPT_23618]. Elle traite le tampon de données d'entrée final in et écrit les données résultantes dans le tampon de sortie out ainsi que l'IV dans ivOut. Comme valeur de retour, elle fournit un ara::core::Result<std::size_t> avec la taille effective des données de sortie écrites, qui peut être inférieure à la capacité de out [SWS_CRYPT_23618].

Pour une exécution sans erreur, les dimensions des tampons et l'état du contexte doivent être coordonnés au préalable :

  • La taille de tampon requise pour out peut être déterminée via [SWS_CRYPT_50140] avec le paramètre isFinal = true défini. Si out est sous-dimensionné, l'appel échoue avec CryptoErrc::kInsufficientCapacity [SWS_CRYPT_23618].
  • La taille attendue pour ivOut peut être interrogée via [SWS_CRYPT_50143].
  • La taille d'entrée de in doit être comprise entre les limites minimale et maximale définies par [SWS_CRYPT_50144] et [SWS_CRYPT_50050], faute de quoi CryptoErrc::kInvalidInputSize est renvoyé [SWS_CRYPT_23618].

Si le traitement des données n'a pas été préalablement initié par Start(), la méthode signale CryptoErrc::kProcessingNotStarted [SWS_CRYPT_23618]. Si le tampon d'entrée contient des données non valides, CryptoErrc::kInvalidArgument s'ensuit [SWS_CRYPT_23618]. L'erreur CryptoErrc::kUnsupported survient si le traitement de flux n'est pas pris en charge, si le contexte n'utilise pas d'IV ou si un IV a déjà été transmis dans Start() [SWS_CRYPT_23618]. Toutes les erreurs possèdent une sémantique de rollback [SWS_CRYPT_23618]. Selon la spécification, l'appel est sûr vis-à-vis des threads et sûr vis-à-vis des exceptions (noexcept) [SWS_CRYPT_23618].

Cette note d'utilisation a été générée automatiquement sur la base du payload AUTOSAR.

Guide de l'implémenteur à venir (complexité 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#c42dd35b
Content hash
c42dd35b
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

fonction 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#693be426
Content hash
693be426
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

fonction 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#aeedf4c0
Content hash
aeedf4c0
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

fonction 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#8c9d2fa5
Content hash
8c9d2fa5
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

fonction 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#a8e9de8e
Content hash
a8e9de8e
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

fonction 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#c38d39b3
Content hash
c38d39b3
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

fonction 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#20d09c77
Content hash
20d09c77
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 4a1fdc95f521 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode ProcessSingleCall effectue un chiffrement ou déchiffrement en un seul appel synchrone sans vecteur d'initialisation (IV) ([SWS_CRYPT_50047]). Le tampon de données in (ReadOnlyMemRegion) et le sens de transformation transformDirection (CryptoTransform) servent de paramètres d'entrée, tandis que le résultat est écrit dans le tampon out (ReadWriteMemRegion). En cas d'exécution réussie, la fonction renvoie un ara::core::Result<std::size_t> contenant le nombre d'octets écrits ; cette valeur peut être inférieure à la capacité totale du tampon de sortie.

Concernant la concurrence et la sécurité, la méthode est spécifiée comme thread-safe et exception safe ([SWS_CRYPT_50047]). La taille d'entrée traitable de in est soumise aux limites définies par le contexte, qui peuvent être interrogées via [SWS_CRYPT_50144] (GetMinimumChunkSize) et [SWS_CRYPT_50050] (GetMaximumChunkSize).

Tous les cas d'erreur suivent une sémantique de rollback ([SWS_CRYPT_50047]) :

  • ara::crypto::CryptoErrc::kUninitializedContext : le contexte n'a pas été initialisé au préalable par l'attribution d'une clé.
  • ara::crypto::CryptoErrc::kUnsupported : le traitement en appel unique (single-call) n'est pas pris en charge ou la transformation requiert la définition ou la lecture d'un IV.
  • ara::crypto::CryptoErrc::kInsufficientCapacity : le tampon de sortie out n'offre pas une capacité suffisante.
  • ara::crypto::CryptoErrc::kInvalidInputSize : la taille d'entrée ne peut pas être traitée par le contexte.
  • ara::crypto::CryptoErrc::kUsageViolation : l'utilisation de la clé ne couvre pas l'opération demandée (kAllowDataEncryption ou kAllowDataDecryption).
  • ara::crypto::CryptoErrc::kIncompatibleObject, kEmptyKeySlot, kInvalidArgument ou kBusyResource : la clé est incompatible, l'emplacement de clé est vide, les données d'entrée sont non valides ou les ressources requises sont occupées.

En interaction avec d'autres interfaces, l'appel requiert un contexte entièrement configuré ; pour les chiffrements authentifiés avec traitement supplémentaire de tag, l'interface alternative [SWS_CRYPT_50078] est disponible dans AuthCipherCtx.

Cette note d'utilisation a été générée automatiquement sur la base de la spécification AUTOSAR.

Guide de l'implémenteur à venir (complexité 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#55c5412b
Content hash
55c5412b
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : f491c775eb62 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode ProcessSingleCallWithInputIv sur ara::crypto::cryp::SymmetricCipherCtx exécute un chiffrement ou déchiffrement symétrique de données en un seul appel synchrone (single-call) [SWS_CRYPT_50048]. À cette occasion, le vecteur d'initialisation utilisé pour la transformation est explicitement transmis via le tampon d'entrée iv.

Utilisation et interaction

transformDirection permet de contrôler si les données issues de in sont chiffrées ou déchiffrées. Le résultat est écrit dans le tampon out. Le ara::core::Result<std::size_t> renvoyé contient le nombre réel d'octets écrits, qui peut s'avérer inférieur à la capacité totale de out [SWS_CRYPT_50048].

Des fonctions utilitaires sont disponibles pour le dimensionnement des tampons :

  • La taille de tampon requise pour out peut être calculée au préalable via GetRequiredOutputBufferSize avec le paramètre isFinal = true [SWS_CRYPT_50140].
  • La longueur autorisée pour iv peut être déterminée pour le sens de transformation sélectionné via GetMinimumInputIvSize [SWS_CRYPT_50141] ainsi que GetMaximumInputIvSize [SWS_CRYPT_50142].
  • Si la génération ou la vérification supplémentaire d'un tag d'authentification est requise, il convient d'utiliser ara::crypto::cryp::AuthCipherCtx::ProcessSingleCallWithInputIv à la place [SWS_CRYPT_50079].

Gestion des erreurs et concurrence

L'opération est définie comme thread-safe et exception safe [SWS_CRYPT_50048]. Toutes les erreurs possèdent une sémantique de rollback :

  • CryptoErrc::kUninitializedContext ou CryptoErrc::kEmptyKeySlot : aucune clé n'a été attribuée au contexte ou le KeySlot est vide [SWS_CRYPT_50048].
  • CryptoErrc::kUsageViolation : la clé n'autorise pas le sens sélectionné (kAllowDataEncryption ou kAllowDataDecryption est manquant) [SWS_CRYPT_50048].
  • CryptoErrc::kIncompatibleObject : le type de clé est incompatible avec la transformation [SWS_CRYPT_50048].
  • CryptoErrc::kInsufficientCapacity : le tampon de sortie out est trop petit [SWS_CRYPT_50048].
  • CryptoErrc::kInvalidInputSize ou CryptoErrc::kInvalidArgument : la taille de tampon ou le contenu de in ne sont pas valides [SWS_CRYPT_50048].
  • CryptoErrc::kUnsupported : le traitement en appel unique (single-call) ou les IV d'entrée ne sont pas pris en charge [SWS_CRYPT_50048].
  • CryptoErrc::kBusyResource : une ressource requise est occupée [SWS_CRYPT_50048].

Ce texte a été généré par une IA et sert d'aide à l'utilisation de l'élément de spécification.

Guide de l'implémenteur à venir (complexité 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#17a8d4c6
Content hash
17a8d4c6
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 2287fbd40f75 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode Seek de l'interface ara::crypto::cryp::SymmetricCipherCtx définit la position du prochain octet à traiter au sein d'un flux de données [SWS_CRYPT_23613]. En l'absence de types de retour asynchrones tels que des futures, l'appel devrait s'effectuer de manière synchrone. Question Q-fccf732722263f60 (ouverte)

Utilisation

Le positionnement est contrôlé par deux paramètres [SWS_CRYPT_23613] :

  • offset : décalage en octets dans le flux de données, rapporté soit au début du flux, soit à la position actuelle [SWS_CRYPT_23613].
  • fromBegin : point de référence du positionnement ; true adresse le décalage depuis le début du flux, false relativement à la position actuelle [SWS_CRYPT_23613].

La fonction est déclarée comme noexcept et renvoie un ara::core::Result<void> qui signale l'exécution réussie ou contient un objet d'erreur survenu [SWS_CRYPT_23613].

Concurrence et restrictions

Selon la spécification, Seek est classée comme sûre vis-à-vis des exceptions (exception safe) et thread-safe (thread-safe) [SWS_CRYPT_23613]. La condition préalable à l'exécution est que le traitement des données ait été préalablement initié par l'appel de Start() [SWS_CRYPT_23613].

Gestion des erreurs

Tous les cas d'erreur sont soumis à une sémantique de rollback définie (rollback_semantics), de sorte que l'état interne reste cohérent en cas d'erreur [SWS_CRYPT_23613] :

  • ara::crypto::CryptoErrc::kUnsupported : l'opération seek n'est pas prise en charge par le contexte cryptographique actuel [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kProcessingNotStarted : le traitement des données n'a pas été préalablement démarré via Start() [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kOutOfBounds : le décalage résultant est trop petit ou trop grand pour le flux de données [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kInvalidArgument : le décalage résultant n'est pas aligné sur une limite de bloc, bien que le contexte exige un alignement sur les blocs [SWS_CRYPT_23613].

Ce texte a été généré par une 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#febb6e5f
Content hash
febb6e5f
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 72406ca015ea Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode purement virtuelle SetKey configure l'instance de ara::crypto::cryp::SymmetricCipherCtx de manière à ce qu'elle utilise, pour les futures opérations cryptographiques, la clé issue du KeySlot transmis [SWS_CRYPT_50043].

Utilisation et contexte d'appel

L'appel s'effectue de manière synchrone et reçoit en paramètre keySlot un KeySlot::Sptr contenant un SymmetricKey [SWS_CRYPT_50043]. La valeur de retour est un ara::core::Result<void> qui signale le succès ou transporte un code d'erreur en cas d'erreur [SWS_CRYPT_50043]. La configuration a pour effet que la clé stockée dans le slot n'est sollicitée qu'au moment où le chiffrement ou déchiffrement proprement dit est démarré [SWS_CRYPT_50043].

Gestion des erreurs

En cas d'erreur, aucune exception n'est levée (la méthode est spécifiée comme noexcept et exception safe), mais un code d'erreur avec sémantique de rollback est renvoyé [SWS_CRYPT_50043] :

  • ara::crypto::CryptoErrc::kIncompatibleObject : le KeySlot transmis est incompatible avec le contexte de chiffrement [SWS_CRYPT_50043].
  • ara::crypto::CryptoErrc::kUnsupported : l'implémentation du contexte prend exclusivement en charge la définition d'une clé directe (comme SymmetricKey) et aucune affectation via un KeySlot [SWS_CRYPT_50043].

Concurrence et interaction

La méthode est désignée comme thread-safe [SWS_CRYPT_50043]. Interprétation : la lecture effective du matériel de clé ne devrait avoir lieu qu'au démarrage du chiffrement ou du déchiffrement, de sorte que le slot doit rester cohérent jusqu'au démarrage de la transformation. Question Q-799125800ab0f93c (ouverte) Le concept consistant à configurer des contextes via KeySlot::Sptr au lieu d'objets de clé directs correspond au modèle uniforme de contextes cryptographiques apparentés, parmi lesquels KeyDerivationFunctionCtx [SWS_CRYPT_50010], MessageAuthnCodeCtx [SWS_CRYPT_50026], SymmetricKeyWrapperCtx [SWS_CRYPT_50034] ainsi que VerifierPublicCtx [SWS_CRYPT_50018].

Ce texte a été généré par une IA sur la base de la spécification AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité 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#6519ba85
Content hash
6519ba85
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 7e5086bb8751 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode SetKey sert à configurer une instance de ara::crypto::cryp::SymmetricCipherCtx pour l'utilisation d'une clé symétrique transmise [SWS_CRYPT_50138]. En tant que paramètre d'entrée, la fonction reçoit la clé à utiliser sous forme de pointeur intelligent key de type SymmetricKey::Sptr. L'appel s'effectue de manière synchrone et renvoie un ara::core::Result<void> qui est vide en cas d'assignation réussie ou fournit un code d'erreur en cas d'erreur [SWS_CRYPT_50138]. La déclaration est incluse via l'en-tête ara/crypto/cryp/symmetric_cipher_ctx.h.

Gestion des erreurs

Le traitement des erreurs garantit une sémantique de rollback, de sorte que le contexte reste dans son état précédent en cas d'échec de l'assignation [SWS_CRYPT_50138]. Deux erreurs spécifiques sont définies :

  • ara::crypto::CryptoErrc::kUnsupported : survient lorsque le contexte prend exclusivement en charge l'assignation d'une clé via un KeySlot [SWS_CRYPT_50138].
  • ara::crypto::CryptoErrc::kIncompatibleObject : est renvoyé lorsque l'objet clé transmis n'est pas compatible avec le contexte [SWS_CRYPT_50138].

Concurrence et interaction

La fonction virtuelle est définie comme noexcept, considérée comme exception-safe et implémentée comme thread-safe conformément aux spécifications [SWS_CRYPT_50138]. Des interfaces similaires pour l'assignation de SymmetricKey::Sptr se retrouvent dans des contextes cryptographiques apparentés tels que AuthCipherCtx [SWS_CRYPT_23911] ainsi que SymmetricKeyWrapperCtx [SWS_CRYPT_24018]. L'interaction avec des conteneurs de clés est en outre illustrée par des classes de contexte qui acceptent alternativement KeySlot::Sptr [SWS_CRYPT_50034].

Cette note d'utilisation a été générée automatiquement sur la base de la spécification AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité 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#8d656d31
Content hash
8d656d31
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 33beff56357b Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode Start initialise le contexte ara::crypto::cryp::SymmetricCipherCtx pour une nouvelle opération synchrone de chiffrement ou de déchiffrement et définit le vecteur d'initialisation (IV) ou la valeur de nonce associé(e) [SWS_CRYPT_23625]. Le sens de transformation est défini via le paramètre transformDirection, tandis que iv fournit le vecteur d'initialisation sous la forme de ReadOnlyMemRegion [SWS_CRYPT_23625]. La taille admissible du tampon peut être interrogée au préalable via les méthodes GetMinimumInputIvSize() et GetMaximumInputIvSize() [SWS_CRYPT_23625]. L'appel renvoie un ara::core::Result<void>, est déclaré comme noexcept et est considéré comme sûr vis-à-vis des exceptions (exception safe) [SWS_CRYPT_23625].

Gestion des erreurs

En cas d'erreur, un code d'erreur avec une sémantique de rollback est renvoyé [SWS_CRYPT_23625] :

  • ara::crypto::CryptoErrc::kUninitializedContext : le contexte n'a pas été préalablement initialisé par l'assignation d'une clé [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kInvalidInputSize : la taille d'IV transmise n'est pas prise en charge [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUnsupported : la définition d'un IV dans le sens de transformation indiqué ou le traitement en flux n'est pas pris(e) en charge par le contexte [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kEmptyKeySlot : un KeySlot configuré est actuellement vide [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUsageViolation : l'utilisation autorisée de la clé ne comprend pas kAllowDataEncryption pour le chiffrement ou kAllowDataDecryption pour le déchiffrement [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kIncompatibleObject : le type de clé est incompatible avec la transformation ou le sens de transformation [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kBusyResource : une ressource requise est occupée [SWS_CRYPT_23625].

Concurrence et interaction

La fonction est spécifiée comme thread-safe [SWS_CRYPT_23625]. Dans le déroulement d'un traitement en flux, Start agit comme étape initiatrice, suivie par exemple d'opérations de positionnement via Seek [SWS_CRYPT_23613] ou de la finalisation via FinishEncrypt [SWS_CRYPT_23618].

Ce texte a été généré par un système d'IA sur la base de la spécification AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité 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#e521cca6
Content hash
e521cca6
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 09affb4844e4 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode Start initialise de manière synchrone une instance de ara::crypto::cryp::SymmetricCipherCtx pour un chiffrement ou déchiffrement à venir ([SWS_CRYPT_50044]). Elle est utilisée lorsqu'aucun vecteur d'initialisation (IV) n'est nécessaire pour le sens de transformation spécifié via le paramètre transformDirection ou lorsque le contexte génère lui-même celui-ci ([SWS_CRYPT_50044]). Si le contexte requiert en revanche un IV explicite dans le sens choisi, la surcharge avec paramètre IV doit être appelée ([SWS_CRYPT_23625]).

Gestion des erreurs et concurrence

L'opération est spécifiée comme thread-safe et exception-safe ([SWS_CRYPT_50044]). En cas d'erreur, la fonction renvoie un ara::core::Result<void> avec une sémantique de rollback ([SWS_CRYPT_50044]). Les causes d'erreur pertinentes sont :

  • ara::crypto::CryptoErrc::kUninitializedContext : aucune clé n'a été préalablement assignée au contexte ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUnsupported : Le traitement en flux (stream) n'est pas pris en charge ou l'opération requiert obligatoirement la définition d'un IV dans ce sens ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUsageViolation : La clé ne dispose pas de l'autorisation requise kAllowDataEncryption ou kAllowDataDecryption ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kIncompatibleObject ou ara::crypto::CryptoErrc::kEmptyKeySlot : Le type de clé ne correspond pas à la transformation ou l'emplacement de clé configuré est vide ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kBusyResource : Une ressource requise est actuellement occupée ([SWS_CRYPT_50044]).

Interaction

Après une initialisation réussie, le flux de données peut être positionné au besoin via Seek ([SWS_CRYPT_23613]). Si l'IV a été déterminé par le contexte lui-même, il est transmis à l'appelant à la fin du chiffrement via FinishEncrypt ([SWS_CRYPT_23618]).

Cette note d'utilisation a été générée de manière automatisée sur la base de la spécification AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité 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#a7cc45f2
Content hash
a7cc45f2
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 5cb4a9bba31d Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode synchrone Update() sert, dans ara::crypto::cryp::SymmetricCipherCtx, au chiffrement ou au déchiffrement pas à pas de flux de données partiels [SWS_CRYPT_50139]. Elle traite un tampon d'entrée in (type ReadOnlyMemRegion) contenant du texte en clair ou du texte chiffré et écrit les données transformées dans le tampon de sortie out (type ReadWriteMemRegion) [SWS_CRYPT_50139]. En cas de succès, la valeur de retour ara::core::Result<std::size_t> fournit le nombre exact d'octets réellement écrits dans out, lequel peut être inférieur à la capacité totale du tampon cible [SWS_CRYPT_50139].

Des préconditions et des règles de tampon définies s'appliquent à l'appel :

  • Ordre de déroulement : Le traitement des données doit impérativement avoir été initialisé au préalable avec la méthode Start() ; sinon, l'appel échoue avec ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50139].
  • Dimensionnement du tampon : La taille d'entrée maximale autorisée par appel individuel peut être déterminée via GetMaximumChunkSize() [SWS_CRYPT_50050] ; la méthode signale des tailles de tampon non valides avec ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50139]. Le tampon de sortie requis peut être interrogé via GetRequiredOutputBufferSize() [SWS_CRYPT_50139] ; un tampon trop petit entraîne ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50139].
  • Prise en charge du streaming : Si le contexte concret ne prend pas en charge le traitement de flux continu, l'appel échoue avec ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50139].

L'interface est spécifiée comme thread-safe ainsi que exception safe et garantit une sémantique de rollback pour chaque erreur [SWS_CRYPT_50139]. Dans le cycle de traitement, elle interagit avec GetMaximumChunkSize() ainsi qu'avec des opérations de finalisation telles que Finish() ou FinishEncrypt() [SWS_CRYPT_50050].

Cette note d'utilisation a été générée automatiquement à partir de la spécification AUTOSAR R25-11.

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#1c85d260
Content hash
1c85d260
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

Documentation des alias de type

alias de type 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#7250ce5a
Content hash
7250ce5a
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