DEENESPTFRRUARHIKOZHNL

فئة 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

دليل المستخدممولَّد بالذكاء الاصطناعي

يعمل كواجهة لعمليات التشفير وفك التشفير المتماثل في تدفقات البيانات أو الاستدعاءات الفردية.
مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 0261b663ca0d المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

يعمل كواجهة لعمليات التشفير وفك التشفير المتماثل في تدفقات البيانات أو الاستدعاءات الفردية.

تُستخدم الفئة ara::crypto::cryp::SymmetricCipherCtx كواجهة آمنة خيطياً لعمليات التشفير وفك التشفير المتماثل في AUTOSAR Adaptive [SWS_CRYPT_50044]. وبعد تهيئة مفتاح عبر SetKey()، يمكن معالجة البيانات إما في استدعاء فردي أو خطوة بخطوة في دورة دفق مكونة من Start() وUpdate() وFinish() [SWS_CRYPT_50138]، [SWS_CRYPT_50139]. وجميع الدوال محددة بأنها noexcept وتشير إلى أخطاء مثل غياب التهيئة أو صغر حجم المخزن المؤقت عبر ara::core::Result [SWS_CRYPT_50140].

السياق

تُغلّف الواجهة ara::crypto::cryp::SymmetricCipherCtx التحويلات التشفيرية المتماثلة، والتي تتضمن عمليات التشفير وفك التشفير على حد سواء. وداخل بنية التشفير، تعمل الفئة كسياق تنفيذ للخوارزميات المتماثلة وتتعاون مع كائنات المفاتيح والمخازن المؤقتة للذاكرة. ولتهيئة المفتاح التشفيري، تتفاعل الفئة إما مباشرة مع المفاتيح المؤقتة عبر SymmetricKey [SWS_CRYPT_50138] أو مع مفاتيح مُدارة بشكل مستدام أو معزول عبر KeySlot [SWS_CRYPT_50043]. ويتم تمرير واستلام النصوص الصريحة والمشفرة المطلوب معالجتها بالإضافة إلى متجهات التهيئة (IV) عبر نطاقات ذاكرة من النوع ReadOnlyMemRegion وReadWriteMemRegion [SWS_CRYPT_50048]، [SWS_CRYPT_50049].

دورة الحياة

تتم إدارة دورة الحياة وعلاقات الملكية للواجهة في المقام الأول عبر الاسم المستعار للمؤشر الذكي المصنف Sptr (std::shared_ptr<SymmetricCipherCtx>) [SWS_CRYPT_50137]. ويُرجّح أن توفير مثيل ملموس يتم عملياً عبر دالة مصنع تشفير ذات مستوى أعلى (تفسير)، نظراً لأن تعريف الواجهة نفسه لا يُظهر أي دوال إنشاء. سؤال Q-5b5f5ffdf964c91f (مفتوح)

يمر السياق بعد إنشاء المثيل بعدة مراحل تشغيلية:

  • غير مهيأ: مباشرةً بعد إنشاء المثيل، لا يكون هناك أي مفتاح مقترن بالسياق. ويؤدي أي استدعاء للمعالجة في هذه المرحلة إلى الخطأ CryptoErrc::kUninitializedContext [SWS_CRYPT_50044]، [SWS_CRYPT_50047].
  • مهيأ / المفتاح مربوط: يصبح السياق جاهزاً للتشغيل من خلال استدعاء SetKey() باستخدام SymmetricKey [SWS_CRYPT_50138] أو KeySlot [SWS_CRYPT_50043]. ومن هذه الحالة، يمكن إما تنفيذ عمليات استدعاء فردي عديمة الحالة أو بدء عملية دفق ذات حالة.
  • معالجة الدفق: يبدأ استدعاء Start() تحويلاً تدريجياً [SWS_CRYPT_50044]، [SWS_CRYPT_23625]. وفي هذه المرحلة، يمكن تحويل البيانات عبر Update() [SWS_CRYPT_50139] وتعديل الموضع عبر Seek() [SWS_CRYPT_23613]. وتنتهي حالة الدفق بشكل نظامي بواسطة Finish() [SWS_CRYPT_50045] أو FinishEncrypt() [SWS_CRYPT_23618]، أو يتم التخلص منها مبكراً عبر Cancel() [SWS_CRYPT_50046]. وبعد ذلك، يعود السياق إلى الحالة الأساسية المهيأة.

أُعلن أن جميع دوال SymmetricCipherCtx هي noexcept، وتضمن الأمان الاستثنائي ("exception safe")، ومحددة للوصول المتزامن بأنها آمنة خيطياً ("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()

مخطط الحالة: دورة الحياة وانتقالات الحالة لسياق التشفير المتماثل. المصادر: [SWS_CRYPT_50138]، [SWS_CRYPT_50044]، [SWS_CRYPT_50139]، [SWS_CRYPT_50045]، [SWS_CRYPT_50046]

مسار الاستخدام

قبل تحويل البيانات الفعلي، يوصى بتحديد أحجام المخازن المؤقتة والقطع المطلوبة. فعبر GetMinimumChunkSize() [SWS_CRYPT_50144] وGetMaximumChunkSize() [SWS_CRYPT_50050]، يمكن تحديد الحدود المسموح بها لكتل الإدخال. وإذا كانت متجهات التهيئة مطلوبة، فيمكن الاستعلام عن حدود أطوالها باستخدام GetMinimumInputIvSize() [SWS_CRYPT_50141]، أو GetMaximumInputIvSize() [SWS_CRYPT_50142]، أو GetOutputIvSize() [SWS_CRYPT_50143]. ويتم حساب الحد الأقصى لحجم المخزن المؤقت للهدف الضروري للعملية بواسطة GetRequiredOutputBufferSize() [SWS_CRYPT_50140].

ينطبق التسلسل القياسي التالي على التشفير التدريجي أو فك التشفير التدريجي للتدفق:

  1. تهيئة المفتاح: ربط المفتاح التشفيري بالسياق عبر SetKey() [SWS_CRYPT_50138].
  2. بدء التحويل: استدعاء Start() مع تحديد اتجاه التحويل (تشفير أو فك تشفير) وIV اختياري [SWS_CRYPT_23625] أو بدون IV [SWS_CRYPT_50044].
  3. تحويل كتل البيانات: الاستدعاء المتكرر لـ Update() لتمرير بيانات الإدخال واستخراج بيانات الإخراج خطوة بخطوة [SWS_CRYPT_50139]. عند الحاجة، يمكن التنقل داخل تدفق البيانات عبر Seek() [SWS_CRYPT_23613].
  4. الإتمام: الإنهاء عبر Finish() [SWS_CRYPT_50045] أو عبر FinishEncrypt()، إذا كان من المقرر إرجاع الـ IV الذي تم إنشاؤه بواسطة السياق [SWS_CRYPT_23618].

كبديلاً لنمط التدفق هذا، تدعم الواجهة استدعاءات فردية متزامنة. إذا كانت حمولة البيانات بأكملها متوفرة، فيمكن تنفيذ العملية مباشرةً عبر ProcessSingleCall() [SWS_CRYPT_50047]، أو ProcessSingleCallWithInputIv() [SWS_CRYPT_50048]، أو لتوليد الـ IV الخاص بالسياق عبر EncryptSingleCallWithOutputIv() [SWS_CRYPT_50049].

تشفير تدفق البيانات المتماثلالتطبيقSymmetricCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>loopطالما توجد كتل متوفرةUpdate(in, out)Result<size_t>FinishEncrypt(in, out, ivOut)Result<size_t>

مخطط تسلسلي: مسار الاستدعاء النموذجي لتشفير بالتدفق. المصادر: [SWS_CRYPT_50138]، [SWS_CRYPT_23625]، [SWS_CRYPT_50139]، [SWS_CRYPT_23618]

سيناريوهات الأخطاء

تشير دوال الفئة إلى الأخطاء عبر ara::core::Result برموز من نطاق الخطأ ara::crypto::CryptoErrc. تتضمن شروط الخطأ الأساسية:

  • CryptoErrc::kUninitializedContext: يحدث عند استدعاء عمليات معالجة مثل Start() [SWS_CRYPT_50044]، أو إجراءات الاستدعاء الفردي [SWS_CRYPT_50047] أو GetRequiredOutputBufferSize() [SWS_CRYPT_50140] قبل إيداع مفتاح عبر SetKey().
  • CryptoErrc::kProcessingNotStarted: يُطلق عند تنفيذ دوال التدفق مثل Update() [SWS_CRYPT_50139]، أو Finish() [SWS_CRYPT_50045]، أو FinishEncrypt() [SWS_CRYPT_23618]، أو Seek() [SWS_CRYPT_23613]، أو Cancel() [SWS_CRYPT_50046] دون استدعاء Start() ناجح مسبقًا.
  • CryptoErrc::kInsufficientCapacity: المخزن المؤقت للهدف المقدم للبيانات أو لـ IVs أصغر من السعة الدنيا المطلوبة [SWS_CRYPT_50139]، [SWS_CRYPT_50049].
  • CryptoErrc::kUsageViolation وCryptoErrc::kIncompatibleObject: نوع المفتاح الممرر غير مناسب للتحويل، أو أن قواعد الاستخدام المودعة في المفتاح تحظر العملية (على سبيل المثال، غياب kAllowDataEncryption أو kAllowDataDecryption) [SWS_CRYPT_50044]، [SWS_CRYPT_50047].
  • CryptoErrc::kEmptyKeySlot وCryptoErrc::kBusyResource: يشير إلى أن KeySlot مهيأ لا يحتوي على مفتاح في وقت التشغيل، أو أن موردًا مطلوبًا للعملية التشفيرية محجوز [SWS_CRYPT_50048]، [SWS_CRYPT_50049].
  • CryptoErrc::kUnsupported: يُرجع عندما يكون نمط التشغيل (مثل معالجة التدفق، أو الاستدعاء الفردي، أو Seek()) غير مدعوم من السياق أو الخوارزمية المحددة [SWS_CRYPT_23613]، [SWS_CRYPT_50047].

تم إنشاء هذا الدليل بواسطة مساعد ذكاء اصطناعي استنادًا إلى متطلبات المواصفة.

خريطة الأعضاء

مخطط الفئة

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

عرض التفاصيل

اختر عنصرًا من المخطط.

الدوال الأعضاء

Cancel دالة

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 دالة

Finalize the encryption/decryption without returning an IV.

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

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 دالة

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 دالة 2

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

التحميلات الزائدة 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 دالة 2

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

التحميلات الزائدة 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 دالة

Encrypt or decrypt a data buffer.

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

أسماء الأنواع البديلة

Sptr اسم نوع بديل

Smart pointer of the interface.

توثيق الدوال

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 0bea3f0e1d0d المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُستخدم الطريقة المتزامنة Cancel() للفئة ara::crypto::cryp::SymmetricCipherCtx للإلغاء المبكر لعملية دفق قيد التشغيل، والتي بدأت سابقًا باستخدام Start() ولم تنتهِ بعد [SWS_CRYPT_50046]. تم التصريح عن الواجهة بدون معلمات في ara/crypto/cryp/symmetric_cipher_ctx.h وتُرجع ara::core::Result<void> فارغًا عند التنفيذ بنجاح [SWS_CRYPT_50046].

إذا لم تبدأ معالجة البيانات مسبقًا من خلال استدعاء Start()، تفشل العملية برمز الخطأ المحدد ara::crypto::CryptoErrc::kProcessingNotStarted ودلالة التراجع [SWS_CRYPT_50046]. بالنسبة لسياق الاستدعاء، تضمن المواصفة الأمان الخيطي (thread-safe) بالإضافة إلى الأمان من حيث الاستثناءات (exception safe) مع التصريح noexcept [SWS_CRYPT_50046]. تفسير: بناءً على دلالة التراجع، من المرجح أن يعود الكائن بعد الإلغاء إلى حالة ابتدائية جاهزة. سؤال Q-b6deb8db5367acc5 (مفتوح)

تم تحديد هذا النمط الوظيفي بشكل متسق عبر جميع سياقات الدفق التشفيرية في AUTOSAR Adaptive. تنطبق بصمات ودلالات أخطاء متطابقة على فئات السياق VerifierPublicCtx ([SWS_CRYPT_50023])، MessageAuthnCodeCtx ([SWS_CRYPT_50027])، SignerPrivateCtx ([SWS_CRYPT_50041])، HashFunctionCtx ([SWS_CRYPT_50058])، DecryptorPrivateCtx ([SWS_CRYPT_50069])، AuthCipherCtx ([SWS_CRYPT_50077]) وEncryptorPublicCtx ([SWS_CRYPT_50089]).

تم تنقيح هذا النص بواسطة ذكاء اصطناعي ويستند إلى مواصفة AUTOSAR Adaptive R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#c92de419
Content hash
c92de419
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 9c4059afbb11 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام والتعامل مع المخزن المؤقت

تُجري الطريقة المتزامنة EncryptSingleCallWithOutputIv تشفيرًا متماثلًا في استدعاء واحد وتُرجع متجه التهيئة المُولّد بواسطة السياق عبر المخزن المؤقت ivOut [SWS_CRYPT_50049]. وتُمرَّر بيانات الإدخال عبر in، بينما يستقبل out البيانات المشفرة [SWS_CRYPT_50049]. وعند التنفيذ الناجح، توفر النتيجة ara::core::Result<std::size_t> الحجم الفعلي لبيانات الإخراج المُنشأة، والذي يمكن أن يكون أصغر من السعة الإجمالية لـ out [SWS_CRYPT_50049]. وإذا كانت الخوارزمية المحددة لا تتطلب متجه تهيئة، فلن تُكتب أي بيانات في ivOut [SWS_CRYPT_50049].

التفاعل والشروط المسبقة

قبل الاستدعاء، يجب تهيئة السياق عبر مفتاح مناسب [SWS_CRYPT_50049]. ولضمان توفير سعة كافية للمخزن المؤقت ivOut، يمكن تحديد طول IV المطلوب مسبقًا عبر GetOutputIvSize() [SWS_CRYPT_50143]. وإذا كانت هناك حاجة إضافية إلى المصادقة مع حساب العلامة (Tag)، فإن ara::crypto::cryp::AuthCipherCtx يوفر النظير المقابل [SWS_CRYPT_50080].

معالجة الأخطاء والتزامن

تم تحديد الواجهة على أنها آمنة تفرعيًا بالإضافة إلى كونها آمنة من الاستثناءات («exception safe»)، وتطبق دلالات التراجع عند حدوث أخطاء [SWS_CRYPT_50049]. تفسير: يُرجَّح أن تضمن دلالات التراجع هذه بقاء حالة السياق سليمة عند حدوث أخطاء وعدم بقاء أي بيانات غير مكتملة صالحةً في المخزن المؤقت. سؤال Q-841087731518d866 (مفتوح) وتشمل الأخطاء ذات الصلة ما يلي:

  • UninitializedContext: لم يتم بعد تعيين أي مفتاح للسياق [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: سعة out أو ivOut غير كافية [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUnsupported: التشفير باستدعاء أحادي (Single-Call) غير مدعوم، أو أن الخوارزمية تفرض تحديد IV دخل [SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUsageViolation أو ara::crypto::CryptoErrc::kIncompatibleObject: نوع المفتاح لا يتطابق مع التحويل أو أن استخدام المفتاح لا يسمح بتشفير البيانات [SWS_CRYPT_50049].

تم إنشاء ملاحظة الاستخدام هذه بواسطة ذكاء اصطناعي استنادًا إلى مواصفات AUTOSAR Adaptive.

دليل المنفِّذ قيد الإعداد (التعقيد 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#4bb85b99
Content hash
4bb85b99
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 041cbaba2731 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام

تُنهي الطريقة المتزامنة Finish التشفير أو فك التشفير المتماثل داخل ara::crypto::cryp::SymmetricCipherCtx دون إرجاع متجه تهيئة ([SWS_CRYPT_50045]). وهي تعالج مقطع البيانات الأخير من مخزن الإدخال المؤقت in (ReadOnlyMemRegion) وتكتب البيانات الناتجة في مخزن الإخراج المؤقت out (ReadWriteMemRegion) ([SWS_CRYPT_50045]). ويمكن الاستعلام مسبقًا عن حجم المخزن المؤقت المطلوب لذلك عبر GetRequiredOutputBufferSize() ([SWS_CRYPT_50045]). وتوفر قيمة الإرجاع من النوع ara::core::Result<std::size_t> عند النجاح العدد الدقيق للبايتات المكتوبة، والذي يمكن أن يكون أصغر من السعة الإجمالية لـ out ([SWS_CRYPT_50045]).

معالجة الأخطاء

في حالة الخطأ، تُرجع الطريقة ara::core::Result مع رموز خطأ محددة ([SWS_CRYPT_50045]):

  • ProcessingNotStarted: لم تبدأ معالجة البيانات مسبقًا بواسطة Start() ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInsufficientCapacity: المخزن المؤقت للإخراج out صغير جدًا ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: لا يمكن معالجة حجم بيانات الإدخال ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidArgument: بيانات الإدخال الممررة غير صالحة ([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kUnsupported: معالجة التدفق غير مدعومة بواسطة السياق الحالي ([SWS_CRYPT_50045]).

إذا حدث أحد أخطاء CryptoErrc، تسري دلالات التراجع ([SWS_CRYPT_50045]).

التزامن والتفاعل

تم تعريف العملية على أنها thread-safe وexception safe ([SWS_CRYPT_50045]). وقبل الاستدعاء، يجب حتمًا أن يكون التحويل قد بدأ بواسطة Start() ([SWS_CRYPT_50045]). ويمكن تحديد الحد الأقصى المسموح به لحجم الإدخال للاستدعاءات الفردية لـ Finish() عبر GetMaximumChunkSize() ([SWS_CRYPT_50050]). وبعد الإنهاء، يُرجَّح أن تنتهي دورة التحويل، ويُفترَض أن يلزم استدعاء جديد لـ Start() للعمليات الإضافية. سؤال Q-c4ffc8028e8f522b (مفتوح)

تم إنشاء هذا النص بواسطة ذكاء اصطناعي بناءً على مواصفة 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#4d4937cd
Content hash
4d4937cd
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: c0e4f2ad1bdc المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُنهي الطريقة FinishEncrypt عملية تشفير وتُرجع متجه التهيئة (IV) الذي أنشأه السياق [SWS_CRYPT_23618]. وتقوم بمعالجة المخزن المؤقت النهائي لبيانات الإدخال in وتكتب البيانات الناتجة في المخزن المؤقت للإخراج out وكذلك متجه التهيئة IV في ivOut. وتُرجع كقيمة إرجاع ara::core::Result<std::size_t> مع الحجم الفعلي لبيانات الإخراج المكتوبة، والذي قد يكون أصغر من سعة out [SWS_CRYPT_23618].

للتنفيذ الخالي من الأخطاء، يجب ضبط أبعاد المخزن المؤقت وحالة السياق مسبقًا:

  • يمكن تحديد حجم المخزن المؤقت المطلوب لـ out عبر [SWS_CRYPT_50140] مع تعيين المعامل isFinal = true. وإذا كانت أبعاد out صغيرة جدًا، يفشل الاستدعاء مع CryptoErrc::kInsufficientCapacity [SWS_CRYPT_23618].
  • يمكن الاستعلام عن الحجم المتوقع لـ ivOut عبر [SWS_CRYPT_50143].
  • يجب أن يقع حجم الإدخال لـ in بين الحدين الأدنى والأقصى المحددين بواسطة [SWS_CRYPT_50144] و [SWS_CRYPT_50050]، وإلا فسيتم إرجاع CryptoErrc::kInvalidInputSize [SWS_CRYPT_23618].

إذا لم تبدأ معالجة البيانات مسبقًا بواسطة Start()، تُبلغ الدالة CryptoErrc::kProcessingNotStarted عن [SWS_CRYPT_23618]. وإذا كان المخزن المؤقت للإدخال يحتوي على بيانات غير صالحة، يتبع ذلك CryptoErrc::kInvalidArgument [SWS_CRYPT_23618]. يحدث الخطأ CryptoErrc::kUnsupported إذا كانت المعالجة المتدفقة غير مدعومة، أو إذا كان السياق لا يستخدم IV، أو إذا تم بالفعل تمرير IV في Start() [SWS_CRYPT_23618]. تتميز جميع الأخطاء بدلالات التراجع (Rollback) [SWS_CRYPT_23618]. وفقًا للمواصفة، فإن الاستدعاء آمن بالنسبة للخيوط (thread-safe) وآمن من الاستثناءات (noexcept) [SWS_CRYPT_23618].

تم إنشاء ملاحظة الاستخدام هذه آليًا بناءً على حمولة AUTOSAR.

دليل المنفِّذ قيد الإعداد (التعقيد 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#8fe27b88
Content hash
8fe27b88
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

دالة 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#b1a73e64
Content hash
b1a73e64
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

دالة 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#4c052e2d
Content hash
4c052e2d
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

دالة 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#874ccdfc
Content hash
874ccdfc
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

دالة 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#72116011
Content hash
72116011
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

دالة 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#23a00055
Content hash
23a00055
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

دالة 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#18da0759
Content hash
18da0759
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 4a1fdc95f521 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُجري الطريقة ProcessSingleCall تشفيرًا أو فك تشفير في استدعاء متزامن واحد بدون متجه تهيئة (IV) ([SWS_CRYPT_50047]). وتُستخدَم كمعلمات إدخال مخزن البيانات المؤقت in (ReadOnlyMemRegion) واتجاه التحويل transformDirection (CryptoTransform)، بينما تُكتَب النتيجة في المخزن المؤقت out (ReadWriteMemRegion). وعند التنفيذ الناجح، تُرجع الدالة ara::core::Result<std::size_t>، الذي يحتوي على عدد البايتات المكتوبة؛ ويمكن أن تكون هذه القيمة أصغر من السعة الإجمالية للمخزن المؤقت للإخراج.

فيما يتعلق بالتزامن والأمان، تم تحديد الطريقة على أنها thread-safe وexception safe ([SWS_CRYPT_50047]). ويخضع حجم الإدخال القابل للمعالجة لـ in للحدود المحددة بواسطة السياق، والتي يمكن الاستعلام عنها عبر [SWS_CRYPT_50144] (GetMinimumChunkSize) و[SWS_CRYPT_50050] (GetMaximumChunkSize).

تتبع جميع حالات الخطأ دلالات التراجع ([SWS_CRYPT_50047]):

  • ara::crypto::CryptoErrc::kUninitializedContext: لم تتم تهيئة السياق مسبقًا عبر تعيين مفتاح.
  • ara::crypto::CryptoErrc::kUnsupported: المعالجة باستدعاء فردي غير مدعومة، أو يتطلب التحويل تعيين أو قراءة IV.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: لا يوفر المخزن المؤقت للإخراج out سعة كافية.
  • ara::crypto::CryptoErrc::kInvalidInputSize: لا يمكن للسياق معالجة حجم الإدخال.
  • ara::crypto::CryptoErrc::kUsageViolation: استخدام المفتاح لا يغطي العملية المطلوبة (kAllowDataEncryption أو kAllowDataDecryption).
  • ara::crypto::CryptoErrc::kIncompatibleObject أو kEmptyKeySlot أو kInvalidArgument أو kBusyResource: المفتاح غير متوافق، أو منفذ المفتاح فارغ، أو بيانات الإدخال غير صالحة، أو الموارد المطلوبة مشغولة.

في إطار التفاعل مع واجهات أخرى، يتطلب الاستدعاء سياقًا مهيأ بالكامل؛ ولشفرات المصادقة مع معالجة إضافية للعلامات (Tag)، تتوفر الواجهة البديلة [SWS_CRYPT_50078] في AuthCipherCtx.

تم إنشاء ملاحظة الاستخدام هذه تلقائيًا بناءً على مواصفة AUTOSAR.

دليل المنفِّذ قيد الإعداد (التعقيد 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#013365b0
Content hash
013365b0
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: f491c775eb62 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُجري الطريقة ProcessSingleCallWithInputIv في ara::crypto::cryp::SymmetricCipherCtx تشفيرًا أو فك تشفير متماثلًا للبيانات في استدعاء متزامن واحد (Single-Call) [SWS_CRYPT_50048]. ويتم في هذا السياق تمرير متجه التهيئة المستخدم للتحويل صراحةً عبر المخزن المؤقت للإدخال iv.

الاستخدام والتكامل

يتم التحكم عبر transformDirection فيما إذا كان سيتم تشفير أو فك تشفير البيانات من in. وتُكتب النتيجة في المخزن المؤقت out. ويحتوي كائن ara::core::Result<std::size_t> المُرجع على العدد الفعلي للبايتات المكتوبة، والذي يمكن أن يقل عن السعة الإجمالية لـ out [SWS_CRYPT_50048].

تتوفر دوال مساعدة لتحديد أبعاد المخازن المؤقتة:

  • يمكن حساب حجم المخزن المؤقت المطلوب لـ out مسبقًا عبر GetRequiredOutputBufferSize باستخدام المعلمة isFinal = true [SWS_CRYPT_50140].
  • يمكن تحديد الطول المسموح به لـ iv لاتجاه التحويل المحدد عبر GetMinimumInputIvSize [SWS_CRYPT_50141] وكذلك GetMaximumInputIvSize [SWS_CRYPT_50142].
  • إذا كان إنشاء علامة المصادقة أو التحقق منها مطلوبًا بالإضافة إلى ذلك، فيجب استخدام ara::crypto::cryp::AuthCipherCtx::ProcessSingleCallWithInputIv بدلاً من ذلك [SWS_CRYPT_50079].

معالجة الأخطاء والتزامن

تم تعريف العملية على أنها thread-safe وexception safe [SWS_CRYPT_50048]. وتتمتع كافة الأخطاء بدلالات التراجع:

  • CryptoErrc::kUninitializedContext أو CryptoErrc::kEmptyKeySlot: لم يتم تعيين مفتاح للسياق أو أن KeySlot فارغ [SWS_CRYPT_50048].
  • CryptoErrc::kUsageViolation: المفتاح لا يسمح بالاتجاه المحدد (kAllowDataEncryption أو kAllowDataDecryption مفقود) [SWS_CRYPT_50048].
  • CryptoErrc::kIncompatibleObject: نوع المفتاح غير متوافق مع التحويل [SWS_CRYPT_50048].
  • CryptoErrc::kInsufficientCapacity: المخزن المؤقت للإخراج out صغير جدًا [SWS_CRYPT_50048].
  • CryptoErrc::kInvalidInputSize أو CryptoErrc::kInvalidArgument: حجم المخزن المؤقت لـ in أو محتواه غير صالح [SWS_CRYPT_50048].
  • CryptoErrc::kUnsupported: المعالجة باستدعاء فردي أو متجهات التهيئة للإدخال غير مدعومة [SWS_CRYPT_50048].
  • CryptoErrc::kBusyResource: أحد الموارد المطلوبة قيد الاستخدام [SWS_CRYPT_50048].

أُنشئ هذا النص بواسطة ذكاء اصطناعي وهو مخصص لتقديم الدعم عند استخدام عنصر المواصفة.

دليل المنفِّذ قيد الإعداد (التعقيد 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#e11e28c0
Content hash
e11e28c0
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 2287fbd40f75 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُعيّن الطريقة Seek للواجهة ara::crypto::cryp::SymmetricCipherCtx موضع البايت التالي المراد معالجته داخل تدفق البيانات [SWS_CRYPT_23613]. يُرجح أن يتم الاستدعاء بشكل متزامن نظرًا لعدم وجود أنواع إرجاع غير متزامنة مثل الكائنات المستقبلية (Futures). سؤال Q-fccf732722263f60 (مفتوح)

الاستخدام

يتم التحكم في تحديد الموضع عبر معلمتين [SWS_CRYPT_23613]:

  • offset: إزاحة البايت في تدفق البيانات، منسوبة إما إلى بداية التدفق أو إلى الموضع الحالي [SWS_CRYPT_23613].
  • fromBegin: نقطة مرجعية لتحديد الموضع؛ حيث يشير true إلى الإزاحة من بداية التدفق، و false بالنسبة إلى الموضع الحالي [SWS_CRYPT_23613].

تم الإعلان عن الدالة كـ noexcept وتُرجع ara::core::Result<void>، والذي يشير إلى الإنجاز الناجح أو يحتوي على كائن خطأ قد حدث [SWS_CRYPT_23613].

التزامن والقيود

وفقًا للمواصفة، تم تصنيف Seek على أنها آمنة من الاستثناءات (exception safe) وآمنة بالنسبة للخيوط (thread-safe) [SWS_CRYPT_23613]. ويشترط للتنفيذ أن تكون معالجة البيانات قد بدأت مسبقًا عن طريق استدعاء Start() [SWS_CRYPT_23613].

معالجة الأخطاء

تخضع جميع حالات الخطأ لدلالات تراجع محددة (rollback_semantics)، بحيث تظل الحالة الداخلية متسقة عند حدوث أخطاء [SWS_CRYPT_23613]:

  • ara::crypto::CryptoErrc::kUnsupported: عملية Seek غير مدعومة من قِبل السياق التشفيري الحالي [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kProcessingNotStarted: لم تبدأ معالجة البيانات مسبقًا عبر Start() [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kOutOfBounds: الإزاحة الناتجة صغيرة جدًا أو كبيرة جدًا بالنسبة لتدفق البيانات [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kInvalidArgument: الإزاحة الناتجة غير محاذاة لحدود الكتلة، على الرغم من أن السياق يتطلب محاذاة الكتل [SWS_CRYPT_23613].

تم إنشاء هذا النص بواسطة ذكاء اصطناعي.

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#089473ba
Content hash
089473ba
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 72406ca015ea المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُهيئ الطريقة الافتراضية البحتة SetKey مثيل ara::crypto::cryp::SymmetricCipherCtx بحيث يستخدم للعمليات التشفيرية المستقبلية المفتاح من KeySlot الممرر [SWS_CRYPT_50043].

الاستخدام وسياق الاستدعاء

يتم الاستدعاء بشكل متزامن ويستقبل كمعلمة keySlot كائن KeySlot::Sptr يحتوي على SymmetricKey [SWS_CRYPT_50043]. وقيمة الإرجاع هي ara::core::Result<void> تشير إلى النجاح أو تنقل رمز خطأ في حالة الفشل [SWS_CRYPT_50043]. ويؤدي التكوين إلى عدم استخدام المفتاح المخزن في المنفذ إلا في الوقت الذي يبدأ فيه التشفير أو فك التشفير الفعلي [SWS_CRYPT_50043].

معالجة الأخطاء

في حالة الخطأ، لا يتم إطلاق أي استثناء (تم تحديد الطريقة على أنها noexcept وexception safe)، بل يتم إرجاع رمز خطأ بدلالات التراجع [SWS_CRYPT_50043]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: كائن KeySlot الممرر غير متوافق مع سياق التشفير [SWS_CRYPT_50043].
  • ara::crypto::CryptoErrc::kUnsupported: يدعم تنفيذ السياق حصريًا تعيين مفتاح مباشر (مثل SymmetricKey) ولا يدعم التعيين عبر KeySlot [SWS_CRYPT_50043].

التزامن والتفاعل

تم تصنيف الطريقة على أنها thread-safe [SWS_CRYPT_50043]. تفسير: يُرجَّح ألا تتم القراءة الفعلية لمادة المفتاح إلا عند بدء التشفير أو فك التشفير، بحيث يجب أن يظل المنفذ متسقًا حتى بدء التحويل. سؤال Q-799125800ab0f93c (مفتوح) ويتوافق مفهوم تكوين السياقات عبر KeySlot::Sptr بدلاً من كائنات المفاتيح المباشرة مع النمط الموحد لسياقات التشفير ذات الصلة، ومن بينها KeyDerivationFunctionCtx [SWS_CRYPT_50010]، وMessageAuthnCodeCtx [SWS_CRYPT_50026]، وSymmetricKeyWrapperCtx [SWS_CRYPT_50034]، بالإضافة إلى VerifierPublicCtx [SWS_CRYPT_50018].

تم إنشاء هذا النص بواسطة ذكاء اصطناعي بناءً على مواصفة AUTOSAR Adaptive R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#62bbe1ca
Content hash
62bbe1ca
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 7e5086bb8751 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام

تُستخدم الطريقة SetKey لتهيئة نسخة من ara::crypto::cryp::SymmetricCipherCtx لاستخدام مفتاح متماثل تم تمريره [SWS_CRYPT_50138]. كمعلمة إدخال، تقبل الدالة المفتاح المراد استخدامه كمؤشر ذكي key من النوع SymmetricKey::Sptr. يتم الاستدعاء بشكل متزامن ويُرجع ara::core::Result<void>، والذي يكون فارغًا عند التعيين الناجح أو يوفر رمز خطأ في حالة حدوث خطأ [SWS_CRYPT_50138]. تم تضمين التصريح عبر الترويسة ara/crypto/cryp/symmetric_cipher_ctx.h.

معالجة الأخطاء

تضمن معالجة الأخطاء دلالات التراجع (Rollback)، بحيث يظل السياق في حالته السابقة عند فشل التعيين [SWS_CRYPT_50138]. تم تحديد خطأين محددين:

  • ara::crypto::CryptoErrc::kUnsupported: يحدث عندما يدعم السياق حصريًا تعيين مفتاح عبر KeySlot [SWS_CRYPT_50138].
  • ara::crypto::CryptoErrc::kIncompatibleObject: يتم إرجاعه عندما يكون كائن المفتاح الذي تم تمريره غير متوافق مع السياق [SWS_CRYPT_50138].

التزامن والتفاعل

تم تعريف الدالة الافتراضية كـ noexcept، وتُعتبر Exception-safe وتُنَفَّذ وفقًا للمواصفة على أنها thread-safe [SWS_CRYPT_50138]. توجد واجهات مماثلة لتعيين SymmetricKey::Sptr في سياقات تشفير ذات صلة مثل AuthCipherCtx [SWS_CRYPT_23911] وكذلك SymmetricKeyWrapperCtx [SWS_CRYPT_24018]. يوضح التفاعل مع حاويات المفاتيح أيضًا فئات السياق التي تقبل KeySlot::Sptr كبديل [SWS_CRYPT_50034].

تم إنشاء ملاحظة الاستخدام هذه تلقائيًا بناءً على مواصفة AUTOSAR R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#e1f7a83e
Content hash
e1f7a83e
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 33beff56357b المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام

تُهيئ الطريقة Start السياق ara::crypto::cryp::SymmetricCipherCtx لعملية تشفير أو فك تشفير متزامنة جديدة وتُعيّن متجه التهيئة (IV) المطابق أو قيمة Nonce [SWS_CRYPT_23625]. يتم تحديد اتجاه التحويل عبر المعلمة transformDirection، بينما يوفر iv متجه التهيئة كـ ReadOnlyMemRegion [SWS_CRYPT_23625]. يمكن الاستعلام عن الحجم المسموح به للمخزن المؤقت مسبقًا عبر الطريقتين GetMinimumInputIvSize() و GetMaximumInputIvSize() [SWS_CRYPT_23625]. يُرجع الاستدعاء ara::core::Result<void>، وتم الإعلان عنه كـ noexcept ويُعتبر آمنًا من الاستثناءات (exception safe) [SWS_CRYPT_23625].

معالجة الأخطاء

في حالة الخطأ، يُعاد رمز خطأ مع دلالات التراجع [SWS_CRYPT_23625]:

  • ara::crypto::CryptoErrc::kUninitializedContext: لم تتم تهيئة السياق مسبقًا عن طريق تعيين مفتاح [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم IV المُمرر غير مدعوم [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUnsupported: تعيين IV في اتجاه التحويل المحدد أو المعالجة التدفقية غير مدعوم من قِبل السياق [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إن KeySlot الذي تم تكوينه فارغ حاليًا [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUsageViolation: لا يشمل الاستخدام المسموح به للمفتاح kAllowDataEncryption للتشفير أو kAllowDataDecryption لفك التشفير [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kIncompatibleObject: نوع المفتاح غير متوافق مع التحويل أو اتجاه التحويل [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kBusyResource: أحد الموارد المطلوبة قيد الاستخدام [SWS_CRYPT_23625].

التزامن والتفاعل

تم تحديد الدالة على أنها آمنة بالنسبة للخيوط (thread-safe) [SWS_CRYPT_23625]. في مسار المعالجة التدفقية، يعمل Start كخطوة بادئة، تليها على سبيل المثال عمليات تحديد الموضع عبر Seek [SWS_CRYPT_23613] أو الإنهاء عبر FinishEncrypt [SWS_CRYPT_23618].

تم إنشاء هذا النص بواسطة نظام ذكاء اصطناعي بناءً على مواصفة AUTOSAR R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#55837b43
Content hash
55837b43
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 09affb4844e4 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام

تُهيئ الطريقة Start مثيلًا من ara::crypto::cryp::SymmetricCipherCtx بشكل متزامن لعملية تشفير أو فك تشفير قادمة ([SWS_CRYPT_50044]). وتُستخدم عندما لا يكون متجه التهيئة (IV) ضروريًا لاتجاه التحويل المحدد عبر المعلمة transformDirection، أو عندما يُنشئه السياق بنفسه ([SWS_CRYPT_50044]). أما إذا كان السياق يتطلب IV صريحًا في الاتجاه المحدد، فيجب استدعاء التحميل الزائد (overload) المزود بمعلمة IV [SWS_CRYPT_23625].

معالجة الأخطاء والتزامن

حُددت العملية بأنها آمنة بالنسبة للخيوط (Thread-sicher) وآمنة من الاستثناءات (Exception-sicher) ([SWS_CRYPT_50044]). وعند حدوث خطأ، تُرجع الدالة ara::core::Result<void> مع دلالات التراجع ([SWS_CRYPT_50044]). أسباب الأخطاء ذات الصلة هي:

  • ara::crypto::CryptoErrc::kUninitializedContext: لم يتم تعيين مفتاح للسياق مسبقًا ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUnsupported: معالجة التدفق غير مدعومة أو أن العملية تتطلب حتمًا تعيين IV في هذا الاتجاه ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUsageViolation: لا يمتلك المفتاح الإذن المطلوب kAllowDataEncryption أو kAllowDataDecryption ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kIncompatibleObject أو ara::crypto::CryptoErrc::kEmptyKeySlot: نوع المفتاح لا يتطابق مع التحويل أو أن موضع المفتاح المكوّن فارغ ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kBusyResource: هناك مورد مطلوب مشغول حاليًا ([SWS_CRYPT_50044]).

تفاعل

بعد نجاح التهيئة، يمكن تحديد موضع تدفق البيانات عند الحاجة عبر Seek ([SWS_CRYPT_23613]). إذا تم تحديد IV بواسطة السياق نفسه، فسيتم تسليمه إلى المتصل في نهاية التشفير عبر FinishEncrypt ([SWS_CRYPT_23618]).

تم إنشاء ملاحظة الاستخدام هذه تلقائيًا بناءً على مواصفة AUTOSAR R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#977ccbe3
Content hash
977ccbe3
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

دالة 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.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 5cb4a9bba31d المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُستخدم الطريقة المتزامنة Update() في ara::crypto::cryp::SymmetricCipherCtx لتشفير أو فك تشفير تدفقات البيانات الجزئية تدريجيًا [SWS_CRYPT_50139]. وهي تعالج مخزن إدخال مؤقتًا in (من النوع ReadOnlyMemRegion) يحتوي على نص صريح أو نص مشفر وتكتب البيانات المحولة في مخزن الإخراج المؤقت out (من النوع ReadWriteMemRegion) [SWS_CRYPT_50139]. في حالة النجاح، توفر قيمة الإرجاع ara::core::Result<std::size_t> العدد الدقيق للبايتات المكتوبة فعليًا في out، والتي قد تكون أقل من السعة الإجمالية للمخزن المؤقت المستهدف [SWS_CRYPT_50139].

تنطبق شروط مسبقة وقواعد مخازن مؤقتة محددة على الاستدعاء:

  • تسلسل التنفيذ: يجب بالضرورة بدء معالجة البيانات مسبقًا باستخدام الطريقة Start()؛ وإلا سيفشل الاستدعاء مع ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50139].
  • تحجيم المخزن المؤقت: يمكن تحديد الحد الأقصى لحجم الإدخال المسموح به لكل استدعاء فردي عبر GetMaximumChunkSize() [SWS_CRYPT_50050]؛ وتستجيب الطريقة لأحجام المخازن المؤقتة غير الصالحة بـ ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50139]. يمكن الاستعلام عن مخزن الإخراج المؤقت المطلوب عبر GetRequiredOutputBufferSize() [SWS_CRYPT_50139]؛ ويؤدي استخدام مخزن مؤقت صغير جدًا إلى ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50139].
  • دعم الدفق: إذا كان السياق المحدد لا يدعم المعالجة المستمرة للدفق، فسيفشل الاستدعاء مع ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50139].

تم تحديد الواجهة كـ thread-safe وexception safe، وتضمن دلالات التراجع عند حدوث أي خطأ [SWS_CRYPT_50139]. تتفاعل الواجهة في دورة المعالجة مع GetMaximumChunkSize() بالإضافة إلى العمليات الختامية مثل Finish() أو FinishEncrypt() [SWS_CRYPT_50050].

تم توليد إشعار الاستخدام هذا آليًا استنادًا إلى مواصفة 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#0ece9493
Content hash
0ece9493
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

توثيق أسماء الأنواع البديلة

اسم نوع بديل 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#27e3ffaa
Content hash
27e3ffaa
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