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

사용자 가이드AI 생성

공개 키를 통해 대칭 키를 비대칭으로 캡슐화하거나 캡슐화 프로세스에서 이를 생성합니다.
AI 생성 미검증 모델: 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의 인스턴스는 std::shared_ptr<KeyEncapsulatorPublicCtx>(으)로 정의된 형식화된 스마트 포인터 KeyEncapsulatorPublicCtx::Sptr을(를) 통해 관리됩니다([SWS_CRYPT_21801]). 클래스가 순수 가상 인터페이스이므로 실제 객체 생성은 플랫폼의 하위 공급자 팩토리를 통해 수행될 것으로 보입니다. 질문 Q-3551020e7b9c0f0c (열림)

생성 후 컨텍스트는 불완전한 초기화 상태에 있습니다. 컨텍스트에 공개 키가 할당되지 않는 한 버퍼 크기 계산 호출([SWS_CRYPT_50013]) 및 캡슐화 연산([SWS_CRYPT_21813], [SWS_CRYPT_50011])은 CryptoErrc::kUninitializedContext 오류와 함께 실패합니다. 작동 준비 상태는 PublicKey::Sptr([SWS_CRYPT_21815]) 또는 KeySlot::Sptr([SWS_CRYPT_50012])을(를) 사용하는 SetKey 구성을 통해 설정됩니다. 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::crypto::CryptoErrc의 값을 갖는 ara::core::Result을(를) 통해 오류를 보고하며 오류 발생 시 롤백 시맨틱을 보장합니다. 주요 오류 상황은 다음과 같습니다:

  • CryptoErrc::kUninitializedContext: SetKey을(를) 통한 사전 성공적인 구성 없이 GetRequiredOutputBufferSize([SWS_CRYPT_50013]) 또는 Encapsulate([SWS_CRYPT_21813], [SWS_CRYPT_50011])이(가) 호출될 때 발생합니다.
  • 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: SetKey을(를) 통해 바인딩된 KeySlot이(가) 캡슐화 실행 시점에 비어 있거나 관련된 하드웨어 리소스가 사용 중인 경우 발생합니다([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의 사양을 기반으로 합니다.

멤버 맵

클래스 다이어그램

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.

AI 생성 미검증 모델: 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#377262b3
Content hash
377262b3
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.

AI 생성 미검증 모델: 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]. 성공 시 반환값은 ara::core::Result 내에서 캡슐화된 키의 실제 바이트 크기와 생성된 키 객체(std::pair<std::size_t, SymmetricKey::Sptr>)에 대한 스마트 포인터의 쌍을 캡슐화합니다 [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].

이 텍스트는 사양을 기반으로 AI에 의해 작성되었습니다.

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#0aaaa2d6
Content hash
0aaaa2d6
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#f38ac1e1
Content hash
f38ac1e1
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.

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

사용

메서드 SetKey은(는) 전달된 키 객체가 캡슐화 키로 사용되도록 ara::crypto::cryp::KeyEncapsulatorPublicCtx의 인스턴스를 구성합니다[SWS_CRYPT_21815]. 매개변수로는 PublicKey::Sptr 타입의 key이(가) 사용됩니다[SWS_CRYPT_21815]. 호출은 동기식으로 수행되며 성공 시 비어 있거나 오류 코드를 전달하는 ara::core::Result<void>을(를) 반환값으로 제공합니다[SWS_CRYPT_21815].

오류 처리

오류 발생 시 보고되는 모든 오류 코드는 롤백 시맨틱을 갖습니다[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].

동시성 및 제약사항

이 함수는 noexcept 보장이 있는 thread-safe 및 exception safe(으)로 지정되어 있습니다[SWS_CRYPT_21815].

상호 작용

키 구성을 통해 Encapsulate 메서드를 통해 수행되는 키 캡슐화를 위한 컨텍스트가 준비됩니다[SWS_CRYPT_50011]. 컨텍스트가 직접 키 할당을 지원하지 않거나 메모리 영역에서 키를 가져와야 하는 경우 대안으로 KeySlot::Sptr을(를) 사용하는 SetKey의 오버로드를 사용할 수 있습니다[SWS_CRYPT_50012].

이 사용 지침은 AI에 의해 생성되었으며 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#f98f9637
Content hash
f98f9637
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.

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

ara::crypto::cryp::KeyEncapsulatorPublicCtx 클래스의 메서드 SetKey은 전달된 키 슬롯(KeySlot)에 저장된 공개 키가 키 캡슐화 시점에 사용되도록 컨텍스트를 구성합니다 [SWS_CRYPT_50012].

사용

호출은 동기적으로 이루어지며 noexcept 및 exception safe로 명시되어 있습니다 [SWS_CRYPT_50012]. 공개 키를 포함해야 하는 KeySlot::Sptr 타입의 keySlot이 매개변수로 사용됩니다 [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]를 통해 키 캡슐화가 수행되는 즉시 사용됩니다. 순서와 관련하여, 컨텍스트가 초기화되도록 하려면 Encapsulate을 호출하기 전에 SetKey을 실행해야 할 것으로 보입니다. 질문 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#4f57848d
Content hash
4f57848d
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#6a4b27c5
Content hash
6a4b27c5
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