DEENESPTFRRUARHIKOZHNL

클래스 ara::crypto::cryp::SymmetricKeyWrapperCtx

[SWS_CRYPT_24000] Upstream: RS_CRYPTO_02104, RS_CRYPTO_02208

class SymmetricKeyWrapperCtx :               public CryptoContext {...};

Context of a symmetric key wrap algorithm.

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

사용자 가이드AI 생성

대칭 키 암호화를 통해 키를 안전하게 패키징 및 언패키징할 수 있도록 지원합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 16126e8d9692 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

대칭 키 암호화를 통해 키를 안전하게 패키징 및 언패키징할 수 있도록 지원합니다.

컨텍스트 SymmetricKeyWrapperCtx은 대칭형 알고리즘을 사용한 키의 암호학적 래핑 및 언래핑에 사용됩니다. Wrap 또는 UnwrapSymmetricKey를 실행하기 전에 컨텍스트는 SetKey을 통해 호환 가능한 키 암호화 키(KEK)로 구성되어야 합니다 [SWS_CRYPT_24018]. 모든 작업은 관련된 키 객체의 적절한 사용 권한을 전제로 하며, 롤백 의미 체계를 가진 ara::core::Result를 통해 오류를 보고합니다 [SWS_CRYPT_24014]. 해당 인터페이스는 예외 안전(exception safe)하며 동시 실행을 위해 스레드 안전(thread-safe)으로 명시되어 있습니다.

컨텍스트

클래스 SymmetricKeyWrapperCtx은 AUTOSAR Adaptive Platform 내에서 대칭형 키 래핑 알고리즘(Key Wrapping)을 위한 표준화된 인터페이스를 정의합니다. 주요 책임은 내보내기 시 키를 암호학적으로 보호하고 내부 사용을 위해 래핑된 키를 복원하는 것입니다. 여기서 클래스는 주로 임시 키 객체 유형 SymmetricKey로 제공되거나 KeySlot를 통해 영구적으로 제공되는 키 암호화 키(Key Encryption Key, KEK)와 상호작용합니다 [SWS_CRYPT_24018], [SWS_CRYPT_50034]. 래핑 시 컨텍스트는 제네릭 CryptoObject를 전달받는 반면 [SWS_CRYPT_24014], 언래핑 작업은 바로 사용할 수 있는 새로운 SymmetricKey 객체를 생성하여 반환합니다 [SWS_CRYPT_24016].

수명 주기

SymmetricKeyWrapperCtx의 인스턴스는 형식화된 스마트 포인터 Sptr(std::shared_ptr<SymmetricKeyWrapperCtx>의 별칭)을 통해 관리됩니다 [SWS_CRYPT_24001]. 해당 클래스가 순수 가상 메서드를 가진 추상 인터페이스를 나타내므로, 실제 객체 생성은 담당 프로바이더 팩토리를 통해 수행될 것으로 추정됩니다. 질문 Q-7b9a1007da43ddcd (열림) 인터페이스의 모든 멤버 함수는 예외 안전(exception safe) 및 스레드 안전(thread-safe)으로 명시되어 있어 동시성 소프트웨어 컴포넌트에서 안전하게 사용할 수 있습니다 [SWS_CRYPT_24014], [SWS_CRYPT_24016].

라이프사이클 동안 컨텍스트는 두 가지 주요 단계를 거칩니다. 인스턴스화 직후에는 초기화되지 않은 상태에 있습니다. 이 단계에서는 암호화 작업 및 버퍼 계산이 kUninitializedContext 오류와 함께 실패합니다 [SWS_CRYPT_50035], [SWS_CRYPT_24014]. 호환되는 KEK 또는 KeySlot을 사용하여 SetKey을 성공적으로 호출해야만 컨텍스트가 키를 안전하게 래핑하거나 언래핑할 수 있는 작동 준비 상태로 전환됩니다 [SWS_CRYPT_24018], [SWS_CRYPT_50034].

사용 경로

키를 래핑하는 정규 흐름에는 구성, 버퍼 확인 및 실행의 조율된 시퀀스가 필요합니다. 먼저 애플리케이션은 SetKey을 통해 원하는 KEK 객체 [SWS_CRYPT_24018]로 컨텍스트를 구성하거나 해당 KeySlot를 바인딩합니다 [SWS_CRYPT_50034]. 두 번째 단계에서 애플리케이션은 GetRequiredWrappedKeyBufferSize를 통해 래핑할 대상 객체에 최대로 필요한 출력 버퍼 크기를 확인합니다 [SWS_CRYPT_50035]. 적절한 크기의 메모리 영역(ReadWriteMemRegion)이 제공된 후 Wrap 호출이 수행되며, 이는 직렬화 및 암호화된 키 데이터를 버퍼에 쓰고 정확한 바이트 수를 반환합니다 [SWS_CRYPT_24014].

Symmetrischer Key-Wrapping-Ablauf애플리케이션SymmetricKeyWrapperCtxSetKey(kek)ara::core::Result<void>GetRequiredWrappedKeyBufferSize(key)ara::core::Result<std::size_t>Wrap(key, wrappedKey)ara::core::Result<std::size_t>

시퀀스 다이어그램: 대칭형 키 래핑의 일반적인 호출 시퀀스. 출처: [SWS_CRYPT_24018], [SWS_CRYPT_50035], [SWS_CRYPT_24014]

보완적인 언래핑 과정의 경우, 애플리케이션은 SetKey을 통한 구성 후 래핑된 데이터가 포함된 입력 버퍼를 UnwrapSymmetricKey에 전달합니다 [SWS_CRYPT_24016]. 이때 새로 생성될 대칭 키에 대한 대상 알고리즘 식별자(targetAlgId) 및 허용된 사용 플래그(allowedUsage)를 명시적으로 지정해야 합니다 [SWS_CRYPT_24016].

오류 시나리오

클래스의 메서드는 롤백 의미 체계를 가진 반환 유형 ara::core::Result을 통해 오류를 알립니다. 주요 오류 시나리오는 다음과 같습니다:

  • 초기화 누락: 키 할당이 성공하기 전에 GetRequiredWrappedKeyBufferSize, Wrap 또는 UnwrapSymmetricKey가 호출되면 ara::crypto::CryptoErrc::kUninitializedContext을 반환합니다 [SWS_CRYPT_50035], [SWS_CRYPT_24014], [SWS_CRYPT_24016].
  • 사용 권한 위반: KEK를 설정할 때 최소한 kAllowKeyWrapping 또는 kAllowKeyUnwrapping 권한이 있어야 하며, 그렇지 않으면 SetKey가 ara::crypto::CryptoErrc::kUsageViolation과 함께 실패합니다 [SWS_CRYPT_24018]. Wrap의 경우 KEK에 kAllowKeyWrapping이 없거나 래핑할 객체에 kAllowSecuredExport이 없으면 마찬가지로 kUsageViolation이 발생합니다 [SWS_CRYPT_24014]. 언래핑 시 KEK가 kAllowKeyUnwrapping을 허용하는지 확인합니다 [SWS_CRYPT_24016].
  • 비호환성 및 버퍼 오류: Wrap에 대한 대상 버퍼가 너무 작으면 ara::crypto::CryptoErrc::kInsufficientCapacity이 보고됩니다 [SWS_CRYPT_24014]. 잘못된 키 형식 또는 호환되지 않는 유형은 ara::crypto::CryptoErrc::kInvalidArgument을 초래합니다 [SWS_CRYPT_24014], [SWS_CRYPT_24016]. 컨텍스트가 슬롯만 지원하거나 키 객체만 지원하는 경우, SetKey은 오류 kUnsupported을 보고합니다 [SWS_CRYPT_24018], [SWS_CRYPT_50034].
  • 리소스 충돌 및 빈 슬롯: 작업이 점유된 리소스에 접근하면 ara::crypto::CryptoErrc::kBusyResource이 반환되고, 참조된 KeySlot이 비어 있으면 ara::crypto::CryptoErrc::kEmptyKeySlot가 발생합니다 [SWS_CRYPT_24014], [SWS_CRYPT_24016].

이 가이드는 AI에 의해 작성되었으며 AUTOSAR 사양만을 기반으로 합니다.

멤버 맵

클래스 다이어그램

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

G nara__crypto__cryp__SymmetricKeyWrapperCtx465 SymmetricKeyWrapperCtx + GetRequiredWrappedKeyBufferSize() + SetKey() + UnwrapSymmetricKey() + Wrap() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__SymmetricKeyWrapperCtx465->nara__crypto__cryp__CryptoContext85

상세 보기

개요에서 항목을 선택하세요.

메서드

Calculate the maximum required size of the wrapped key output buffer depending on the key to be wrapped.

virtual ara::core::Result< std::size_t > GetRequiredWrappedKeyBuffer Size (const CryptoObject &key) const noexcept;
SetKey 함수 2

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

오버로드 SetKey 2
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_24018
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50034

Unwrap a wrapped key using the previously set key encryption key and return an SymmetricKey.

virtual ara::core::Result< SymmetricKey::Sptr > UnwrapSymmetricKey (ReadOnlyMemRegion wrappedKey, AlgId targetAlgId, AllowedUsageFlags allowedUsage) const noexcept=0;
Wrap 함수

Wrap the provided key using the previously set key encryption key.

virtual ara::core::Result< std::size_t > Wrap (CryptoObject::Sptr key, ReadWriteMemRegion wrappedKey) const noexcept=0;

타입 별칭

Sptr 타입 별칭

Smart pointer of the interface.

메서드 문서

함수 GetRequiredWrappedKeyBufferSize [SWS_CRYPT_50035] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredWrappedKeyBuffer Size (const CryptoObject &key) const noexcept;

Calculate the maximum required size of the wrapped key output buffer depending on the key to be wrapped.

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

Parameter (in)

ParameterBeschreibung
keykey to be wrapped

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_50035
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50035@rel:R25-11#04c975f2
Content hash
04c975f2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50035
Status: valid/unmigrated Version: rel:R25-11#79bcf3cd 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_50035@rel:R25-11#79bcf3cd
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_24018] 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 as key encryption key.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: d0a83598653d 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용법 및 의미론

동기 멤버 함수 SetKey는 전달된 객체 SymmetricKey::Sptr가 후속 키 작업을 위한 Key Encryption Key (KEK)로 사용되도록 ara::crypto::cryp::SymmetricKeyWrapperCtx의 인스턴스를 구성합니다 [SWS_CRYPT_24018]. 이 함수는 noexcept를 갖는 순수 가상 메서드로 명세되어 있으며, 할당이 성공한 경우 빈 ara::core::Result<void>를 반환합니다 [SWS_CRYPT_24018].

오류 처리 및 롤백

구성 중 오류가 발생하면 필수 롤백 시맨틱이 적용되어 컨텍스트 상태가 변경되지 않고 유지됩니다 [SWS_CRYPT_24018]. 가능한 오류 원인은 ara::crypto::CryptoErrc의 오류 코드를 통해 매핑됩니다:

  • kIncompatibleObject: 전달된 키 객체가 대칭 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_24018].
  • kUsageViolation: 키의 허용된 사용 범위에 kAllowKeyWrapping 또는 kAllowKeyUnwrapping가 모두 포함되어 있지 않습니다 [SWS_CRYPT_24018].
  • kUnsupported: 컨텍스트 구현이 KeySlot를 통한 키 설정만을 지원합니다 [SWS_CRYPT_24018].

동시성 및 상호 작용

이 메서드는 thread-safe 및 예외 안전(exception safe)으로 명세되어 있습니다 [SWS_CRYPT_24018]. 키가 슬롯을 통해 관리되거나 컨텍스트가 KeySlots만을 지원하는 경우, 동일한 래퍼 컨텍스트에 대해 KeySlot::Sptr를 갖는 대안 오버로드 SetKey가 존재합니다 [SWS_CRYPT_50034]. 이는 키 래핑 실행 시점에 슬롯에 저장된 키를 로드하도록 컨텍스트를 구성합니다 [SWS_CRYPT_50034].

이 사용 지침은 AUTOSAR Adaptive Platform 릴리스 R25-11 사양을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 I2)

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

Parameter (in)

ParameterBeschreibung
keythe the key encryption key (KEK) object

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 symmetric key context
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowKey Wrapping or kAllowKeyUnwrapping
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_24018
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24018@rel:R25-11#22f077fe
Content hash
22f077fe
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24018
Status: valid/unmigrated Version: rel:R25-11#5ba8abd5 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_24018@rel:R25-11#5ba8abd5
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#07e640252026-09-30
  • R20-11rel:R20-11#dc67c1dc2026-10-14
  • R21-11rel:R21-11#34c85a1a2026-10-14
  • R22-11rel:R22-11#4ead34ac2026-10-14
  • R23-11rel:R23-11#9ca31f482026-10-14
  • R24-11rel:R24-11#bb17e6102026-10-14
  • R25-11rel:R25-11#5ba8abd52026-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_50034] 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 wrapping is performed.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 30d79040bb46 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

가상 메서드 SetKey은 키 래핑이 실행되는 즉시 제공된 KeySlot에 저장된 키가 사용되도록 컨텍스트 ara::crypto::cryp::SymmetricKeyWrapperCtx을 구성합니다 [SWS_CRYPT_50034]. 호출 시 대칭 키를 포함하는 KeySlot::Sptr인 keySlot를 매개변수로 기대합니다 [SWS_CRYPT_50034]. 함수는 동기식으로 호출되며, noexcept로 선언되어 있고 ara::core::Result<void>을 반환합니다 [SWS_CRYPT_50034].

오류 처리

오류 발생 시 이 메서드는 롤백 시맨틱을 보장하고 다음 오류 결과 중 하나를 반환합니다 [SWS_CRYPT_50034]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: 전달된 keySlot이 이 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_50034].
  • ara::crypto::CryptoErrc::kUnsupported: 컨텍스트가 직접적인 SymmetricKey 설정만을 지원합니다 [SWS_CRYPT_50034].

동시성

이 작업은 스레드 안전(thread-safe)하며 보장된 예외 안전성(exception safe)을 제공합니다 [SWS_CRYPT_50034].

상호 작용

이 인터페이스는 SymmetricKeyWrapperCtx 내에서 키를 키 암호화 키(KEK)로 직접 바인딩하는 SymmetricKey::Sptr를 갖는 오버로드 SetKey의 슬롯 기반 대응부 역할을 합니다 [SWS_CRYPT_24018]. 유사한 슬롯 기반 구성 함수는 KeyDerivationFunctionCtx [SWS_CRYPT_50010], KeyEncapsulatorPublicCtx [SWS_CRYPT_50012], VerifierPublicCtx [SWS_CRYPT_50018], MessageAuthnCodeCtx [SWS_CRYPT_50026] 및 SignerPrivateCtx [SWS_CRYPT_50036]과 같은 관련 암호화 컨텍스트에서도 사용됩니다.

이 사용 지침은 AUTOSAR Adaptive R25-11 사양을 기반으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/crypto/cryp/symmetric_key_wrapper_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricKeyWrapperCtx
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 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_50034
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50034@rel:R25-11#d8793a16
Content hash
d8793a16
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50034
Status: valid/unmigrated Version: rel:R25-11#c06f6729 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_50034@rel:R25-11#c06f6729
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

함수 UnwrapSymmetricKey [SWS_CRYPT_24016] Upstream: RS_CRYPTO_02115

virtual ara::core::Result< SymmetricKey::Sptr > UnwrapSymmetricKey (ReadOnlyMemRegion wrappedKey, AlgId targetAlgId, AllowedUsageFlags allowedUsage) const noexcept=0;

Unwrap a wrapped key using the previously set key encryption key and return an SymmetricKey.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: fe87df5f5eae 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::crypto::cryp::SymmetricKeyWrapperCtx 인터페이스의 UnwrapSymmetricKey 메서드는 이전에 설정된 Key Encryption Key(KEK)를 사용하여 래핑된 키를 복호화하고 새로운 SymmetricKey 객체를 반환합니다 [SWS_CRYPT_24016]. 동기 함수는 매개변수로 보호된 키 데이터를 포함하는 입력 버퍼(wrappedKey), 대상 키의 알고리즘 식별자(targetAlgId), 그리고 해당 키의 허용된 변환 유형에 대한 비트 플래그(allowedUsage)를 전달받습니다 [SWS_CRYPT_24016].

반환 값 ara::core::Result<SymmetricKey::Sptr>은(는) 성공적인 실행 시 생성된 키에 대한 스마트 포인터를 포함하거나 롤백 의미론과 함께 오류를 알립니다 [SWS_CRYPT_24016]. 가능한 오류 원인은 다음과 같습니다:

  • InvalidArgument: 잘못된 형식이나 잘못된 버퍼 크기 등으로 인해 wrappedKey의 전달된 키 데이터를 언래핑할 수 없습니다 [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kUninitializedContext: 래퍼 컨텍스트가 아직 적절한 KEK로 초기화되지 않았습니다 [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kUsageViolation: KEK의 사용 제약으로 인해 언래핑이 금지됩니다(kAllowKeyUnwrapping의 누락) [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kUnknownIdentifier: targetAlgId에 전달된 값이 알려지지 않았거나 지원되지 않습니다 [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kIncompatibleArguments: 지정된 allowedUsage 플래그가 targetAlgId 또는 키 유형과 호환되지 않습니다 [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kBusyResource: 작업에 필요한 시스템 리소스가 현재 사용 중입니다 [SWS_CRYPT_24016].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 작업에 대해 구성된 KeySlot이 비어 있습니다 [SWS_CRYPT_24016].

이 메서드는 const 및 noexcept(으)로 선언되어 예외 안전성을 보장하며, 사양에 따라 동시 호출에 대해 thread-safe합니다 [SWS_CRYPT_24016].

이 텍스트는 AI에 의해 작성되었으며 참고용으로 제공됩니다. 사양이 표준입니다.

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

Parameter (in)

ParameterBeschreibung
wrappedKeyan input buffer that contains the wrapped key
targetAlgIdthe algId of the to be created unwrapped key
allowedUsagebit-flags that define a list of allowed transformations’ types in which the unwrapped key can be used

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricKey::Sptr >a result containing the unwrapped SymmetricKey object or an error

Fehler

FehlercodeBeschreibung
InvalidArgumentif the wrapped key data cannot be unwrapped (e.g., invalid format or size)
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by a key value
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the KEK does not include kAllowKey Unwrapping
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if targetAlgId has an unsupported value
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the targetAlgId or the key type
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 KEK 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_24016
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24016@rel:R25-11#f8e7af17
Content hash
f8e7af17
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24016
Status: valid/unmigrated Version: rel:R25-11#7d151daa 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_24016@rel:R25-11#7d151daa
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#74bd38af2026-09-30
  • R19-11rel:R19-11#8ec5b1a02026-10-14
  • R20-11rel:R20-11#496f81ad2026-10-14
  • R21-11rel:R21-11#354b26632026-10-14
  • R22-11rel:R22-11#767017ac2026-10-14
  • R23-11rel:R23-11#624822262026-10-14
  • R24-11rel:R24-11#9c4b80db2026-10-14
  • R25-11rel:R25-11#7d151daa2026-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

함수 Wrap [SWS_CRYPT_24014] Upstream: RS_CRYPTO_02201

virtual ara::core::Result< std::size_t > Wrap (CryptoObject::Sptr key, ReadWriteMemRegion wrappedKey) const noexcept=0;

Wrap the provided key using the previously set key encryption key.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 8e6ff8198c9d 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

ara::crypto::cryp::SymmetricKeyWrapperCtx 클래스(헤더 파일 ara/crypto/cryp/symmetric_key_wrapper_ctx.h)의 메서드 Wrap은(는) 이전에 설정된 키 암호화 키(Key Encryption Key)를 사용하여 제공된 키를 래핑합니다 [SWS_CRYPT_24014].

동기 함수는 다음 매개변수를 예상합니다 [SWS_CRYPT_24014]:

  • key (CryptoObject::Sptr): 래핑할 키입니다.
  • wrappedKey (ReadWriteMemRegion): 래핑된 키가 기록될 출력 버퍼입니다.

작업은 반환 값으로 ara::core::Result<std::size_t>을(를) 제공하며, 성공 시 버퍼에 기록된 래핑된 키의 바이트 수가 포함됩니다 [SWS_CRYPT_24014].

오류 처리 및 시맨틱

이 메서드는 exception safe(으)로 정의되어 있으며 오류 사례에 대해 엄격한 롤백 의미론을 구현합니다 [SWS_CRYPT_24014]. 다음 오류 상태가 보고될 수 있습니다 [SWS_CRYPT_24014]:

  • InvalidArgument: 키 객체를 래핑할 수 없습니다(예: 유효하지 않은 크기 또는 잘못된 유형으로 인해).
  • ara::crypto::CryptoErrc::kUninitializedContext: 컨텍스트가 아직 키 값으로 초기화되지 않았습니다.
  • ara::crypto::CryptoErrc::kUsageViolation: KEK의 허용된 사용에 kAllowKeyWrapping이(가) 포함되지 않거나 객체의 허용된 사용에 kAllowSecuredExport이(가) 포함되지 않습니다.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 출력 버퍼 wrappedKey이(가) 너무 작습니다.
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 현재 비어 있습니다.

동시성 및 제약사항

인터페이스는 thread-safe(으)로 명시되어 있습니다 [SWS_CRYPT_24014]. 실행을 위한 전제 조건은 사전에 초기화된 컨텍스트 및 관련된 키들의 적절한 사용 속성입니다 [SWS_CRYPT_24014].

이 사용 지침은 AUTOSAR Adaptive R25-11 명세를 바탕으로 자동 생성되었습니다.

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

Parameter (in)

ParameterBeschreibung
keythe key to be wrapped

Parameter (out)

ParameterBeschreibung
wrappedKeyan output buffer that the wrapped key will be written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing either a the number of bytes of the wrapped key or an error

Fehler

FehlercodeBeschreibung
InvalidArgumentif the key object cannot be wrapped (e.g., invalid size or type)
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by a key value
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the KEK does not include kAllowKey Wrapping or the allowed usage of the object does not include k AllowSecuredExport
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

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

Record
AUTOSAR/AP/record/SWS_CRYPT_24014
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24014@rel:R25-11#bfe0cec2
Content hash
bfe0cec2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24014
Status: valid/unmigrated Version: rel:R25-11#d59df6cf 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_24014@rel:R25-11#d59df6cf
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ac935a362026-09-30
  • R19-11rel:R19-11#b94a246e2026-10-14
  • R20-11rel:R20-11#999104362026-10-14
  • R21-11rel:R21-11#d51795ed2026-10-14
  • R22-11rel:R22-11#f7dabf992026-10-14
  • R23-11rel:R23-11#5c3c2d942026-10-14
  • R24-11rel:R24-11#90cde3442026-10-14
  • R25-11rel:R25-11#d59df6cf2026-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

타입 별칭 문서

타입 별칭 Sptr [SWS_CRYPT_24001] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<SymmetricKeyWrapperCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/symmetric_key_wrapper_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricKeyWrapperCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_24001
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24001@rel:R25-11#521f3d1e
Content hash
521f3d1e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24001
Status: valid/unmigrated Version: rel:R25-11#aef6197c 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_24001@rel:R25-11#aef6197c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#10e154c52026-09-30
  • R19-11rel:R19-11#521f46bb2026-10-14
  • R20-11rel:R20-11#0ab69c592026-10-14
  • R21-11rel:R21-11#8d463cfa2026-10-14
  • R22-11rel:R22-11#7a7fa6972026-10-14
  • R23-11rel:R23-11#4b170d372026-10-14
  • R24-11rel:R24-11#4b170d372026-10-14
  • R25-11rel:R25-11#aef6197c2026-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