DEENESPTFRRUARHIKOZHNL

فئة ara::crypto::cryp::KeyEncapsulatorPublicCtx

[SWS_CRYPT_21800] Upstream: RS_CRYPTO_02104, RS_CRYPTO_02209

class KeyEncapsulatorPublicCtx :                public CryptoContext {...};

Asymmetric Key Encapsulation Mechanism (KEM) Public key Context interface.

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

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

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

تُغلّف المفاتيح المتماثلة بشكل غير متماثل عبر مفاتيح عامة أو تنشئها في عملية التغليف.

تتيح الواجهة ara::crypto::cryp::KeyEncapsulatorPublicCtx آليات تغليف المفاتيح غير المتماثلة (KEM)، لحزم المفاتيح المتماثلة للتبادل الآمن أو لإعادة إنشائها مباشرةً أثناء عملية التغليف ([SWS_CRYPT_50011]). وقبل التنفيذ، يجب تهيئة السياق عبر SetKey بمفتاح عام أو فتحة وتحديد حجم الذاكرة الوسيطة للإخراج المطلوب ([SWS_CRYPT_21815]). وتتمثل القيود الأساسية في أعلام استخدام المفاتيح المطلوبة مثل kAllowKeyWrapping وكذلك أمان الخيوط الكامل لجميع العمليات.

السياق

تُعرّف الواجهة ara::crypto::cryp::KeyEncapsulatorPublicCtx السياق غير المتماثل لآليات Key Encapsulation Mechanisms (KEM) باستخدام مفتاح عام. وضمن بنية التشفير لـ AUTOSAR Adaptive، تُستخدم الفئة لتبادل المفاتيح ونقل المفاتيح بأمان. وهي تستقبل مفتاحاً غير متماثل عاماً، إما لتغليف مفتاح متماثل موجود مسبقاً ([SWS_CRYPT_21813]) أو لإنشاء مفتاح متماثل جديد وتوفيره في إطار عملية التغليف ([SWS_CRYPT_50011]). ويمكن ربط قاعدة المفتاح إما ككائن مفتاح مباشر PublicKey ([SWS_CRYPT_21815]) أو عبر فتحة محفوظة KeySlot ([SWS_CRYPT_50012]).

diag_kem_kontext Anwendung Anwendung KeyEncapsulatorPublicCtx KeyEncapsulatorPublicCtx Anwendung->KeyEncapsulatorPublicCtx SymmetricKey SymmetricKey KeyEncapsulatorPublicCtx->SymmetricKey PublicKey PublicKey PublicKey->KeyEncapsulatorPublicCtx KeySlot KeySlot KeySlot->KeyEncapsulatorPublicCtx

مخطط السياق: إدماج KeyEncapsulatorPublicCtx بين التطبيق ومصادر المفاتيح والمفاتيح الهدف. المصادر: [SWS_CRYPT_21813]، [SWS_CRYPT_21815]، [SWS_CRYPT_50011]، [SWS_CRYPT_50012]

دورة الحياة

تتم إدارة مثيلات KeyEncapsulatorPublicCtx عبر المؤشر الذكي ذي النوع المحدد KeyEncapsulatorPublicCtx::Sptr، والمعرف كـ std::shared_ptr<KeyEncapsulatorPublicCtx> ([SWS_CRYPT_21801]). ومن المرجح أن يتم إنشاء الكائن الفعلي عبر مصنع مزود فرعي للمنصة، نظراً لأن الفئة تمثل واجهة افتراضية صرفة. سؤال Q-3551020e7b9c0f0c (مفتوح)

بعد الإنشاء، يكون السياق في حالة تهيئة غير مكتملة. وطالما لم يتم تعيين مفتاح عام للسياق، تفشل استدعاءات حساب حجم الذاكرة الوسيطة ([SWS_CRYPT_50013]) وكذلك عمليات التغليف ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]) بالخطأ CryptoErrc::kUninitializedContext. وتتحقق الجاهزية للتشغيل عبر التكوين بواسطة SetKey باستخدام PublicKey::Sptr ([SWS_CRYPT_21815]) أو KeySlot::Sptr ([SWS_CRYPT_50012]). وعند تعيين KeySlot، فمن المرجح ألا تتم قراءة المفتاح العام المتضمن ديناميكياً إلا في وقت التنفيذ الفعلي للتغليف. سؤال Q-ea760070f05941d2 (مفتوح) وتعد جميع طرق السياق آمنة بالنسبة للخيوط وفقاً للمواصفة وتضمن الأمان من حيث الاستثناءات ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]، [SWS_CRYPT_50013]، [SWS_CRYPT_21815]، [SWS_CRYPT_50012]).

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

يتبع الاستخدام العملي للسياق ترتيباً محدداً يشمل ربط المفتاح، وتحديد أبعاد الذاكرة الوسيطة، وتنفيذ التغليف:

  • ربط المفتاح: يُهيئ التطبيق السياق عبر SetKey إما باستخدام PublicKey محمّل ([SWS_CRYPT_21815]) أو باستخدام KeySlot ([SWS_CRYPT_50012]).
  • تحديد أبعاد الذاكرة الوسيطة: قبل توفير الذاكرة الوسيطة للإخراج، يحدد التطبيق الحجم الأقصى المطلوب للإخراج بالبايت عبر GetRequiredOutputBufferSize(algId) ([SWS_CRYPT_50013]) للخوارزمية المتماثلة الهدف المخصصة، ويحجز ReadWriteMemRegion مناسبة.
  • تنفيذ التغليف: يختار التطبيق أحد متغيري التغليف اعتماداً على الغرض من الاستخدام:
    • توفير مفتاح موجود: يُغلّف Encapsulate(key, encapsulatedKey) كائن SymmetricKey الذي تم تمريره ويُرجع عدد البايتات المكتوبة ([SWS_CRYPT_21813]).
    • الإنشاء المستقل: ينشئ Encapsulate(algId, allowedUsage, encapsulatedKey) مفتاحاً متماثلاً جديداً وفقاً لأعلام الاستخدام المطلوبة ويُرجع زوجاً مكوناً من حجم البايت والـ SymmetricKey::Sptr الجديد ([SWS_CRYPT_50011]).
سير عملية كبسلة المفتاحالتطبيقKeyEncapsulatorPublicCtxUse Case: تهيئة مفتاح الكبسلةSetKey(key / keySlot)Result<void>Use Case: فحص حجم المخزن المؤقتGetRequiredOutputBufferSize(algId)Result<std::size_t>Use Case: Kapselungaltمفتاح موجودEncapsulate(key, memRegion)Result<std::size_t>يتم توليد مفتاح جديدEncapsulate(algId, usage, memRegion)Result<std::pair<std::size_t, SymmetricKey::Sptr>>

مخطط التتابع: تتابع الاستدعاء النموذجي من تعيين المفتاح عبر حساب الذاكرة الوسيطة حتى تغليف المفتاح. المصادر: [SWS_CRYPT_21813]، [SWS_CRYPT_21815]، [SWS_CRYPT_50011]، [SWS_CRYPT_50013]

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

تبلغ طرق KeyEncapsulatorPublicCtx عن الأخطاء عبر ara::core::Result بقيم من ara::crypto::CryptoErrc وتضمن دلالات التراجع في حالة حدوث خطأ. وتتضمن حالات الخطأ الأساسية ما يلي:

  • CryptoErrc::kUninitializedContext: يحدث عندما يتم استدعاء GetRequiredOutputBufferSize ([SWS_CRYPT_50013]) أو Encapsulate ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]) دون تكوين ناجح مسبقاً بواسطة SetKey.
  • CryptoErrc::kUsageViolation: تشير إلى استخدامات غير مسموح بها للمفتاح. يحدث هذا عندما تنقص مفتاح التغليف الراية kAllowKeyWrapping ([SWS_CRYPT_21815]، [SWS_CRYPT_21813]، [SWS_CRYPT_50011]) أو عندما لا يكون المفتاح المتماثل المطلوب تغليفه مصرحاً به للتصدير الآمن عبر kAllowSecuredExport ([SWS_CRYPT_21813]).
  • CryptoErrc::kIncompatibleObject: تدل على أن المفتاح أو المنفذ الممرر غير متوافق مع خوارزمية السياق ([SWS_CRYPT_21815]، [SWS_CRYPT_50012]، [SWS_CRYPT_21813]).
  • CryptoErrc::kInsufficientCapacity وCryptoErrc::kInvalidInputSize: يتم إطلاقهما إذا كانت ReadWriteMemRegion الممررة لا تتمتع بسعة التخزين المؤقت المطلوبة أو إذا كان حجم الإدخال للمفتاح غير مدعوم ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]).
  • CryptoErrc::kEmptyKeySlot وCryptoErrc::kBusyResource: ينشآن عندما يكون KeySlot المرتبط عبر SetKey فارغاً في وقت تنفيذ التغليف، أو عندما يكون مورد عتادي مشارك مشغولاً ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]).
  • CryptoErrc::kUnsupported: يتم إرجاعها عندما يدعم تنفيذ السياق كائنات المفاتيح حصراً بدلاً من الفتحات ([SWS_CRYPT_50012]) أو العكس ([SWS_CRYPT_21815])، أو عندما لا يكون تعيين مفاتيح خارجية أو التوليد الذاتي للمفاتيح مدعوماً في السياق ([SWS_CRYPT_21813]، [SWS_CRYPT_50011]).

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

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

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

1

مخطط الفئة

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

G nara__crypto__cryp__KeyEncapsulatorPublicCtx699 KeyEncapsulatorPublicCtx + Encapsulate() + GetRequiredOutputBufferSize() + SetKey() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__KeyEncapsulatorPublicCtx699->nara__crypto__cryp__CryptoContext85

عرض التفاصيل

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

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

Encapsulate دالة 2

Encapsulate the provided symmetric key.

التحميلات الزائدة Encapsulate 2
virtual ara::core::Result< std::size_t > Encapsulate (Symmetric Key::Sptr key, ReadWriteMemRegion encapsulatedKey) const noexcept=0; SWS_CRYPT_21813
virtual ara::core::Result< std::pair< std::size_t, SymmetricKey::Sptr > > Encapsulate (AlgId algId, AllowedUsageFlags allowedUsage, Read WriteMemRegion encapsulatedKey) const noexcept=0; SWS_CRYPT_50011

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 (AlgId algId) const noexcept;
SetKey دالة 2

Configure the context to use the provided key as encapsulation key.

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

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

Sptr اسم نوع بديل

Smart pointer of the interface.

توثيق الدوال

دالة Encapsulate [SWS_CRYPT_21813] Upstream: RS_CRYPTO_02102, RS_CRYPTO_02108, RS_CRYPTO_02115

virtual ara::core::Result< std::size_t > Encapsulate (Symmetric Key::Sptr key, ReadWriteMemRegion encapsulatedKey) const noexcept=0;

Encapsulate the provided symmetric key.

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

تُغلّف الطريقة المتزامنة Encapsulate مفتاحًا متماثلاً مُمررًا (key) وتكتب النتيجة في المخزن المؤقت للإخراج encapsulatedKey [SWS_CRYPT_21813]. عند التنفيذ بنجاح، تُرجع عبر ara::core::Result<std::size_t> الحجم بالبايت للمفتاح المغلف [SWS_CRYPT_21813].

في حالة حدوث خطأ، يتم إرجاع رمز خطأ مطابق مع دلالات تراجع [SWS_CRYPT_21813]. أسباب الخطأ ذات الصلة هي:

  • UninitializedContext: لم تتم تهيئة السياق بقيمة مفتاح عام [SWS_CRYPT_21813].
  • ara::crypto::CryptoErrc::kUsageViolation: يفتقر مفتاح التغليف إلى راية الاستخدام kAllowKeyWrapping أو يفتقر المفتاح المراد تغليفه إلى kAllowSecuredExport [SWS_CRYPT_21813].
  • ara::crypto::CryptoErrc::kIncompatibleObject أو CryptoErrc::kInvalidInputSize: كائن المفتاح غير متوافق أو أن حجم المفتاح غير مدعوم من قِبل السياق [SWS_CRYPT_21813].
  • CryptoErrc::kUnsupported: لا يدعم السياق تغليف المفاتيح المُقدَّمة، لأنه يولدها بنفسه أثناء التغليف [SWS_CRYPT_21813].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: حجم المخزن المؤقت encapsulatedKey صغير جدًا [SWS_CRYPT_21813].
  • ara::crypto::CryptoErrc::kBusyResource أو ara::crypto::CryptoErrc::kEmptyKeySlot: مورد معين مشغول أو أن KeySlot الذي تم تكوينه فارغ [SWS_CRYPT_21813].

تم الإعلان عن العملية كـ const و noexcept بالإضافة إلى تحديدها بأنها thread-safe و exception safe [SWS_CRYPT_21813].

عند التفاعل مع الوحدة، تختلف هذه الدالة عن التحميل الزائد البديل [SWS_CRYPT_50011]، والذي لا يقبل مفتاحًا موجودًا، بل يولد المفتاح المتماثل ديناميكيًا من جديد ويُرجعه مع نتيجة التغليف [SWS_CRYPT_50011].

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

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

Parameter (in)

ParameterBeschreibung
keythe symmetric key to be encapsulated

Parameter (out)

ParameterBeschreibung
encapsulatedKeyan output buffer the encapsulated key is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the encapsulated key or an error

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by a public key value
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the encapsulation key does not include k AllowKeyWrapping or if the allowed usage of the encapsulated key does not include kAllowSecuredExport
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided encapsulated key object is incompatible with this context
CryptoErrc::kInvalidInputSizerollback_semantics if this context does not support the size of the encapsulated key
CryptoErrc::kUnsupportedrollback_semantics if this context does not support setting the encapsulated key, because it generates the key during encapsulation
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 kAllowKeyWrapping

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

Record
AUTOSAR/AP/record/SWS_CRYPT_21813
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21813@rel:R25-11#6de54778
Content hash
6de54778
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21813
Status: valid/unmigrated Version: rel:R25-11#5f08acc8 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_21813@rel:R25-11#5f08acc8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b3c8ad102026-09-30
  • R19-11rel:R19-11#5df6f2a12026-10-14
  • R20-11rel:R20-11#bc53d66f2026-10-14
  • R21-11rel:R21-11#a093fad52026-10-14
  • R22-11rel:R22-11#9a52ca012026-10-14
  • R23-11rel:R23-11#dadd77c62026-10-14
  • R24-11rel:R24-11#2cf84d842026-10-14
  • R25-11rel:R25-11#5f08acc82026-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

دالة Encapsulate [SWS_CRYPT_50011] Upstream: RS_CRYPTO_02102, RS_CRYPTO_02108, RS_CRYPTO_02115

virtual ara::core::Result< std::pair< std::size_t, SymmetricKey::Sptr > > Encapsulate (AlgId algId, AllowedUsageFlags allowedUsage, Read WriteMemRegion encapsulatedKey) const noexcept=0;

Generate new a symmetric key and encapsulate it. Optionally store the generated key.

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

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

تُنشئ الدالة المتزامنة Encapsulate داخليًا مفتاحًا متماثلاً جديدًا وتُغلفه باستخدام السياق [SWS_CRYPT_50011]. وتُحدد الخوارزمية المستهدفة algId وأعلام الاستخدام المسموح بها allowedUsage للمفتاح المُنشأ كمَعلمات إدخال [SWS_CRYPT_50011]. يُكتب النص المشفر للمفتاح في المخزن المؤقت للإخراج encapsulatedKey [SWS_CRYPT_50011]. تُغلِّف القيمة المرجعة عند النجاح زوجًا يتكون من الحجم الفعلي بالبايت للمفتاح المُغلَّف ومؤشر ذكي إلى كائن المفتاح المُنشأ (std::pair<std::size_t, SymmetricKey::Sptr>) داخل ara::core::Result [SWS_CRYPT_50011].

معالجة الأخطاء والحماية

في حالة حدوث خطأ، تتمتع القيم المرجعة في الغالب بدلالات التراجع [SWS_CRYPT_50011]. وتشمل أسباب الأخطاء المحتملة ما يلي:

  • UninitializedContext: لم تتم تهيئة السياق مسبقًا بمفتاح عام [SWS_CRYPT_50011].
  • CryptoErrc::kUsageViolation: يفتقر مفتاح التغليف إلى العلم kAllowKeyWrapping أو يفتقر المفتاح المستهدف إلى kAllowSecuredExport [SWS_CRYPT_50011].
  • CryptoErrc::kInsufficientCapacity: لا يوفر المخزن المؤقت للإخراج encapsulatedKey سعة كافية [SWS_CRYPT_50011].
  • CryptoErrc::kUnknownIdentifier أو CryptoErrc::kUnsupported: algId غير معروفة أو أن الإنشاء أثناء التغليف غير مدعوم [SWS_CRYPT_50011].
  • CryptoErrc::kEmptyKeySlot أو CryptoErrc::kBusyResource: فتحة KeySlot المُكوَّنة فارغة أو أن موردًا مطلوبًا مشغول [SWS_CRYPT_50011].

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

حُددت العملية على أنها const وnoexcept وthread-safe وكذلك exception-safe [SWS_CRYPT_50011]. وبالمقارنة مع التحميل الزائد [SWS_CRYPT_21813]، الذي يُمرَّر إليه مفتاح موجود ويُرجع حجمه فقط، تُنفذ هذه الدالة توليد المفتاح وتغليفه في خطوة مشتركة واحدة [SWS_CRYPT_50011].

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

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

Parameter (in)

ParameterBeschreibung
algIdthe identifier of the target symmetric crypto algorithm
allowedUsagethe flags that define a list of allowed transformations’ types in which the target key can be used

Parameter (out)

ParameterBeschreibung
encapsulatedKeyan output buffer the encapsulated key is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::pair< std::size_t, SymmetricKey::Sptr > >a result containing a pair of the size of the encapsulated key and the generated symmetric key or an error

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by a public key value
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the encapsulation key does not include k AllowKeyWrapping or if the allowed usage of the encapsulated key does not include kAllowSecuredExport
CryptoErrc::kInvalidInputSizerollback_semantics if this context does not support the size of the encapsulated key
CryptoErrc::kUnsupportedrollback_semantics if this context does not support generating the encapsulated key during encapsulation
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId has an unsupported value
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 via SetKey that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowKeyWrapping

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50011
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50011@rel:R25-11#cde88bc8
Content hash
cde88bc8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50011
Status: valid/unmigrated Version: rel:R25-11#7f7fdb0c 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_50011@rel:R25-11#7f7fdb0c
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_50013] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (AlgId algId) 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/key_encapsulator_public_ctx.h"
Scopeclass ara::crypto::cryp::KeyEncapsulatorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdthe algId of the key to encapsulate

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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50013
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50013@rel:R25-11#4f0b6069
Content hash
4f0b6069
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50013
Status: valid/unmigrated Version: rel:R25-11#8834a17a 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_50013@rel:R25-11#8834a17a
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_21815] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

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

Configure the context to use the provided key as encapsulation key.

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

الاستخدام

تُهيئ الدالة SetKey نسخة ara::crypto::cryp::KeyEncapsulatorPublicCtx بحيث يُستخدم كائن المفتاح الممرر كمفتاح تغليف [SWS_CRYPT_21815]. وتُستخدم key من النوع PublicKey::Sptr كمعلمة [SWS_CRYPT_21815]. ويتم الاستدعاء بشكل متزامن ويُرجع كقيمة مرجعة ara::core::Result<void>، وتكون فارغة في حالة النجاح أو تنقل كود خطأ [SWS_CRYPT_21815].

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

في حالة حدوث خطأ، تتمتع جميع أكواد الأخطاء المُبلّغ عنها بدلالات تراجع (Rollback) [SWS_CRYPT_21815]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: كائن المفتاح المقدم غير متوافق مع السياق [SWS_CRYPT_21815].
  • ara::crypto::CryptoErrc::kUsageViolation: الاستخدام المسموح به للمفتاح لا يتضمن الراية kAllowKeyWrapping [SWS_CRYPT_21815].
  • ara::crypto::CryptoErrc::kUnsupported: يدعم السياق فقط تعيين مفتاح عبر KeySlot [SWS_CRYPT_21815].

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

تم تحديد الدالة كـ thread-safe وexception safe بضمان noexcept [SWS_CRYPT_21815].

تفاعل

من خلال تهيئة المفتاح، يتم إعداد السياق لتغليف المفتاح، والذي يتم تنفيذه عبر الدالة Encapsulate [SWS_CRYPT_50011]. وإذا كان السياق لا يدعم التعيين المباشر للمفتاح أو إذا كان سيتم الحصول على المفتاح من نطاق تخزين، فإن التحميل الزائد لـ SetKey مع KeySlot::Sptr متاح كبديل [SWS_CRYPT_50012].

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

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

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

Parameter (in)

ParameterBeschreibung
keythe key encapsulation key

Rückgabewert

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

Fehler

FehlercodeBeschreibung
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 kAllowKeyWrapping
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot

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

Record
AUTOSAR/AP/record/SWS_CRYPT_21815
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21815@rel:R25-11#3c4b7694
Content hash
3c4b7694
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21815
Status: valid/unmigrated Version: rel:R25-11#135664c1 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_21815@rel:R25-11#135664c1
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#97afebd22026-09-30
  • R20-11rel:R20-11#3e034d832026-10-14
  • R21-11rel:R21-11#14e868c82026-10-14
  • R22-11rel:R22-11#c056496f2026-10-14
  • R23-11rel:R23-11#4a9295802026-10-14
  • R24-11rel:R24-11#6638cae22026-10-14
  • R25-11rel:R25-11#135664c12026-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_50012] 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 key encapsulation is performed.

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

تُهيئ الدالة SetKey للفئة ara::crypto::cryp::KeyEncapsulatorPublicCtx السياق بحيث يُستخدم المفتاح العام المخزن في فتحة مفتاح مُمرَّرة (KeySlot) عند وقت كبسلة المفتاح [SWS_CRYPT_50012].

الاستخدام

يتم الاستدعاء بشكل متزامن، وهو محدد بصفة noexcept وكذلك exception safe [SWS_CRYPT_50012]. يعمل keySlot من النوع KeySlot::Sptr كمعامل، ويجب أن يحتوي على مفتاح عام [SWS_CRYPT_50012]. القيمة المرجعة هي ara::core::Result<void>، والتي لا تحتوي على أي قيمة في حالة النجاح [SWS_CRYPT_50012].

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

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

  • ara::crypto::CryptoErrc::kIncompatibleObject: عنصر keySlot الممرر غير متوافق مع هذا السياق [SWS_CRYPT_50012].
  • ara::crypto::CryptoErrc::kUnsupported: لا يدعم السياق سوى تعيين كائن PublicKey [SWS_CRYPT_50012].

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

الدالة معرَّفة بصفة thread-safe [SWS_CRYPT_50012]. وإلى جانب التعيين عبر فتحة مفتاح، يوجد تحميل زائد بديل للتمرير المباشر لـ PublicKey::Sptr [SWS_CRYPT_21815]. يُستخدم المفتاح المُهيأ بمجرد تنفيذ كبسلة المفتاح عبر Encapsulate [SWS_CRYPT_50011]. وفيما يتعلق بالترتيب، فمن المرجح أن يلزم تنفيذ SetKey قبل استدعاء Encapsulate حتى تتم تهيئة السياق. سؤال Q-769923d4fb9a3d1e (مفتوح)

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

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

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a public 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 context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a PublicKey

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50012
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50012@rel:R25-11#c432cd52
Content hash
c432cd52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50012
Status: valid/unmigrated Version: rel:R25-11#b5e332fa 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_50012@rel:R25-11#b5e332fa
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_21801] Upstream: RS_CRYPTO_02209

using Sptr = std::shared_ptr<KeyEncapsulatorPublicCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/key_encapsulator_public_ctx.h"
Scopeclass ara::crypto::cryp::KeyEncapsulatorPublicCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_21801
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21801@rel:R25-11#0eec3f62
Content hash
0eec3f62
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21801
Status: valid/unmigrated Version: rel:R25-11#6c7506e9 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_21801@rel:R25-11#6c7506e9
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d5df06eb2026-09-30
  • R19-11rel:R19-11#3a23dd282026-10-14
  • R20-11rel:R20-11#b2bfbd8b2026-10-14
  • R21-11rel:R21-11#b2bfbd8b2026-10-14
  • R22-11rel:R22-11#1b749d9b2026-10-14
  • R23-11rel:R23-11#7bb57d5b2026-10-14
  • R24-11rel:R24-11#7bb57d5b2026-10-14
  • R25-11rel:R25-11#6c7506e92026-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