DEENESPTFRRUARHIKOZHNL

فئة ara::crypto::cryp::MessageAuthnCodeCtx

[SWS_CRYPT_22100] Upstream: RS_CRYPTO_02203

class MessageAuthnCodeCtx :           public CryptoContext {...};

Keyed Message Authentication Code Context interface definition.

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

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

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

يُستخدم للحساب والتحقق القائمين على المفاتيح لرموز مصادقة الرسائل التشفيرية (Message Authentication Codes).

تتيح الواجهة الحساب والتحقق القائمين على المفاتيح لرموز مصادقة الرسائل لأي رسائل بأي طول. بعد التهيئة بمفتاح متماثل عبر [SWS_CRYPT_22118]، يمكن معالجة خلاصات MAC إما في خطوة واحدة أو عبر أسلوب التدفق من خلال استدعاءات البدء والتحديث والإتمام. يمكن بعد ذلك استرداد نتيجة الفحص الناتجة أو مقارنتها مباشرةً بقيمة مستهدفة. جميع الدوال محددة على أنها آمنة لخيارات المعالجة المتعددة (Thread-safe) وتشير إلى العمليات الخاطئة أو سعات التخزين المؤقت غير الكافية عبر قيم إرجاع موحدة وفقًا لـ [SWS_CRYPT_22116].

السياق

تحدد الواجهة MessageAuthnCodeCtx عمليات تشفيرية لتوليد رموز مصادقة الرسائل (Message Authentication Codes، اختصارًا MAC) والتحقق منها بناءً على المفاتيح. وتسمح بالتحقق من أصالة وسلامة كميات عشوائية من البيانات سواء عبر تدفقات البيانات المتزايدة أو عبر كتل ذاكرة متجاورة فردية. وتتم إدارة الكائنات عبر نوع المؤشر الذكي الموفر Sptr [SWS_CRYPT_22101].

يظهر كل من مكونات التطبيق المستدعية وكائنات المفاتيح كشركاء تفاعل أساسيين. يمكن تهيئة السياق إما مباشرةً باستخدام كائن مفتاح متماثل SymmetricKey [SWS_CRYPT_22118] أو عبر مساحة تخزين منطقية KeySlot [SWS_CRYPT_50026]. ويتم تمرير البيانات عبر هياكل مخازن مؤقتة مثل ReadOnlyMemRegion لبيانات الإدخال وReadWriteMemRegion لخلاصات MAC المحسوبة.

دورة الحياة

يمر كائن السياق بتسلسل حالات محدد بدءًا من التهيئة وحتى توفير نتيجة MAC:

  • Uninitialized: بعد الإنشاء، لا يمتلك السياق أي مفتاح بعد ويرفض استدعاءات الحساب.
  • Configured: يتم تهيئة السياق عن طريق استدعاء SetKey() باستخدام مفتاح [SWS_CRYPT_22118] أو مخزن مفاتيح [SWS_CRYPT_50026]. وفي هذه الحالة، يمكن تنفيذ دوال الاستدعاء الفردي أو بدء جلسة تدفق.
  • Processing: يفتح استدعاء Start() بدون متجه تهيئة [SWS_CRYPT_22111] أو مع IV [SWS_CRYPT_22110] معالجة التدفق. ويتم تغذية كتل البيانات عن طريق التكرار لـ Update() [SWS_CRYPT_22113]. ومن الممكن الإلغاء عبر Cancel() [SWS_CRYPT_50027].
  • Finished: تُنهي الدالة Finish() [SWS_CRYPT_22115] الحساب. بعد ذلك، يمكن الاستعلام عن النتيجة أو مقارنتها.

تفسير: بعد الإنهاء أو الإلغاء، يُفترض أن السياق يظل في الحالة المهيأة ويمكن إعادة استخدامه لعمليات جديدة. سؤال Q-b61229b77ae88ab0 (مفتوح) تم تحديد جميع دوال الواجهة على أنها آمنة لخيارات المعالجة المتعددة (Thread-safe) وآمنة من الاستثناءات.

mac_states Uninitialized Uninitialized Configured Configured Uninitialized->Configured SetKey() Configured->Configured Generate() / Verify() Processing Processing Configured->Processing Start() Processing->Configured Cancel() Processing->Processing Update() Finished Finished Processing->Finished Finish() Finished->Processing Start() Finished->Finished GetDigest() / Compare()

مخطط الحالة: دورة الحياة وانتقالات الحالة لسياق MAC. المصادر: [SWS_CRYPT_22118]، [SWS_CRYPT_50026]، [SWS_CRYPT_22110]، [SWS_CRYPT_22111]، [SWS_CRYPT_22113]، [SWS_CRYPT_22115]، [SWS_CRYPT_50027]، [SWS_CRYPT_22116]، [SWS_CRYPT_50029]، [SWS_CRYPT_50031]

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

تدعم الواجهة مسارين نموذجيين للاستخدام: التدفق التزايدي ومعالجة الاستدعاء الفردي.

في مسار التدفق، يقوم المستدعي أولاً بربط المفتاح عبر SetKey() [SWS_CRYPT_22118]. وقبل البدء، يمكن الاستعلام عن معاملات الخوارزمية مثل حجم الـ IV الموصى به عبر GetRecommendedIvSize() [SWS_CRYPT_50135] والحجم الأقصى للكتلة المجزأة عبر GetMaximumChunkSize() [SWS_CRYPT_50033]. وبعد استدعاء Start() [SWS_CRYPT_22110]، تتم معالجة أجزاء الرسالة تباعًا بواسطة Update() [SWS_CRYPT_22113]. وبمجرد تمرير جميع البيانات، ينهي Finish() الحساب [SWS_CRYPT_22115]. بعد ذلك، يتم نسخ الخلاصة الناتجة باستخدام GetDigest() إلى مخزن مؤقت [SWS_CRYPT_22116]، ويمكن تحديد الحد الأدنى لحجمه مسبقًا عبر GetDigestSize() [SWS_CRYPT_50134]. كبديل، يسمح Compare() [SWS_CRYPT_50133] أو CompareSubspan() [SWS_CRYPT_50028] بالمقارنة المباشرة مع قيمة مرجعية متوقعة.

الحساب التدفقي لرمز مصادقة الرسائلالتطبيقMessageAuthnCodeCtxSetKey(key)Result<void>Start(iv)Result<void>loopلكل كتلة بياناتUpdate(chunk)Result<void>Finish()Result<void>GetDigest(digest)Result<size_t>

مخطط تسلسلي: مسار حساب MAC التزايدي في وضع التدفق. المصادر: [SWS_CRYPT_22118]، [SWS_CRYPT_22110]، [SWS_CRYPT_22113]، [SWS_CRYPT_22115]، [SWS_CRYPT_22116]

إذا كانت الرسالة بأكملها متوفرة بالكامل بالفعل، فيمكن إجراء الحساب دون تدفق عبر Generate() [SWS_CRYPT_50029] أو باختصار عبر GenerateSubspan() [SWS_CRYPT_50030] في خطوة واحدة. وللتحقق، تتوفر بالمثل الدوال Verify() [SWS_CRYPT_50031] وVerifySubspan() [SWS_CRYPT_50032].

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

تتم الإشارة إلى الأخطاء عبر نوع الإرجاع ara::core::Result وتغطي الأسباب التالية:

يستند دليل الفئات هذا إلى مواصفات AUTOSAR Adaptive الإصدار R25-11 للوحدة crypto.

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

مخطط الفئة

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

G nara__crypto__cryp__MessageAuthnCodeCtx845 MessageAuthnCodeCtx + Cancel() + Compare() + CompareSubspan() + Finish() + Generate() + GenerateSubspan() + GetDigest() + GetDigestSize() + GetMaximumChunkSize() + GetRecommendedIvSize() + SetKey() + Start() + Update() + Verify() + VerifySubspan() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__MessageAuthnCodeCtx845->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;
Compare دالة

Compare the size and content of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;
Finish دالة

Finish the MAC calculation.

virtual ara::core::Result< void > Finish () noexcept=0;
Generate دالة

Calculate a MAC digest and write it to the provided output buffer.

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;
GetDigest دالة

Write the calculated MAC digest into the provided output buffer.

virtual ara::core::Result< std::size_t > GetDigest (ReadWriteMemRegion digest) const noexcept=0;
GetDigestSize دالة

Get the output digest size.

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

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

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

virtual ara::core::Result< std::size_t > GetRecommendedIvSize () const noexcept=0;
SetKey دالة 2

Configure the context to use the provided key.

التحميلات الزائدة SetKey 2
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_22118
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50026
Start دالة 2

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

التحميلات الزائدة Start 2
virtual ara::core::Result< void > Start (ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_22110
virtual ara::core::Result< void > Start () noexcept=0; SWS_CRYPT_22111
Update دالة

Update the MAC calculation context by a new part of the message.

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;
Verify دالة

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;
VerifySubspan دالة

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

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

Sptr اسم نوع بديل

Smart pointer of the interface.

توثيق الدوال

دالة Cancel [SWS_CRYPT_50027] 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 · درجة الحرارة: غير قابل للتحكم · الموجّه: 53954aee5980 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُستخدم الطريقة الافتراضية الصرفة Cancel في الواجهة ara::crypto::cryp::MessageAuthnCodeCtx لإلغاء عملية دفق قيد التشغيل، كانت قد بدأت سابقًا بواسطة Start() ولم تكتمل بعد [SWS_CRYPT_50027]. يتم الاستدعاء تزامنيًا، ولا يقبل معلمات تمرير، ويُعيد في حالة النجاح ara::core::Result<void> فارغًا يؤكد الإلغاء الناجح للعملية [SWS_CRYPT_50027].

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

تشترك جميع واجهات السياق ذات الصلة لوحدة التشفير في سلوك الإلغاء المتطابق لعمليات معالجة الدفق التي لم تكتمل بعد:

  • VerifierPublicCtx للتحقق من التواقيع الرقمية [SWS_CRYPT_50023]،
  • SignerPrivateCtx لإنشاء التواقيع الرقمية [SWS_CRYPT_50041]،
  • SymmetricCipherCtx لعمليات التشفير المتماثل [SWS_CRYPT_50046]،
  • HashFunctionCtx لحساب قيم التجزئة [SWS_CRYPT_50058]،
  • DecryptorPrivateCtx لعمليات فك التشفير غير المتماثل [SWS_CRYPT_50069]،
  • AuthCipherCtx لعمليات التشفير الموثق [SWS_CRYPT_50077]، وكذلك
  • EncryptorPublicCtx لعمليات التشفير غير المتماثل [SWS_CRYPT_50089].

تفسير: من خلال إلغاء العملية غير المكتملة، يُرجح إعادة السياق إلى حالة نظيفة تتيح إعادة التهيئة لاحقًا عبر Start(). سؤال Q-a8fa5cb85c3dab50 (مفتوح)

تم توليد إشعار الاستخدام هذا آليًا استنادًا إلى مواصفة AUTOSAR Adaptive R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد I1)

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50027
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50027@rel:R25-11#d86927cb
Content hash
d86927cb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50027
Status: valid/unmigrated Version: rel:R25-11#c993fffd 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_50027@rel:R25-11#c993fffd
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

دالة Compare [SWS_CRYPT_50133] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the size and content of the calculated MAC digest against an expected value.

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

الاستخدام

تُستخدم الطريقة الافتراضية البحتة Compare للفئة ara::crypto::cryp::MessageAuthnCodeCtx لمقارنة حجم ومحتوى رمز مصادقة الرسالة (MAC) المحسوب مع ملخص متوقع [SWS_CRYPT_50133]. يتم تمرير ملخص MAC المتوقع كمعلمة عبر ReadOnlyMemRegion expected. تُرجع الدالة ara::core::Result<bool>، والذي يحتوي على true إذا تطابقت قيمة MAC المحسوبة تمامًا مع القيمة المتوقعة، وإلا false [SWS_CRYPT_50133].

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

في حالة الخطأ، يتم إرجاع رمز خطأ في كائن النتيجة، مع سريان دلالات التراجع [SWS_CRYPT_50133]:

  • ara::crypto::CryptoErrc::kProcessingNotFinished: يتم الإبلاغ عنه إذا لم يكتمل حساب الملخص مسبقًا عبر استدعاء الطريقة Finish() [SWS_CRYPT_50133].
  • ara::crypto::CryptoErrc::kInvalidInputSize: يحدث عندما يكون حجم المخزن المؤقت الممرر لملخص MAC المتوقع غير مدعوم بواسطة السياق [SWS_CRYPT_50133].

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

تم الإعلان عن الطريقة كـ const وnoexcept، وهي وفقًا للمواصفة آمنة بالنسبة للخيوط (thread-safe) وآمنة من الاستثناءات (exception safe) [SWS_CRYPT_50133]. ومن الشروط المسبقة الأساسية إتمام حساب الملخص بنجاح مسبقًا عبر Finish() [SWS_CRYPT_50133].

تفاعل

على عكس Compare، الذي يتحقق من التطابق الكامل لملخص MAC بأكمله [SWS_CRYPT_50133]، يقارن CompareSubspan في نفس السياق البتات الأكثر أهمية (most significant bits) فقط مع القيمة المتوقعة [SWS_CRYPT_50028]. بالنسبة لدوال التجزئة غير المشفرة، توجد دالة Compare تحمل نفس الاسم في ara::crypto::cryp::HashFunctionCtx [SWS_CRYPT_50154].

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the expected MAC value equals the calculated MAC value, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50133@rel:R25-11#396b05a9
Content hash
396b05a9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50133
Status: valid/unmigrated Version: rel:R25-11#0e62292d 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_50133@rel:R25-11#0e62292d
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

دالة CompareSubspan [SWS_CRYPT_50028] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

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

تُطابق الدالة المتزامنة CompareSubspan للفئة ara::crypto::cryp::MessageAuthnCodeCtx البتات الأكثر أهمية (Most Significant Bits) لقيمة MAC محسوبة بمرجع محدد مسبقًا [SWS_CRYPT_50028]. وتُمرَّر قيمة المقارنة المتوقعة عبر المَعلمة expected كـ ReadOnlyMemRegion [SWS_CRYPT_50028]. تُرجع النتيجة كـ ara::core::Result<bool> وتحتوي على true عند تطابق البتات الأكثر أهمية وfalse في حالة وجود اختلافات [SWS_CRYPT_50028].

معالجة الأخطاء وشروط التسلسل

لإجراء مقارنة صالحة، يجب أن يكتمل حساب قيمة الفحص. وإذا لم يكن هناك استدعاء سابق للدالة Finish()، يفشل الاستدعاء مع رمز الخطأ ara::crypto::CryptoErrc::kProcessingNotFinished [SWS_CRYPT_50028]. وإذا كان حجم المخزن المؤقت للمَعلمة المُمرَّرة expected غير مسموح به للإجراء المستخدم، تُبلغ الدالة عن ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50028]. ويضمن كلا النوعين من الأخطاء دلالات التراجع [SWS_CRYPT_50028].

التزامن وسياق التنفيذ

حُددت العملية على أنها noexcept (exception-safe) وصُنفت على أنها thread-safe [SWS_CRYPT_50028]. تفسير: يُرجح أن تشير السلامة المعلنة بالنسبة للخيوط إلى الحالة التي تلي إتمام Finish()، بحيث يمكن لعدة خيوط التحقق من نفس الخلاصة المحسوبة بالتوازي. سؤال Q-ac8b7ead6a5b508e (مفتوح)

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the most-significant bits of the calculated MAC equal the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50028
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50028@rel:R25-11#2470e0f4
Content hash
2470e0f4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50028
Status: valid/unmigrated Version: rel:R25-11#e7ce513a 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_50028@rel:R25-11#e7ce513a
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_22115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02203

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

Finish the MAC calculation.

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

تُنهي الطريقة Finish() الحساب الجاري لرمز مصادقة الرسائل (MAC) ضمن الواجهة MessageAuthnCodeCtx بشكل ملزم [SWS_CRYPT_22115]. يتم الاستدعاء بشكل متزامن، ولا يقبل أي معلمات، ويُرجع ara::core::Result<void>، وهو ما يمثل نتيجة فارغة في حالة النجاح العادية [SWS_CRYPT_22115].

في حالة الخطأ، تُرجع الدالة رمز الخطأ ara::crypto::CryptoErrc::kProcessingNotStarted إذا لم يكن حساب MAC قد بدأ بنجاح قبل الاستدعاء؛ مع تطبيق دلالات التراجع (Rollback) في هذا السياق [SWS_CRYPT_22115]. صُرح عن العملية بأنها noexcept، وحُددت وفقًا للمواصفة بأنها آمنة من الاستثناءات (exception safe) وآمنة بالنسبة للخيوط (thread-safe) على حد سواء [SWS_CRYPT_22115].

في سياق تدفق المعالجة، تشكل Finish() حلقة الوصل بين معالجة البيانات والتقييم: فبعد الاستدعاء، يمكن نقل خلاصة MAC الناتجة عبر GetDigest() إلى ذاكرة تخزين مؤقت مقدمة [SWS_CRYPT_22116] أو التحقق منها مباشرة بمقارنتها بقيمة مرجعية باستخدام CompareSubspan() [SWS_CRYPT_50028]. وبينما تصف GetMaximumChunkSize() [SWS_CRYPT_50033] أحجام ذاكرة التخزين المؤقت بشكل عام لـ Update() أو Finish()، فإن Finish() لا تعالج هنا أي بيانات بشكل مباشر؛ ويُرجح أن ذكرها في المتطلب يعكس نمطًا موحدًا عبر جميع سياقات التشفير. سؤال Q-79b4f4ecf3998e48 (مفتوح)

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the MAC calculation has not been started successfully.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22115@rel:R25-11#61e6ee56
Content hash
61e6ee56
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22115
Status: valid/unmigrated Version: rel:R25-11#e646e46d 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_22115@rel:R25-11#e646e46d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7d2b83f62026-09-30
  • R20-11rel:R20-11#a059cf072026-10-14
  • R21-11rel:R21-11#760e02282026-10-14
  • R22-11rel:R22-11#194848542026-10-14
  • R23-11rel:R23-11#499debd32026-10-14
  • R24-11rel:R24-11#d34af0022026-10-14
  • R25-11rel:R25-11#e646e46d2026-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

دالة Generate [SWS_CRYPT_50029] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and write it to the provided output buffer.

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

تُستخدم الدالة العضو المتزامنة Generate للفئة ara::crypto::cryp::MessageAuthnCodeCtx وفقًا لـ [SWS_CRYPT_50029] لحساب كود مصادقة الرسائل (MAC) في خطوة واحدة، وتكتب الخلاصة المحسوبة في المخزن المؤقت للإخراج المتوفر.

للاستدعاء، يتم تمرير المعاملات التالية:

  • data: بيانات الإدخال لحساب MAC كـ ReadOnlyMemRegion.
  • digest: نطاق ذاكرة الوجهة من النوع ReadWriteMemRegion، الذي ستُكتب فيه الخلاصة.
  • iv: متجه تهيئة اختياري كـ ara::core::Optional<ReadOnlyMemRegion>.

في حالة النجاح، تُرجع الدالة ara::core::Result<std::size_t> يحتوي على حجم خلاصة MAC المكتوبة بالبايت [SWS_CRYPT_50029].

في حال حدوث خطأ، يُرجع كود خطأ بدلالات التراجع [SWS_CRYPT_50029]:

  • UninitializedContext: لم تتم تهيئة السياق بعد عن طريق تعيين مفتاح.
  • ara::crypto::CryptoErrc::kUsageViolation: المفتاح المستخدم لا يمتلك علم الاستخدام المطلوب kAllowMac. تفسير: يُرجح إنشاء مفتاح متماثل مناسب وتكوينه مسبقًا عبر GenerateSymmetricKey [SWS_CRYPT_20721]. سؤال Q-d22f397bbc02487b (مفتوح)
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إن KeySlot الذي تم تكوينه فارغ حاليًا.
  • ara::crypto::CryptoErrc::kUnsupported: معالجة الاستدعاء الفردي غير مدعومة أو أن تحديد متجه التهيئة لا يتوافق مع متطلبات الخوارزمية (متجه تهيئة مفقود أو محدد بشكل غير مسموح به).
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم المخزن المؤقت لبيانات الإدخال أو لمتجه التهيئة غير مدعوم.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: المخزن المؤقت للوجهة digest صغير جدًا بالنسبة لخلاصة MAC.
  • ara::crypto::CryptoErrc::kBusyResource: أحد موارد النظام المطلوبة مشغول.

فيما يتعلق بالتزامن، تم تحديد الدالة كـ thread-safe وexception safe [SWS_CRYPT_50029]. وقد تم التصريح عنها كـ const noexcept ولا تغير حالة السياق عند التنفيذ.

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50029
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50029@rel:R25-11#40e8c83f
Content hash
40e8c83f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50029
Status: valid/unmigrated Version: rel:R25-11#66865bf3 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_50029@rel:R25-11#66865bf3
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

دالة GenerateSubspan [SWS_CRYPT_50030] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

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

تحسب الطريقة GenerateSubspan من الفئة ara::crypto::cryp::MessageAuthnCodeCtx في خطوة واحدة رمز مصادقة الرسائل (MAC) لبيانات الإدخال data وتكتب بداية خلاصة القيد المحسوبة (البايتات الأكثر أهمية، MSB) في ذاكرة التخزين المؤقت للإخراج truncatedDigest [SWS_CRYPT_50030]. عبر المعلمة الاختيارية iv، يمكن تمرير متجه تهيئة (IV) عند الحاجة [SWS_CRYPT_50030]. يُرجح أن يشير الإرجاع المباشر لـ ara::core::Result<std::size_t> إلى تنفيذ متزامن؛ وفي حال اكتمال العملية بنجاح، يُرجع عدد بايتات خلاصة MAC المكتوبة [SWS_CRYPT_50030]. سؤال Q-167c6d44b9f39fed (مفتوح)

تحدد المواصفة لحالة الخطأ دلالات التراجع (Rollback) وتنص على رموز الأخطاء التالية [SWS_CRYPT_50030]:

  • UninitializedContext: لم تتم تهيئة السياق مسبقًا عن طريق تعيين مفتاح [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إن KeySlot الذي تم تكوينه فارغ حاليًا [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUsageViolation: الاستخدام المسموح به للمفتاح لا يتضمن kAllowMac [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUnsupported: المعالجة في خطوة واحدة غير مدعومة، أو أن تكوين IV لا يتطابق مع السياق (غياب IV مطلوب أو تمرير IV غير مسموح به) [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم البيانات الممررة data أو iv غير مدعوم [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kBusyResource: أحد الموارد المطلوبة قيد الاستخدام [SWS_CRYPT_50030].

فيما يتعلق ببيئة التنفيذ، حُددت الطريقة بأنها thread-safe وتوفر الأمان من الاستثناءات (noexcept) [SWS_CRYPT_50030]. ويُعد التوفير المسبق لمفتاح يتمتع بالصلاحية المناسبة في السياق شرطًا أساسيًا للاستدعاء الخالي من الأخطاء [SWS_CRYPT_50030].

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
truncatedDigestan output data buffer that the beginning of the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50030
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50030@rel:R25-11#bcad7f49
Content hash
bcad7f49
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50030
Status: valid/unmigrated Version: rel:R25-11#10f782d6 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_50030@rel:R25-11#10f782d6
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

دالة GetDigest [SWS_CRYPT_22116] Upstream: RS_CRYPTO_02203

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

Write the calculated MAC digest into the provided output buffer.

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

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the MAC calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22116@rel:R25-11#d414cccb
Content hash
d414cccb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22116
Status: valid/unmigrated Version: rel:R25-11#0213970e 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_22116@rel:R25-11#0213970e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#f62c871b2026-09-30
  • R20-11rel:R20-11#97dd7dc32026-10-14
  • R21-11rel:R21-11#73d2dfec2026-10-14
  • R22-11rel:R22-11#086949e02026-10-14
  • R23-11rel:R23-11#c0af69462026-10-14
  • R24-11rel:R24-11#601580872026-10-14
  • R25-11rel:R25-11#0213970e2026-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

دالة GetDigestSize [SWS_CRYPT_50134] Upstream: RS_CRYPTO_02309

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

Get the output digest size.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the hash digest 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_50134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50134@rel:R25-11#fb85344d
Content hash
fb85344d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50134
Status: valid/unmigrated Version: rel:R25-11#2e6c359a 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_50134@rel:R25-11#2e6c359a
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

دالة GetMaximumChunkSize [SWS_CRYPT_50033] 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() or Finish() by this context.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50033
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50033@rel:R25-11#c2c79ae2
Content hash
c2c79ae2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50033
Status: valid/unmigrated Version: rel:R25-11#74ba2c5f 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_50033@rel:R25-11#74ba2c5f
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

دالة GetRecommendedIvSize [SWS_CRYPT_50135] Upstream: RS_CRYPTO_02309

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >default expected 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_50135
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50135@rel:R25-11#1133abc7
Content hash
1133abc7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50135
Status: valid/unmigrated Version: rel:R25-11#b1b43096 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_50135@rel:R25-11#b1b43096
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_22118] 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 key.

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

تهيئ الدالة SetKey مثيلاً من ara::crypto::cryp::MessageAuthnCodeCtx لحساب MAC اللاحق باستخدام مفتاح متماثل متوفر [SWS_CRYPT_22118]. ويتم الاستدعاء بشكل متزامن ويستقبل كائن المفتاح كمؤشر ذكي SymmetricKey::Sptr. وكنتيجة، تُرجع الدالة ara::core::Result<void>، والذي يكون فارغاً في حالة النجاح أو يغلّف رمز خطأ محدد في حالة الخطأ [SWS_CRYPT_22118].

إذا فشل التعيين، تسري دلالات التراجع التي تحافظ على الحالة السابقة للسياق [SWS_CRYPT_22118]. وتم تحديد حالات الخطأ التالية من ara::crypto::CryptoErrc:

  • kUnsupported: يدعم السياق حصرياً الربط عبر KeySlot بدلاً من كائنات المفاتيح المباشرة [SWS_CRYPT_22118].
  • kIncompatibleObject: كائن المفتاح المتماثل الممرر غير متوافق مع السياق المستهدف [SWS_CRYPT_22118].
  • kUsageViolation: رايات أذونات المفتاح لا تتضمن الاستخدام الإلزامي kAllowMac [SWS_CRYPT_22118].

فيما يتعلق بأمان التنفيذ، تم تعريف الواجهة كـ thread-safe وexception safe (مع noexcept) [SWS_CRYPT_22118]. وفي إطار التفاعل مع إدارة المفاتيح، فإنها تمثل النظير المباشر للتعيين القائم على الفتحات: إذا كان التنفيذ أو حالة الاستخدام تدعم استخدام الفتحات المستدامة، يتم استخدام التحميل الزائد لـ KeySlot::Sptr بدلاً من ذلك [SWS_CRYPT_50026].

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

دليل المنفِّذ قيد الإعداد (التعقيد I2)

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

Parameter (in)

ParameterBeschreibung
keysymmetric key object used for MAC calculation

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
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22118
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22118@rel:R25-11#2d38483e
Content hash
2d38483e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22118
Status: valid/unmigrated Version: rel:R25-11#e40511f7 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_22118@rel:R25-11#e40511f7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#c6787c932026-09-30
  • R20-11rel:R20-11#02ea3abd2026-10-14
  • R21-11rel:R21-11#a4675ce22026-10-14
  • R22-11rel:R22-11#d5224dc92026-10-14
  • R23-11rel:R23-11#5cceac172026-10-14
  • R24-11rel:R24-11#6e177cb62026-10-14
  • R25-11rel:R25-11#e40511f72026-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_50026] 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 MAC calculation is started.

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

الاستخدام

تُهيئ الدالة العضو الافتراضية SetKey للواجهة ara::crypto::cryp::MessageAuthnCodeCtx من ملف الترويسة ara/crypto/cryp/message_authn_code_ctx.h السياق لحساب Message Authentication Code (MAC) أو التحقق منه [SWS_CRYPT_50026]. تأخذ الدالة المتزامنة مؤشرًا ذكيًا keySlot من النوع KeySlot::Sptr كمعامل، والذي يوفر مفتاحًا متماثلًا، وتُرجع ara::core::Result<void> [SWS_CRYPT_50026]. يُعدّ ربط المفتاح مؤجلًا دلاليًا: فلا يُستعان بالمفتاح المودع في الفتحة إلا في الوقت الذي يبدأ فيه حساب MAC فعليًا [SWS_CRYPT_50026]. تفسير: من المرجح بالتالي أن تظل التحديثات اللاحقة لمحتوى الفتحة حتى بدء الحساب سارية المفعول. سؤال Q-d1886811d8af71e3 (مفتوح)

التزامن وأمان التنفيذ

الواجهة معرَّفة بصفة noexcept، وتضمن أمان الاستثناءات (exception safe)، وهي محددة صراحةً للاستدعاء المتزامن (thread-safe) [SWS_CRYPT_50026].

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

في حالة الخطأ، تضمن الطريقة دلالات تراجع صارمة، بحيث يُحفظ الوضع السابق للسياق بالكامل [SWS_CRYPT_50026]. يمكن أن تظهر رموز الخطأ التالية في كائن النتيجة:

  • ara::crypto::CryptoErrc::kIncompatibleObject: إن KeySlot المُمرَّر غير متوافق مع سياق المفتاح المتماثل هذا [SWS_CRYPT_50026].
  • ara::crypto::CryptoErrc::kUnsupported: لا يدعم التنفيذ الفعلي للسياق التعيين عبر KeySlot [SWS_CRYPT_50026]. في هذه الحالة، يجب بدلاً من ذلك استخدام التحميل الزائد SetKey(SymmetricKey::Sptr) للتمرير المباشر لمفتاح [SWS_CRYPT_22118].

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

دليل المنفِّذ قيد الإعداد (التعقيد I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a symmetric key

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided keySlot is incompatible with this symmetric key 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_50026
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50026@rel:R25-11#cf2fcc8e
Content hash
cf2fcc8e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50026
Status: valid/unmigrated Version: rel:R25-11#3de24834 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_50026@rel:R25-11#3de24834
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_22110] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

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

تُهيئ الطريقة Start الخاصة بـ ara::crypto::cryp::MessageAuthnCodeCtx السياق لحساب MAC جديد وتُعيّن في الوقت نفسه متجه تهيئة أو قيمة Nonce عبر المعلمة iv ([SWS_CRYPT_22110]). يُستخدم هذا على سبيل المثال في خوارزميات مثل GMAC ([SWS_CRYPT_22110]). بالنسبة للحسابات التي لا تحتوي على متجه تهيئة صريح، يتوفر كبديل التحميل الزائد الخالي من المعلمات Start() ([SWS_CRYPT_22111]).

الاستخدام والتزامن

يتم الاستدعاء بشكل متزامن ويتم تحديده كـ thread-safe بالإضافة إلى exception safe ([SWS_CRYPT_22110]). بعد الاستدعاء الناجح، يمكن تمرير أجزاء الرسالة تباعًا إلى السياق باستخدام Update ([SWS_CRYPT_22113]). يمكن عند الحاجة إلغاء عملية تدفق جارية لم تكتمل بعد عبر Cancel ([SWS_CRYPT_50027]).

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

تُرجع الطريقة ara::core::Result<void>، والتي تمتلك دلالات تراجع في حالة حدوث خطأ ([SWS_CRYPT_22110]). حالات الخطأ المحتملة هي:

  • UninitializedContext: لم يتم تعيين مفتاح للسياق مسبقًا ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إن KeySlot الذي تم تكوينه فارغ ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUsageViolation: لا تتضمن أذونات المفتاح kAllowMac ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم IV المُمرر غير مدعوم ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUnsupported: التدفق أو تعيين IV غير مدعوم من الخوارزمية أو السياق ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kBusyResource: أحد الموارد المطلوبة مشغول ([SWS_CRYPT_22110]).

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

دليل المنفِّذ قيد الإعداد (التعقيد I1)

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

Parameter (in)

ParameterBeschreibung
ivan Initialization Vector (IV) or "nonce" value

Rückgabewert

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

Fehler

FehlercodeBeschreibung
UninitializedContextif 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 streaming or the algorithm does not support setting an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22110@rel:R25-11#a67b9102
Content hash
a67b9102
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22110
Status: valid/unmigrated Version: rel:R25-11#a5427060 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_22110@rel:R25-11#a5427060
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#ce38532b2026-09-30
  • R20-11rel:R20-11#15ffee6c2026-10-14
  • R21-11rel:R21-11#a3f8962f2026-10-14
  • R22-11rel:R22-11#fad6ef962026-10-14
  • R23-11rel:R23-11#765095392026-10-14
  • R24-11rel:R24-11#55625d952026-10-14
  • R25-11rel:R25-11#a54270602026-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_22111] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation.

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

الاستخدام

تهيئ الطريقة Start() نسخة من ara::crypto::cryp::MessageAuthnCodeCtx لحساب MAC جديد [SWS_CRYPT_22111]. ولا يأخذ الاستدعاء أي معاملات ويُرجع ara::core::Result<void> [SWS_CRYPT_22111]. ومن المرجح أن يتم التنفيذ بشكل متزامن، نظرًا لتوفير كائن نتيجة مباشرةً. سؤال Q-1e6e36f4ed1176d3 (مفتوح)

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

إذا حدث خطأ أثناء التهيئة، تُطبق دلالة التراجع ويُرجع أحد رموز الخطأ التالية [SWS_CRYPT_22111]:

  • UninitializedContext: لم يتم تعيين مفتاح للسياق مسبقًا [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUnsupported: لا يدعم السياق وضع الدفق، أو تطلب الخوارزمية متجه تهيئة (IV) إلزاميًا [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kBusyResource: أحد الموارد المطلوبة قيد الاستخدام [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: فتحة مفتاح (KeySlot) مهيأة فارغة [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUsageViolation: لا يسمح المفتاح بحساب MAC دون تعيين kAllowMac [SWS_CRYPT_22111].

حُددت الدالة على أنها آمنة خيطيًا وآمنة من حيث الاستثناءات (exception safe) [SWS_CRYPT_22111].

التكامل في مسار الدفق

إذا كانت الخوارزمية تتطلب متجه تهيئة IV (مثل GMAC)، فيجب استخدام التحميل الزائد Start(ReadOnlyMemRegion iv) بدلًا من ذلك [SWS_CRYPT_22110]. وبعد الاستدعاء الناجح، يمكن تمرير بيانات الرسالة تدريجيًا عبر Update() [SWS_CRYPT_22113]. ويمكن إلغاء عملية دفق لم تكتمل بعد عبر Cancel() [SWS_CRYPT_50027].

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

دليل المنفِّذ قيد الإعداد (التعقيد I1)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support streaming or the algorithm requires setting an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22111@rel:R25-11#75e968fb
Content hash
75e968fb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22111
Status: valid/unmigrated Version: rel:R25-11#7b2a29d5 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_22111@rel:R25-11#7b2a29d5
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d8957c992026-09-30
  • R20-11rel:R20-11#93def7c72026-10-14
  • R21-11rel:R21-11#268430762026-10-14
  • R22-11rel:R22-11#55642f832026-10-14
  • R23-11rel:R23-11#8f849ff62026-10-14
  • R24-11rel:R24-11#fa181e4f2026-10-14
  • R25-11rel:R25-11#7b2a29d52026-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

دالة Update [SWS_CRYPT_22113] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;

Update the MAC calculation context by a new part of the message.

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

الاستخدام

تُستخدم الطريقة المتزامنة Update للسياق ara::crypto::cryp::MessageAuthnCodeCtx لتكملة الحساب الجاري لرمز مصادقة الرسائل (MAC) بجزء إضافي من رسالة الإدخال [SWS_CRYPT_22113]. ويتم تمرير مقطع البيانات المراد معالجته عبر المعامل data في شكل ReadOnlyMemRegion. وكقيمة إرجاع، تُرجع الدالة ara::core::Result<void> يؤكد الخطوة الوسيطة الناجحة أو يوضح سبب الخطأ في حالة حدوث خطأ [SWS_CRYPT_22113].

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

في حالة الخطأ، يتم ضمان دلالة التراجع، بحيث تظل حالة الحساب السابقة دون تغيير [SWS_CRYPT_22113]. وأسباب الخطأ المحتملة هي:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: لم يبدأ الحساب مسبقًا عن طريق استدعاء الطريقة Start() [SWS_CRYPT_22113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم كتلة البيانات الممررة غير مدعوم من قِبل السياق [SWS_CRYPT_22113].

أُعلنت الطريقة كـ noexcept وحُددت كآمنة خيطيًا وآمنة من حيث الاستثناءات (exception safe) [SWS_CRYPT_22113].

تفاعل

لتجنب أخطاء المخزن المؤقت مع ara::crypto::CryptoErrc::kInvalidInputSize، يمكن الاستعلام مسبقًا عن الحد الأقصى المسموح به لحجم الإدخال للاستدعاءات الفردية عبر الطريقة GetMaximumChunkSize() [SWS_CRYPT_50033]. وبعد المعالجة المتتالية لجميع أجزاء الرسالة، يُفترض بحسب التفسير أن يُختتم حساب وسم MAC عادةً عبر الطريقة Finish() [SWS_CRYPT_50033]. سؤال Q-7f8eaf8ebbf30d55 (مفتوح)

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

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

Parameter (in)

ParameterBeschreibung
dataa part of the input message that should be processed

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the digest calculation was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22113@rel:R25-11#b7fd3182
Content hash
b7fd3182
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22113
Status: valid/unmigrated Version: rel:R25-11#36f72b69 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_22113@rel:R25-11#36f72b69
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#fa55dfba2026-09-30
  • R20-11rel:R20-11#f6d1433b2026-10-14
  • R21-11rel:R21-11#c608c8842026-10-14
  • R22-11rel:R22-11#a558bc872026-10-14
  • R23-11rel:R23-11#67ff09652026-10-14
  • R24-11rel:R24-11#8f531e602026-10-14
  • R25-11rel:R25-11#36f72b692026-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

دالة Verify [SWS_CRYPT_50031] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

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

الاستخدام

تُستخدَم الطريقة Verify في ara::crypto::cryp::MessageAuthnCodeCtx ([SWS_CRYPT_50031]) للحساب المتزامن لخلاصة MAC عبر المخزن المؤقت للإدخال data والمقارنة المباشرة مع القيمة المتوقعة expected. واختياريًا، يمكن تمرير متجه تهيئة عبر iv. وكنتيجة، تُرجع الدالة ara::core::Result<bool>، الذي يحتوي على true إذا تطابق MAC المحسوب مع تسلسل البايتات المتوقع، وإلا false.

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

إذا فشل التحقق لأسباب بنيوية أو تشفيرية، تُرجع الطريقة ara::core::Result مع رمز خطأ مطابق ([SWS_CRYPT_50031]):

  • UninitializedContext: إذا لم تتم تهيئة السياق مسبقًا عبر تعيين مفتاح.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إذا كان KeySlot المكوّن فارغًا.
  • ara::crypto::CryptoErrc::kUsageViolation: إذا كان الاستخدام المسموح به للمفتاح لا يتضمن kAllowMac.
  • ara::crypto::CryptoErrc::kInvalidInputSize: إذا كان حجم المخزن المؤقت لـ data أو expected أو iv غير مسموح به.
  • ara::crypto::CryptoErrc::kUnsupported: إذا كان التنفيذ باستدعاء فردي غير مدعوم أو كان توفير iv لا يلبي متطلبات الخوارزمية.
  • ara::crypto::CryptoErrc::kBusyResource: في حال حدوث تعارض في الموارد.

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

تم تحديد الطريقة على أنها thread-safe وexception safe ([SWS_CRYPT_50031]). وفي حالة الخطأ، تسري دلالات التراجع (Rollback). وعلى عكس عمليات التحقق من التوقيع غير المتماثل في ara::crypto::cryp::VerifierPublicCtx ([SWS_CRYPT_24112]، [SWS_CRYPT_50024])، يعمل Verify على سياقات MAC المتماثلة. ويُرجَّح أن يكون الحجم الأقصى للمخزن المؤقت القابل للمعالجة في استدعاء فردي مقيدًا بتنفيذ السياق – قياسًا على استعلام المخزن المؤقت لدى مدققي التوقيع ([SWS_CRYPT_50025]). سؤال Q-51e7427e4e082881 (مفتوح)

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50031
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50031@rel:R25-11#1cd9e9fa
Content hash
1cd9e9fa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50031
Status: valid/unmigrated Version: rel:R25-11#36679231 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_50031@rel:R25-11#36679231
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

دالة VerifySubspan [SWS_CRYPT_50032] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

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

تُستخدم الطريقة VerifySubspan من الفئة ara::crypto::cryp::MessageAuthnCodeCtx للحساب المتزامن لخلاصة MAC والمقارنة اللاحقة لبتاتها الأكثر أهمية مع تسلسل بايتات متوقع [SWS_CRYPT_50032]. وهي تعالج بيانات الإدخال عبر data، والبتات البادئة المتوقعة عبر expected بالإضافة إلى متجه تهيئة اختياري عبر iv [SWS_CRYPT_50032]. تُرجع النتيجة كـ ara::core::Result<bool> وتشير عند التطابق الناجح إلى true، وإلا فإنها تشير إلى false [SWS_CRYPT_50032].

حُددت الواجهة بأنها noexcept، وهي exception safe وكذلك thread-safe وتطبق دلالات التراجع في حالة الخطأ [SWS_CRYPT_50032]. الاستدعاءات الفاشلة تُرجع رموز أخطاء محددة في قيمة الإرجاع [SWS_CRYPT_50032]:

  • UninitializedContext: لم تتم تهيئة السياق مسبقًا عبر تعيين مفتاح [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUsageViolation: الاستخدام المسموح به للمفتاح لا يتضمن kAllowMac [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: إن KeySlot الذي تم تكوينه فارغ حاليًا [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kInvalidInputSize: حجم البيانات الممررة، أو قيمة التحقق المتوقعة، أو IV غير مدعوم [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUnsupported: عملية الاستدعاء الفردي (Single-Call) غير مدعومة، أو أن توفير IV يتعارض مع متطلبات السياق [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kBusyResource: أحد الموارد المطلوبة قيد الاستخدام [SWS_CRYPT_50032].

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected most significant bits of the MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50032
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50032@rel:R25-11#c44a4a47
Content hash
c44a4a47
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50032
Status: valid/unmigrated Version: rel:R25-11#ff2bb246 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_50032@rel:R25-11#ff2bb246
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_22101] Upstream: RS_CRYPTO_02203

using Sptr = std::shared_ptr<MessageAuthnCodeCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22101@rel:R25-11#09ba5fde
Content hash
09ba5fde
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22101
Status: valid/unmigrated Version: rel:R25-11#3fbb9742 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_22101@rel:R25-11#3fbb9742
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#553114f32026-09-30
  • R19-11rel:R19-11#2bb7b6d02026-10-14
  • R20-11rel:R20-11#7e9953b02026-10-14
  • R21-11rel:R21-11#7e9953b02026-10-14
  • R22-11rel:R22-11#5e819bc12026-10-14
  • R23-11rel:R23-11#6def4d652026-10-14
  • R24-11rel:R24-11#6def4d652026-10-14
  • R25-11rel:R25-11#3fbb97422026-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