DEENESPTFRRUARHIKOZHNL

클래스 ara::crypto::cryp::CryptoObject

[SWS_CRYPT_20500] Upstream: RS_CRYPTO_02005

class CryptoObject :           public ara::crypto::Serializable {...};

A common interface for all cryptographic objects recognizable by the Crypto Provider.

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

사용자 가이드AI 생성

암호화 객체의 스레드 안전한 검사 및 영구 저장을 위한 공통 인터페이스 역할을 합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 156a618ba987 출처 열린 질문 (2)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

암호화 객체의 스레드 안전한 검사 및 영구 저장을 위한 공통 인터페이스 역할을 합니다.

인터페이스 ara::crypto::cryp::CryptoObject은(는) Adaptive Crypto 스택의 모든 암호화 객체에 대한 공통 추상화를 정의하고 Sptr을(를) 통해 이들의 수명 주기를 제어합니다 [SWS_CRYPT_20501]. 이 인터페이스는 알고리즘 식별자 및 사용 플래그의 스레드 안전한 판독을 가능하게 하며, WriteableKeySlot에서 키 재료의 영구적인 덮어쓰기를 지원합니다 [SWS_CRYPT_20505], [SWS_CRYPT_20517]. 저장 작업 시 롤백 시맨틱이 포함된 정의된 오류 코드가 기본 스토리지 슬롯의 데이터 무결성을 보장합니다 [SWS_CRYPT_20517].

컨텍스트

인터페이스 ara::crypto::cryp::CryptoObject는 Crypto Provider에 의해 인식되고 관리될 수 있는 모든 암호화 객체를 위한 공통 추상화를 형성합니다. 이 클래스는 ara::crypto::Serializable을 확장하며 알고리즘 식별, 사용 제한 및 영속적 저장 메커니즘과 같은 기본 속성을 정의합니다. 일반적인 상호작용 대상은 호출 애플리케이션, 이를 제공하는 Crypto Provider 및 WriteableKeySlot 인스턴스 형태의 대상 저장소입니다.

수명 주기

암호화 객체는 플랫폼 내에서 주로 공유 소유권을 통해 관리됩니다. 이를 위해 클래스는 표준 스마트 포인터 별칭 ara::crypto::cryp::CryptoObject::Sptr를 std::shared_ptr<CryptoObject> [SWS_CRYPT_20501]로 정의합니다. 구체적인 인스턴스는 Crypto Provider의 특화된 팩토리 및 로더 루틴에 의해 인스턴스화되어 이 포인터 타입을 통해 호출자에게 제공될 것으로 추정됩니다. 질문 Q-36e2bd12d7dc8b98 (열림) 인터페이스의 선언된 모든 메서드는 스레드 안전(thread-safe) 및 예외 안전(exception safe, noexcept)으로 명세되어 있어 여러 스레드에 걸쳐 안전한 동시 읽기 및 저장 접근을 보장합니다 [SWS_CRYPT_20505], [SWS_CRYPT_50092], [SWS_CRYPT_20517]. 객체 및 관련 키 자료의 해제는 마지막 Sptr 참조가 소멸되는 즉시 자동으로 수행됩니다.

사용 경로

전형적인 사용 경로는 객체의 암호화 속성 식별과 이후의 영속적 저장을 포함합니다. 먼저 애플리케이션은 GetAlgId()를 통해 객체의 알고리즘 식별자를 ara::crypto::AlgIdString로 조회합니다 [SWS_CRYPT_20505]. 이어서 GetAllowedUsage()를 통해 허용된 사용 플래그(AllowedUsageFlags)를 확인하여 [SWS_CRYPT_50092], 해당 객체가 의도한 작업에 대해 인가되었는지 확인합니다. 영구적인 저장을 위해 애플리케이션은 쓰기 가능한 키 슬롯을 Save() 메서드에 전달합니다 [SWS_CRYPT_20517]. 키 자료 및 관련 메타데이터는 이후 대상 슬롯에 저장되며, 이때 슬롯에 기존에 존재하던 데이터는 덮어써집니다 [SWS_CRYPT_20517].

CryptoObject의 검사 및 영속화애플리케이션CryptoObjectWriteableKeySlotGetAlgId()AlgIdStringGetAllowedUsage()AllowedUsageFlags (kAllowPersist)Save(keyslot)키 자료 및 메타데이터 쓰기SpeicherquittungResult<void>

시퀀스 다이어그램: KeySlot에서 암호화 객체를 검사하고 영속화하는 일반적인 절차. 출처: [SWS_CRYPT_20505], [SWS_CRYPT_50092], [SWS_CRYPT_20517].

오류 시나리오

GetAlgId() [SWS_CRYPT_20505] 및 GetAllowedUsage() [SWS_CRYPT_50092]는 표준화된 오류 코드를 지정하지 않고 성공 시 각각의 결과를 ara::core::Result로 반환하는 반면, 영속화 작업인 Save()는 구속력 있는 롤백 시맨틱을 갖춘 특정 오류 조건을 정의합니다 [SWS_CRYPT_20517]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: 알고리즘 식별자(AlgId)가 서로 다르거나 키 슬롯이 다른 Crypto Provider에 속하는 등의 이유로, 객체가 전달된 WriteableKeySlot와 호환되지 않을 때 발생합니다 [SWS_CRYPT_20517].
  • ara::crypto::CryptoErrc::kUsageViolation: GetAllowedUsage()를 통해 선언된 키의 사용 플래그에 영속화 권한(kAllowPersist)이 포함되어 있지 않은 경우 부적절한 사용을 알립니다 [SWS_CRYPT_50092], [SWS_CRYPT_20517].
  • ara::crypto::CryptoErrc::kBusyResource: 기본 저장소 리소스가 일시적으로 사용 중이어서 작업을 즉시 실행할 수 없을 때 반환됩니다 [SWS_CRYPT_20517].

롤백 시맨틱 덕분에 이러한 오류가 발생해도 WriteableKeySlot의 상태는 온전하게 유지되므로, 부분적으로 기록되었거나 손상된 키 데이터가 저장소에 남아 있지 않습니다 [SWS_CRYPT_20517].

이 가이드는 AUTOSAR Adaptive R25-11 명세를 기반으로 하며 ara::crypto::cryp::CryptoObject 인터페이스에 대한 요구사항을 요약합니다.

멤버 맵

타입 별칭

1

클래스 다이어그램

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

G nara__crypto__cryp__CryptoObject679 CryptoObject + GetAlgId() + GetAllowedUsage() + Save() nara__crypto__Serializable855 Serializable nara__crypto__cryp__CryptoObject679->nara__crypto__Serializable855 nara__crypto__cryp__PrivateKey762 PrivateKey nara__crypto__cryp__PrivateKey762->nara__crypto__cryp__CryptoObject679 nara__crypto__cryp__PublicKey940 PublicKey nara__crypto__cryp__PublicKey940->nara__crypto__cryp__CryptoObject679 nara__crypto__cryp__SymmetricKey111 SymmetricKey nara__crypto__cryp__SymmetricKey111->nara__crypto__cryp__CryptoObject679

상세 보기

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

메서드

GetAlgId 함수

The interface shall return the AlgId of this CryptoObject.

virtual ara::core::Result< ara::crypto::AlgIdString > GetAlgId () const noexcept=0;

The interface shall return the allowed usage of the key.

virtual ara::core::Result< AllowedUsageFlags > GetAllowedUsage () const noexcept=0;
Save 함수

The interface shall persistently store the key-material and its meta-data in the provided WriteableKeySlot. Data previously stored in keyslot shall be overwritten.

virtual ara::core::Result< void > Save (WriteableKeySlot::Sptr keyslot) const noexcept=0;

타입 별칭

Sptr 타입 별칭

Smart pointer of the interface.

메서드 문서

함수 GetAlgId [SWS_CRYPT_20505] Upstream: RS_CRYPTO_02005

virtual ara::core::Result< ara::crypto::AlgIdString > GetAlgId () const noexcept=0;

The interface shall return the AlgId of this CryptoObject.

Header-Datei#include "ara/crypto/cryp/cryobj/crypto_object.h"
Scopeclass ara::crypto::cryp::CryptoObject
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<ara::crypto::AlgIdString >A result containing the AlgId of this CryptoObject

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_20505
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20505@rel:R25-11#b1527e4d
Content hash
b1527e4d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20505
Status: valid/unmigrated Version: rel:R25-11#974298db 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_20505@rel:R25-11#974298db
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#fa5364ac2026-09-30
  • R20-11rel:R20-11#3073d8c92026-10-14
  • R21-11rel:R21-11#3073d8c92026-10-14
  • R22-11rel:R22-11#131cf8662026-10-14
  • R23-11rel:R23-11#b34bd5a42026-10-14
  • R24-11rel:R24-11#36c55a302026-10-14
  • R25-11rel:R25-11#974298db2026-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

함수 GetAllowedUsage [SWS_CRYPT_50092] Upstream: RS_CRYPTO_02005

virtual ara::core::Result< AllowedUsageFlags > GetAllowedUsage () const noexcept=0;

The interface shall return the allowed usage of the key.

Header-Datei#include "ara/crypto/cryp/cryobj/crypto_object.h"
Scopeclass ara::crypto::cryp::CryptoObject
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<AllowedUsageFlags >A result containing the allowed usage of the key

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_50092
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50092@rel:R25-11#0d13831e
Content hash
0d13831e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50092
Status: valid/unmigrated Version: rel:R25-11#eb9b3394 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_50092@rel:R25-11#eb9b3394
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

함수 Save [SWS_CRYPT_20517] Upstream: RS_CRYPTO_02004

virtual ara::core::Result< void > Save (WriteableKeySlot::Sptr keyslot) const noexcept=0;

The interface shall persistently store the key-material and its meta-data in the provided WriteableKeySlot. Data previously stored in keyslot shall be overwritten.

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

인터페이스 ara::crypto::cryp::CryptoObject의 메서드 Save은(는) 키 자료와 관련 메타데이터를 제공된 WriteableKeySlot에 영구적으로 저장하는 데 사용됩니다([SWS_CRYPT_20517]). 실행 시 대상 KeySlot에 이전에 저장된 데이터는 덮어써집니다([SWS_CRYPT_20517]).

매개변수로는 기본 저장 공간을 나타내는 타입 WriteableKeySlot::Sptr의 keyslot이(가) 전달됩니다([SWS_CRYPT_20517]). 이 함수는 noexcept 및 exception safe(으)로 명시되어 있으며, 성공 시 비어 있는 ara::core::Result<void>을(를) 반환값으로 제공합니다([SWS_CRYPT_20517]).

오류 발생 시 롤백 시맨틱이 적용됩니다([SWS_CRYPT_20517]). 구체적으로 다음과 같은 오류 코드가 반환됩니다:

  • ara::crypto::CryptoErrc::kIncompatibleObject: 예를 들어 서로 다른 AlgId 또는 다른 CryptoProvider에 대한 할당으로 인해 키가 KeySlot과 호환되지 않습니다([SWS_CRYPT_20517]).
  • ara::crypto::CryptoErrc::kUsageViolation: 키의 허용된 사용 권한에 kAllowPersist 권한이 포함되어 있지 않습니다([SWS_CRYPT_20517]).
  • ara::crypto::CryptoErrc::kBusyResource: 작업을 일시적으로 실행할 수 없습니다([SWS_CRYPT_20517]).

동시성과 관련하여 이 메서드는 thread-safe(으)로 선언되어 있습니다([SWS_CRYPT_20517]).

이 사용 지침은 AUTOSAR R25-11 명세를 바탕으로 AI에 의해 생성되었습니다.

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

Header-Datei#include "ara/crypto/cryp/cryobj/crypto_object.h"
Scopeclass ara::crypto::cryp::CryptoObject
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keyslotKeySlot representing the underlying storage

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the key is incompatible to the KeySlot, e.g., because the AlgId of the KeySlot is incompatible to the AlgId of the key or because the KeySlot belongs to a different CryptoProvider
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowPersist
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20517
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20517@rel:R25-11#bfa543c3
Content hash
bfa543c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20517
Status: valid/unmigrated Version: rel:R25-11#27ad83e4 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_20517@rel:R25-11#27ad83e4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#401495a62026-09-30
  • R19-11rel:R19-11#12df20182026-10-14
  • R20-11rel:R20-11#74dce1282026-10-14
  • R21-11rel:R21-11#9fdecde72026-10-14
  • R22-11rel:R22-11#4e577c772026-10-14
  • R23-11rel:R23-11#302bac292026-10-14
  • R24-11rel:R24-11#7745263b2026-10-14
  • R25-11rel:R25-11#27ad83e42026-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_20501] Upstream: RS_CRYPTO_02005

using Sptr = std::shared_ptr<CryptoObject>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/cryobj/crypto_object.h"
Scopeclass ara::crypto::cryp::CryptoObject
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20501
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20501@rel:R25-11#9333f08e
Content hash
9333f08e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20501
Status: valid/unmigrated Version: rel:R25-11#4816c7c1 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_20501@rel:R25-11#4816c7c1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2f0be81f2026-09-30
  • R19-11rel:R19-11#b83af8272026-10-14
  • R20-11rel:R20-11#eb73b7d72026-10-14
  • R21-11rel:R21-11#eb73b7d72026-10-14
  • R22-11rel:R22-11#cc06a6ac2026-10-14
  • R23-11rel:R23-11#0db32e6b2026-10-14
  • R24-11rel:R24-11#0db32e6b2026-10-14
  • R25-11rel:R25-11#4816c7c12026-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