함수 Decapsulate [SWS_CRYPT_21412] Upstream: RS_CRYPTO_02102, RS_CRYPTO_02108, RS_CRYPTO_02115
virtual ara::core::Result< SymmetricKey::Sptr > Decapsulate (ReadOnly MemRegion encapsulatedKey, AlgId algId, AllowedUsageFlags allowed Usage) const noexcept=0;
Decapsulate the keying data into a new SymmetricKey.
사용
클래스 ara::crypto::cryp::KeyDecapsulatorPrivateCtx의 메서드 Decapsulate은(는) 키 데이터를 새 대칭 키 객체로 동기적으로 디캡슐화하는 데 사용됩니다 [SWS_CRYPT_21412]. 이 메서드는 캡슐화된 키가 있는 메모리 영역(encapsulatedKey), 대상 알고리즘의 식별자(algId), 대상 키의 허용된 변환 유형을 정의하는 사용 플래그(allowedUsage)를 수신합니다 [SWS_CRYPT_21412]. 이 호출은 noexcept 및 exception safe(으)로 명시되어 있으며 결과를 ara::core::Result<SymmetricKey::Sptr>에 동기적으로 반환합니다 [SWS_CRYPT_21412].
오류 처리
오류 발생 시 이 함수는 롤백 시맨틱을 보장합니다 [SWS_CRYPT_21412]. 가능한 오류 원인은 다음과 같습니다:
UninitializedContext: 컨텍스트가 개인 키로 아직 초기화되지 않았습니다 [SWS_CRYPT_21412].CryptoErrc::kInvalidArgument: 입력 버퍼encapsulatedKey의 형식이 유효하지 않습니다 [SWS_CRYPT_21412].ara::crypto::CryptoErrc::kUnknownIdentifier: 전달된 식별자algId이(가) 지원되지 않습니다 [SWS_CRYPT_21412].ara::crypto::CryptoErrc::kIncompatibleArguments:allowedUsage의 플래그가algId또는 키 유형과 호환되지 않거나,algId이(가)encapsulatedKey과(와) 일치하지 않습니다 [SWS_CRYPT_21412].ara::crypto::CryptoErrc::kUsageViolation: 개인 키의 권한이kAllowKeyUnwrapping을(를) 허용하지 않습니다 [SWS_CRYPT_21412].ara::crypto::CryptoErrc::kBusyResource또는ara::crypto::CryptoErrc::kEmptyKeySlot: 필요한 리소스가 사용 중이거나 구성된 KeySlot이 현재 비어 있습니다 [SWS_CRYPT_21412].
동시성 및 제약사항
이 연산은 thread-safe이며 const(으)로 선언되어 있습니다 [SWS_CRYPT_21412]. 해석: ara::crypto::CryptoErrc::kEmptyKeySlot의 발생은 디캡슐화를 위해 구성된 KeySlot이 호출 전에 유효한 키 자료로 채워져 있어야 함을 전제로 할 것으로 추정됩니다. 질문 Q-941ed6a81c1e714c (열림)
이 사용 지침은 자동으로 생성되었으며 AUTOSAR Adaptive R25-11의 명세 데이터만을 기반으로 합니다.
| Header-Datei | #include "ara/crypto/cryp/key_decapsulator_private_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::KeyDecapsulatorPrivateCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe CryptoErrc::k rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| encapsulatedKey | an input buffer containing the encapsulated key |
| algId | the identifier of the target symmetric crypto algorithm |
| allowedUsage | the flags that define a list of allowed transformations’ types in which the target key can be used |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<SymmetricKey::Sptr > | a result containing a the decapsulated symmetric key object or an error |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| UninitializedContext | if the context was not initialized by a private key value |
| CryptoErrc::kInvalidArgument | rollback_semantics if the format of encapsulatedKey is invalid |
| ara::crypto::CryptoErrc::kUnknownIdentifier | rollback_semantics if algId has an unsupported value |
| ara::crypto::CryptoErrc::kIncompatibleArguments | rollback_semantics if the allowedUsage is incompatible with the algId or the key type |
| ara::crypto::CryptoErrc::kIncompatibleArguments | rollback_semantics if the algId is incompatible to the encapsulatedKey |
| ara::crypto::CryptoErrc::kBusyResource | rollback_semantics a required resource is busy |
| ara::crypto::CryptoErrc::kEmptyKeySlot | rollback_semantics if a KeySlot was configured that is currently is empty |
| ara::crypto::CryptoErrc::kUsageViolation | rollback_semantics if the allowed usage of the key does not include kAllowKey Unwrapping |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_21412- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_21412@rel:R25-11#2693dd4f- Content hash
2693dd4f- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21412
Status: valid/unmigrated
Version: rel:R25-11#eae42d09
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_21412@rel:R25-11#eae42d09
Recorded Revisions (8):
- R25-11
rel:R25-11#adc903502026-09-30 - R19-11
rel:R19-11#2a160e442026-10-14 - R20-11
rel:R20-11#b88e4d222026-10-14 - R21-11
rel:R21-11#5336aaad2026-10-14 - R22-11
rel:R22-11#e33519842026-10-14 - R23-11
rel:R23-11#fae6d8942026-10-14 - R24-11
rel:R24-11#807767cc2026-10-14 - R25-11
rel:R25-11#eae42d092026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문