DEENESPTFRRUARHIKOZHNL

클래스 ara::crypto::cryp::SymmetricCipherCtx

[SWS_CRYPT_50136] Upstream: RS_CRYPTO_02201

class SymmetricCipherCtx :           public CryptoContext {...};

Interface for Symmetric Cipher Operations.

Header-Datei#include "ara/crypto/cryp/symmetric_cipher_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 · 온도: 제어 불가 · 프롬프트: 0261b663ca0d 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

데이터 스트림 또는 단일 호출에서 대칭 암호화 및 복호화 작업을 위한 인터페이스 역할을 합니다.

클래스 ara::crypto::cryp::SymmetricCipherCtx은 AUTOSAR Adaptive에서 대칭 암호화 및 복호화 작업을 위한 스레드 안전 인터페이스 역할을 합니다 [SWS_CRYPT_50044]. SetKey()를 통해 키를 구성한 후, 데이터는 단일 호출로 처리되거나 Start(), Update() 및 Finish()로 구성된 스트리밍 주기에서 단계적으로 처리될 수 있습니다 [SWS_CRYPT_50138], [SWS_CRYPT_50139]. 모든 메서드는 noexcept로 명시되어 있으며 초기화 누락이나 너무 작은 버퍼와 같은 오류를 ara::core::Result [SWS_CRYPT_50140]을 통해 알립니다.

컨텍스트

인터페이스 ara::crypto::cryp::SymmetricCipherCtx은 암호화 및 복호화 작업을 모두 포함하는 대칭 암호화 변환을 캡슐화합니다. 암호화 아키텍처 내에서 이 클래스는 대칭 알고리즘의 실행 컨텍스트로 작동하며 키 객체 및 메모리 버퍼와 연동합니다. 암호화 키를 구성하기 위해 클래스는 SymmetricKey [SWS_CRYPT_50138]를 통해 휘발성 키와 직접 상호작용하거나 KeySlot [SWS_CRYPT_50043]를 통해 영구적 또는 격리되어 관리되는 키와 상호작용합니다. 처리할 일반 텍스트, 암호문 및 초기화 벡터(IV)는 ReadOnlyMemRegion 및 ReadWriteMemRegion 타입의 메모리 영역을 통해 전달되고 수신됩니다 [SWS_CRYPT_50048], [SWS_CRYPT_50049].

수명 주기

인터페이스의 수명 주기 및 소유권 관계는 주로 형식화된 스마트 포인터 별칭 Sptr(std::shared_ptr<SymmetricCipherCtx>)을 통해 제어됩니다 [SWS_CRYPT_50137]. 인터페이스 정의 자체에는 생성 함수가 명시되어 있지 않으므로, 실제 구현에서 구체적인 인스턴스의 제공은 상위 암호화 팩토리 메서드를 통해 수행될 것으로 추정됩니다(해석). 질문 Q-5b5f5ffdf964c91f (열림)

인스턴스화 후 컨텍스트는 여러 운영 단계를 거칩니다:

  • 초기화되지 않음: 인스턴스화 직후 컨텍스트에 할당된 키가 없습니다. 이 단계에서의 모든 처리 호출은 CryptoErrc::kUninitializedContext 오류로 이어집니다 [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • 초기화됨 / 키 바인딩됨: SymmetricKey [SWS_CRYPT_50138] 또는 KeySlot [SWS_CRYPT_50043]와 함께 SetKey()을 호출하면 컨텍스트를 사용할 준비가 완료됩니다. 이 상태에서는 상태 비저장 단일 호출 작업을 실행하거나 상태 저장 스트리밍 프로세스를 시작할 수 있습니다.
  • 스트리밍 처리: Start() 호출은 단계별 변환을 시작합니다 [SWS_CRYPT_50044], [SWS_CRYPT_23625]. 이 단계에서는 Update()을 통해 데이터를 변환하고 [SWS_CRYPT_50139] Seek()를 통해 위치를 수정할 수 있습니다 [SWS_CRYPT_23613]. 스트리밍 상태는 Finish() [SWS_CRYPT_50045] 또는 FinishEncrypt() [SWS_CRYPT_23618]을 통해 정상적으로 종료되거나 Cancel()을 통해 조기에 폐기됩니다 [SWS_CRYPT_50046]. 그 후 컨텍스트는 초기화된 기본 상태로 돌아갑니다.

SymmetricCipherCtx의 모든 메서드는 noexcept로 선언되어 예외 안전성("exception safe")을 보장하며, 동시 액세스에 대해 스레드 안전("thread-safe")으로 명시되어 있습니다 [SWS_CRYPT_50044], [SWS_CRYPT_50139].

SymmetricCipherCtxState Uninitialized Uninitialized Initialized Initialized Uninitialized->Initialized SetKey() Initialized->Initialized ProcessSingleCall...() Streaming Streaming Initialized->Streaming Start() Streaming->Initialized Finish() / FinishEncrypt() / Cancel() Streaming->Streaming Update() / Seek()

상태 다이어그램: 대칭 암호화 컨텍스트의 수명 주기 및 상태 전이. 출처: [SWS_CRYPT_50138], [SWS_CRYPT_50044], [SWS_CRYPT_50139], [SWS_CRYPT_50045], [SWS_CRYPT_50046]

사용 경로

실제 데이터 변환 전에 필요한 버퍼 및 청크 크기를 확인하는 것이 좋습니다. GetMinimumChunkSize() [SWS_CRYPT_50144] 및 GetMaximumChunkSize() [SWS_CRYPT_50050]을 통해 입력 블록의 허용 한도를 확인할 수 있습니다. 초기화 벡터가 필요한 경우 GetMinimumInputIvSize() [SWS_CRYPT_50141], GetMaximumInputIvSize() [SWS_CRYPT_50142] 또는 GetOutputIvSize() [SWS_CRYPT_50143]를 사용하여 해당 길이 한도를 쿼리할 수 있습니다. 작업에 필요한 최대 대상 버퍼 크기는 GetRequiredOutputBufferSize()을 사용하여 계산됩니다 [SWS_CRYPT_50140].

단계별 스트림 암호화 또는 복호화에는 다음 표준 절차가 적용됩니다:

  1. 키 구성: SetKey() [SWS_CRYPT_50138]을 통해 암호화 키를 컨텍스트에 바인딩.
  2. 변환 시작: 변환 방향(암호화 또는 복호화) 및 선택적 IV [SWS_CRYPT_23625] 지정 또는 IV 없이 [SWS_CRYPT_50044] Start() 호출.
  3. 데이터 블록 변환: 입력 데이터의 단계적 전달 및 출력 데이터 검색을 위한 Update()의 반복 호출 [SWS_CRYPT_50139]. 필요한 경우 Seek()를 통해 데이터 스트림 내에서 탐색할 수 있습니다 [SWS_CRYPT_23613].
  4. 마무리: Finish() [SWS_CRYPT_50045]을 통한 마무리, 또는 컨텍스트에서 생성된 IV를 반환해야 하는 경우 FinishEncrypt()를 통한 마무리 [SWS_CRYPT_23618].

이러한 스트리밍 패턴의 대안으로 인터페이스는 동기식 단일 호출을 지원합니다. 전체 페이로드가 사용 가능한 경우, ProcessSingleCall() [SWS_CRYPT_50047], ProcessSingleCallWithInputIv() [SWS_CRYPT_50048]을 통해 직접 작업을 실행하거나 컨텍스트 고유 IV 생성을 위해 EncryptSingleCallWithOutputIv() [SWS_CRYPT_50049]를 통해 직접 실행할 수 있습니다.

대칭 데이터 스트림 암호화애플리케이션SymmetricCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>loop블록이 존재하는 동안Update(in, out)Result<size_t>FinishEncrypt(in, out, ivOut)Result<size_t>

시퀀스 다이어그램: 스트리밍 암호화의 일반적인 호출 순서. 출처: [SWS_CRYPT_50138], [SWS_CRYPT_23625], [SWS_CRYPT_50139], [SWS_CRYPT_23618]

오류 시나리오

클래스의 메서드는 ara::crypto::CryptoErrc 오류 도메인의 코드를 포함하는 ara::core::Result을 통해 오류를 알립니다. 주요 오류 조건은 다음과 같습니다:

  • CryptoErrc::kUninitializedContext: SetKey()을 통해 키가 설정되기 전에 Start() [SWS_CRYPT_50044], 단일 호출 루틴 [SWS_CRYPT_50047] 또는 GetRequiredOutputBufferSize() [SWS_CRYPT_50140]와 같은 처리 호출이 실행될 때 발생합니다.
  • CryptoErrc::kProcessingNotStarted: 선행하는 성공적인 Start() 호출 없이 Update() [SWS_CRYPT_50139], Finish() [SWS_CRYPT_50045], FinishEncrypt() [SWS_CRYPT_23618], Seek() [SWS_CRYPT_23613] 또는 Cancel() [SWS_CRYPT_50046]과 같은 스트리밍 함수가 실행될 때 발생합니다.
  • CryptoErrc::kInsufficientCapacity: 데이터 또는 IV용으로 제공된 대상 버퍼가 최소 필요 용량보다 작습니다 [SWS_CRYPT_50139], [SWS_CRYPT_50049].
  • CryptoErrc::kUsageViolation 및 CryptoErrc::kIncompatibleObject: 전달된 키 타입이 변환에 적합하지 않거나 키에 정의된 사용 규칙이 작업을 금지합니다(예: kAllowDataEncryption 또는 kAllowDataDecryption 누락) [SWS_CRYPT_50044], [SWS_CRYPT_50047].
  • CryptoErrc::kEmptyKeySlot 및 CryptoErrc::kBusyResource: 구성된 KeySlot에 런타임에 키가 포함되어 있지 않거나 암호화 작업에 필요한 리소스가 차단되었음을 나타냅니다 [SWS_CRYPT_50048], [SWS_CRYPT_50049].
  • CryptoErrc::kUnsupported: 작동 모드(예: 스트림 처리, 단일 호출 또는 Seek())가 선택한 컨텍스트 또는 알고리즘에서 지원되지 않을 때 반환됩니다 [SWS_CRYPT_23613], [SWS_CRYPT_50047].

이 가이드는 사양 요구사항을 바탕으로 AI 어시스턴트에 의해 작성되었습니다.

멤버 맵

클래스 다이어그램

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

G nara__crypto__cryp__SymmetricCipherCtx167 SymmetricCipherCtx + Cancel() + EncryptSingleCallWithOutputIv() + Finish() + FinishEncrypt() + GetMaximumChunkSize() + GetMaximumInputIvSize() + GetMinimumChunkSize() + GetMinimumInputIvSize() + GetOutputIvSize() + GetRequiredOutputBufferSize() + ProcessSingleCall() + ProcessSingleCallWithInputIv() + Seek() + SetKey() + Start() + Update() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__SymmetricCipherCtx167->nara__crypto__cryp__CryptoContext85

상세 보기

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

메서드

Cancel 함수

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

virtual ara::core::Result< void > Cancel () noexcept=0;

Perform encryption in a single-call and return an IV generated by the context.

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, ReadWriteMemRegion iv Out) noexcept=0;
Finish 함수

Finalize the encryption/decryption without returning an IV.

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Finalize the encryption and return the IV generated by the context.

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion ivOut) noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

virtual ara::core::Result< std::size_t > GetMinimumChunkSize () const noexcept=0;

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

virtual ara::core::Result< std::size_t > GetOutputIvSize () const noexcept=0;

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 (std::size_t inputSize, bool isFinal) const noexcept;

Perform en-/decryption in a single-call without setting or returning an IV.

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion in, ReadWriteMemRegion out, CryptoTransform transform Direction) noexcept=0;

Perform en-/decryption in a single-call, providing an IV to be used during en-/decryption.

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, CryptoTransform transformDirection, ReadOnlyMemRegion iv) noexcept=0;
Seek 함수

Set the position of the next byte within the data stream.

virtual ara::core::Result< void > Seek (std::int64_t offset, bool from Begin) noexcept=0;
SetKey 함수 2

Configure the context to use the key stored in the provided KeySlot at the time the en-/decryption is started.

오버로드 SetKey 2
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50043
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_50138
Start 함수 2

Initialize the context for a new encryption or decryption and set the IV used by the context.

오버로드 Start 2
virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_23625
virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0; SWS_CRYPT_50044
Update 함수

Encrypt or decrypt a data buffer.

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

타입 별칭

Sptr 타입 별칭

Smart pointer of the interface.

메서드 문서

함수 Cancel [SWS_CRYPT_50046] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Cancel () noexcept=0;

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

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

ara::crypto::cryp::SymmetricCipherCtx 클래스의 동기 메서드 Cancel()은(는) 이전에 Start()(으)로 시작되어 아직 완료되지 않은 진행 중인 스트리밍 작업을 조기에 중단하는 역할을 합니다[SWS_CRYPT_50046]. 이 인터페이스는 ara/crypto/cryp/symmetric_cipher_ctx.h에 매개변수 없이 선언되어 있으며, 성공적으로 실행되면 비어 있는 ara::core::Result<void>을(를) 반환합니다[SWS_CRYPT_50046].

사전에 Start() 호출을 통해 데이터 처리가 시작되지 않은 경우, 이 작업은 특정 오류 코드 ara::crypto::CryptoErrc::kProcessingNotStarted 및 롤백 시맨틱과 함께 실패합니다[SWS_CRYPT_50046]. 호출 컨텍스트에 대해 명세는 noexcept 선언[SWS_CRYPT_50046]과 함께 스레드 안전성(thread-safe) 및 예외 안전성(exception safe)을 보장합니다. 해석: 롤백 시맨틱으로 인해 중단 후 객체는 다시 준비된 초기 상태로 돌아갈 것으로 보입니다. 질문 Q-b6deb8db5367acc5 (열림)

이 기능적 패턴은 AUTOSAR Adaptive의 모든 암호화 스트리밍 컨텍스트에 걸쳐 일관되게 정의되어 있습니다. 동일한 시그니처와 오류 시맨틱이 컨텍스트 클래스 VerifierPublicCtx([SWS_CRYPT_50023]), MessageAuthnCodeCtx([SWS_CRYPT_50027]), SignerPrivateCtx([SWS_CRYPT_50041]), HashFunctionCtx([SWS_CRYPT_50058]), DecryptorPrivateCtx([SWS_CRYPT_50069]), AuthCipherCtx([SWS_CRYPT_50077]) 및 EncryptorPublicCtx([SWS_CRYPT_50089])에 적용됩니다.

이 텍스트는 AI에 의해 큐레이션되었으며 AUTOSAR Adaptive R25-11 명세를 기반으로 합니다.

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

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

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50046@rel:R25-11#b1e64545
Content hash
b1e64545
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50046
Status: valid/unmigrated Version: rel:R25-11#f0ef0c54 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_50046@rel:R25-11#f0ef0c54
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

함수 EncryptSingleCallWithOutputIv [SWS_CRYPT_50049] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, ReadWriteMemRegion iv Out) noexcept=0;

Perform encryption in a single-call and return an IV generated by the context.

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

사용 및 버퍼 처리

동기 메서드 EncryptSingleCallWithOutputIv은(는) 단일 호출로 대칭 암호화를 수행하고 컨텍스트에서 생성된 초기화 벡터를 버퍼 ivOut을(를) 통해 반환합니다[SWS_CRYPT_50049]. 입력 데이터는 in을(를) 통해 전달되며, out은(는) 암호화된 데이터를 수신합니다[SWS_CRYPT_50049]. 성공적으로 실행되면 결과 ara::core::Result<std::size_t>은(는) 생성된 출력 데이터의 실제 크기를 제공하며, 이는 out의 전체 용량보다 작을 수 있습니다[SWS_CRYPT_50049]. 선택한 알고리즘에 초기화 벡터가 필요하지 않은 경우 ivOut에는 데이터가 기록되지 않습니다[SWS_CRYPT_50049].

상호 작용 및 전제 조건

호출 전에 컨텍스트는 적절한 키를 통해 초기화되어야 합니다[SWS_CRYPT_50049]. 버퍼 ivOut의 충분한 용량을 보장하기 위해 필요한 IV 길이를 GetOutputIvSize()을(를) 통해 미리 확인할 수 있습니다[SWS_CRYPT_50143]. 태그 계산을 포함한 인증이 추가로 필요한 경우 ara::crypto::cryp::AuthCipherCtx이(가) 해당 대응 기능을 제공합니다[SWS_CRYPT_50080].

오류 처리 및 동시성

이 인터페이스는 스레드 안전(thread-safe) 및 예외 안전(“exception safe”)으로 명시되어 있으며, 오류 발생 시 롤백 시맨틱을 적용합니다[SWS_CRYPT_50049]. 해석: 이러한 롤백 시맨틱은 오류 발생 시 컨텍스트 상태가 온전하게 유지되고 버퍼에 불완전한 데이터가 유효한 상태로 남지 않도록 보장할 것으로 보입니다. 질문 Q-841087731518d866 (열림) 관련 오류는 다음과 같습니다:

  • UninitializedContext: 컨텍스트에 아직 키가 할당되지 않았습니다[SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: out 또는 ivOut의 용량이 충분하지 않습니다[SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출 암호화가 지원되지 않거나 알고리즘에서 입력 IV 지정을 강제합니다[SWS_CRYPT_50049].
  • ara::crypto::CryptoErrc::kUsageViolation 또는 ara::crypto::CryptoErrc::kIncompatibleObject: 키 유형이 변환에 맞지 않거나 키 용도가 데이터 암호화를 허용하지 않습니다[SWS_CRYPT_50049].

이 사용 지침은 AUTOSAR Adaptive 사양을 기반으로 AI에 의해 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to
ivOutan output data buffer that the initialization vector (IV) generated by the context will be written to. If the algorithm does not use an IV, no data will be written into the buffer.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call encryption is not supported, or if the algorithm requires providing an input IV
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction (encrypt)

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50049
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50049@rel:R25-11#a3ecc617
Content hash
a3ecc617
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50049
Status: valid/unmigrated Version: rel:R25-11#f2ba22b4 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_50049@rel:R25-11#f2ba22b4
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

함수 Finish [SWS_CRYPT_50045] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Finalize the encryption/decryption without returning an IV.

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

사용

동기 메서드 Finish은 초기화 벡터의 반환 없이 ara::crypto::cryp::SymmetricCipherCtx 내에서 대칭 암호화 또는 복호화를 완료합니다([SWS_CRYPT_50045]). 이 메서드는 입력 버퍼 in(ReadOnlyMemRegion)의 마지막 데이터 청크를 처리하고 결과 데이터를 출력 버퍼 out(ReadWriteMemRegion)에 기록합니다([SWS_CRYPT_50045]). 이에 필요한 버퍼 크기는 사전에 GetRequiredOutputBufferSize()을 통해 조회할 수 있습니다([SWS_CRYPT_50045]). ara::core::Result<std::size_t> 형식의 반환값은 성공 시 기록된 정확한 바이트 수를 제공하며, 이는 out의 전체 용량보다 작을 수 있습니다([SWS_CRYPT_50045]).

오류 처리

오류 발생 시 메서드는 특정 오류 코드가 포함된 ara::core::Result을 반환합니다([SWS_CRYPT_50045]):

  • ProcessingNotStarted: 데이터 처리가 이전에 Start()에 의해 시작되지 않았습니다([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 출력 버퍼 out이(가) 너무 작습니다([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: 입력 데이터 크기를 처리할 수 없습니다([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kInvalidArgument: 전달된 입력 데이터가 유효하지 않습니다([SWS_CRYPT_50045]).
  • ara::crypto::CryptoErrc::kUnsupported: 현재 컨텍스트에서 스트림 처리를 지원하지 않습니다([SWS_CRYPT_50045]).

CryptoErrc 오류 중 하나가 발생하면 롤백 시맨틱이 적용됩니다([SWS_CRYPT_50045]).

동시성 및 상호 작용

이 연산은 thread-safe 및 exception safe(으)로 정의됩니다([SWS_CRYPT_50045]). 호출 전에 반드시 Start()을(를) 통해 변환이 시작되어 있어야 합니다([SWS_CRYPT_50045]). Finish()의 개별 호출에 허용되는 최대 입력 크기는 GetMaximumChunkSize()을(를) 통해 확인할 수 있습니다([SWS_CRYPT_50050]). 완료 후에는 변환 실행이 종료된 것으로 간주되며, 추가 연산을 위해서는 아마도 Start()의 새로운 호출이 필요할 것입니다. 질문 Q-c4ffc8028e8f522b (열림)

이 텍스트는 AUTOSAR 사양 R25-11을 기반으로 AI에 의해 생성되었습니다.

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that contains encrypted or decrypted data. The required size of this buffer can be queried using GetRequired OutputBufferSize()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50045
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50045@rel:R25-11#22559efc
Content hash
22559efc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50045
Status: valid/unmigrated Version: rel:R25-11#b9951f15 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_50045@rel:R25-11#b9951f15
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

함수 FinishEncrypt [SWS_CRYPT_23618] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion ivOut) noexcept=0;

Finalize the encryption and return the IV generated by the context.

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

FinishEncrypt 메서드는 암호화 작업을 완료하고 컨텍스트에서 생성된 초기화 벡터(IV)를 반환합니다 [SWS_CRYPT_23618]. 이 메서드는 최종 입력 데이터 버퍼 in를 처리하고 그 결과 데이터를 출력 버퍼 out에, IV를 ivOut에 기록합니다. 반환값으로 out의 용량보다 작을 수 있는 기록된 출력 데이터의 실제 크기를 포함하는 ara::core::Result<std::size_t>를 반환합니다 [SWS_CRYPT_23618].

오류 없는 실행을 위해 버퍼 크기와 컨텍스트 상태를 사전에 조정해야 합니다:

  • out에 필요한 버퍼 크기는 isFinal = true 매개변수를 설정한 상태에서 [SWS_CRYPT_50140]을 통해 확인할 수 있습니다. out가 너무 작게 측정된 경우 호출은 CryptoErrc::kInsufficientCapacity와 함께 실패합니다 [SWS_CRYPT_23618].
  • ivOut에 대해 예상되는 크기는 [SWS_CRYPT_50143]을 통해 조회할 수 있습니다.
  • in의 입력 크기는 [SWS_CRYPT_50144] 및 [SWS_CRYPT_50050]에 의해 정의된 최소 및 최대 한계 사이에 있어야 하며, 그렇지 않으면 CryptoErrc::kInvalidInputSize가 반환됩니다 [SWS_CRYPT_23618].

데이터 처리가 사전에 Start()을 통해 시작되지 않은 경우, 메서드는 CryptoErrc::kProcessingNotStarted을 보고합니다 [SWS_CRYPT_23618]. 입력 버퍼에 유효하지 않은 데이터가 포함되어 있으면 CryptoErrc::kInvalidArgument가 이어집니다 [SWS_CRYPT_23618]. 스트림 처리가 지원되지 않거나, 컨텍스트가 IV를 사용하지 않거나, 이미 Start()에서 IV가 전달된 경우 CryptoErrc::kUnsupported 오류가 발생합니다 [SWS_CRYPT_23618]. 모든 오류는 롤백 시맨틱을 갖습니다 [SWS_CRYPT_23618]. 사양에 따르면 이 호출은 스레드 안전하며 예외 안전(noexcept)합니다 [SWS_CRYPT_23618].

이 사용 지침은 AUTOSAR 페이로드를 기반으로 자동 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that contains encrypted or decrypted data
ivOutan output data buffer that contains the IV

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or if this context does not use an IV or if the IV has been provided by the application in the Start() function

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23618
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23618@rel:R25-11#eae11b34
Content hash
eae11b34
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23618
Status: valid/unmigrated Version: rel:R25-11#dcc35b13 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_23618@rel:R25-11#dcc35b13
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c50d30f82026-09-30
  • R19-11rel:R19-11#c41ea37b2026-10-14
  • R20-11rel:R20-11#06f18fb12026-10-14
  • R21-11rel:R21-11#3725bc5a2026-10-14
  • R22-11rel:R22-11#724878ec2026-10-14
  • R23-11rel:R23-11#8e98bdf02026-10-14
  • R24-11rel:R24-11#1d9181d92026-10-14
  • R25-11rel:R25-11#dcc35b132026-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

함수 GetMaximumChunkSize [SWS_CRYPT_50050] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the maximum buffer size in bytes

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_50050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50050@rel:R25-11#7a21c123
Content hash
7a21c123
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50050
Status: valid/unmigrated Version: rel:R25-11#439b3c69 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_50050@rel:R25-11#439b3c69
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

함수 GetMaximumInputIvSize [SWS_CRYPT_50142] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

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_50142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50142@rel:R25-11#66284c0f
Content hash
66284c0f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50142
Status: valid/unmigrated Version: rel:R25-11#2fd32b15 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_50142@rel:R25-11#2fd32b15
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

함수 GetMinimumChunkSize [SWS_CRYPT_50144] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMinimumChunkSize () const noexcept=0;

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt(), or ProcessSingleCall() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the minimum buffer size in bytes

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_50144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50144@rel:R25-11#fa165ed9
Content hash
fa165ed9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50144
Status: valid/unmigrated Version: rel:R25-11#8dfc91ab 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_50144@rel:R25-11#8dfc91ab
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

함수 GetMinimumInputIvSize [SWS_CRYPT_50141] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

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_50141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50141@rel:R25-11#1044819d
Content hash
1044819d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50141
Status: valid/unmigrated Version: rel:R25-11#a69e1387 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_50141@rel:R25-11#a69e1387
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

함수 GetOutputIvSize [SWS_CRYPT_50143] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetOutputIvSize () const noexcept=0;

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

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_50143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50143@rel:R25-11#e3ca0397
Content hash
e3ca0397
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50143
Status: valid/unmigrated Version: rel:R25-11#11f7dfe6 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_50143@rel:R25-11#11f7dfe6
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_50140] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) 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/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inputSizesize of input data
isFinalif true, calculate maximum required output buffer size for Finish(), FinishEncrypt(), ProcessSingleCallWithInputIv(), and Encrypt SingleCallWithOutputIv(), otherwise for Update()

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 and setting the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50140@rel:R25-11#a529a2bd
Content hash
a529a2bd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50140
Status: valid/unmigrated Version: rel:R25-11#3cd4a32f 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_50140@rel:R25-11#3cd4a32f
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

함수 ProcessSingleCall [SWS_CRYPT_50047] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion in, ReadWriteMemRegion out, CryptoTransform transform Direction) noexcept=0;

Perform en-/decryption in a single-call without setting or returning an IV.

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

메서드 ProcessSingleCall은(는) 초기화 벡터(IV) 없이 단일 동기 호출로 암호화 또는 복호화를 수행합니다([SWS_CRYPT_50047]). 입력 매개변수로는 데이터 버퍼 in(ReadOnlyMemRegion) 및 변환 방향 transformDirection(CryptoTransform)이(가) 사용되며, 결과는 버퍼 out(ReadWriteMemRegion)에 기록됩니다. 성공적으로 실행되면 함수는 기록된 바이트 수를 포함하는 ara::core::Result<std::size_t>을(를) 반환하며, 이 값은 출력 버퍼의 전체 용량보다 작을 수 있습니다.

동시성 및 안전성과 관련하여 이 메서드는 thread-safe 및 exception safe(으)로 명시되어 있습니다([SWS_CRYPT_50047]). in의 처리 가능한 입력 크기는 컨텍스트에 의해 정의된 제한을 따르며, 이는 [SWS_CRYPT_50144](GetMinimumChunkSize) 및 [SWS_CRYPT_50050](GetMaximumChunkSize)을(를) 통해 조회할 수 있습니다.

모든 오류 사례는 롤백 시맨틱을 따릅니다([SWS_CRYPT_50047]):

  • ara::crypto::CryptoErrc::kUninitializedContext: 키를 할당하여 컨텍스트를 미리 초기화하지 않았습니다.
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출 처리가 지원되지 않거나 변환을 위해 IV 설정 또는 읽기가 필요합니다.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 출력 버퍼 out의 용량이 충분하지 않습니다.
  • ara::crypto::CryptoErrc::kInvalidInputSize: 입력 크기를 컨텍스트에서 처리할 수 없습니다.
  • ara::crypto::CryptoErrc::kUsageViolation: 키 용도가 요청된 연산을 포괄하지 않습니다(kAllowDataEncryption 또는 kAllowDataDecryption).
  • ara::crypto::CryptoErrc::kIncompatibleObject, kEmptyKeySlot, kInvalidArgument 또는 kBusyResource: 키가 호환되지 않거나, 키 슬롯이 비어 있거나, 입력 데이터가 유효하지 않거나, 필요한 리소스가 점유되어 있습니다.

다른 인터페이스와의 상호 작용 시 이 호출은 완전히 구성된 컨텍스트를 필요로 하며, 추가 태그 처리가 포함된 인증 암호의 경우 AuthCipherCtx에 대체 인터페이스 [SWS_CRYPT_50078]이(가) 준비되어 있습니다.

이 사용 지침은 AUTOSAR 사양을 바탕으로 자동 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext
transformDirectionthe transformation direction, i.e., encryption or decryption

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if the context requires setting or returning an IV in the passed transformDirection
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50047@rel:R25-11#72f6f0d0
Content hash
72f6f0d0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50047
Status: valid/unmigrated Version: rel:R25-11#c5198454 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_50047@rel:R25-11#c5198454
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

함수 ProcessSingleCallWithInputIv [SWS_CRYPT_50048] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion in, ReadWriteMemRegion out, CryptoTransform transformDirection, ReadOnlyMemRegion iv) noexcept=0;

Perform en-/decryption in a single-call, providing an IV to be used during en-/decryption.

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

ara::crypto::cryp::SymmetricCipherCtx의 메서드 ProcessSingleCallWithInputIv은(는) 단일 동기 호출(Single-Call)로 데이터의 대칭 암호화 또는 복호화를 수행합니다[SWS_CRYPT_50048]. 이때 변환에 사용되는 초기화 벡터는 입력 버퍼 iv을(를) 통해 명시적으로 전달됩니다.

사용법 및 상호작용

transformDirection을(를) 통해 in의 데이터를 암호화할지 복호화할지 제어합니다. 결과는 버퍼 out에 기록됩니다. 반환된 ara::core::Result<std::size_t>에는 실제로 기록된 바이트 수가 포함되며, 이는 out의 전체 용량보다 작을 수 있습니다[SWS_CRYPT_50048].

버퍼 크기 조정을 위해 다음과 같은 헬퍼 함수가 제공됩니다:

  • out에 필요한 버퍼 크기는 매개변수 isFinal = true와(과) 함께 GetRequiredOutputBufferSize을(를) 통해 미리 계산할 수 있습니다[SWS_CRYPT_50140].
  • iv에 허용되는 길이는 선택한 변환 방향에 대해 GetMinimumInputIvSize [SWS_CRYPT_50141] 및 GetMaximumInputIvSize [SWS_CRYPT_50142]을(를) 통해 확인할 수 있습니다.
  • 인증 태그의 생성 또는 검증이 추가로 필요한 경우에는 대신 ara::crypto::cryp::AuthCipherCtx::ProcessSingleCallWithInputIv을(를) 사용해야 합니다[SWS_CRYPT_50079].

오류 처리 및 동시성

이 연산은 thread-safe 및 exception safe(으)로 정의됩니다[SWS_CRYPT_50048]. 모든 오류는 롤백 시맨틱을 갖습니다:

  • CryptoErrc::kUninitializedContext 또는 CryptoErrc::kEmptyKeySlot: 컨텍스트에 키가 할당되지 않았거나 KeySlot이 비어 있습니다[SWS_CRYPT_50048].
  • CryptoErrc::kUsageViolation: 키가 선택된 방향을 허용하지 않습니다(kAllowDataEncryption 또는 kAllowDataDecryption 부재)[SWS_CRYPT_50048].
  • CryptoErrc::kIncompatibleObject: 키 유형이 변환과 호환되지 않습니다[SWS_CRYPT_50048].
  • CryptoErrc::kInsufficientCapacity: 출력 버퍼 out이(가) 너무 작습니다[SWS_CRYPT_50048].
  • CryptoErrc::kInvalidInputSize 또는 CryptoErrc::kInvalidArgument: in의 버퍼 크기 또는 내용이 유효하지 않습니다[SWS_CRYPT_50048].
  • CryptoErrc::kUnsupported: 단일 호출 처리 또는 입력 IV가 지원되지 않습니다[SWS_CRYPT_50048].
  • CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 [SWS_CRYPT_50048].

이 텍스트는 AI에 의해 작성되었으며 사양 요소의 사용을 지원하기 위한 것입니다.

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

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the ciphertext or plaintext
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan input data buffer containing the initialization vector (IV) to be used by the context

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call en-/decryption is not supported, or if single-call processing with an input IV is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50048
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50048@rel:R25-11#f6f85330
Content hash
f6f85330
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50048
Status: valid/unmigrated Version: rel:R25-11#06bfc8c8 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_50048@rel:R25-11#06bfc8c8
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

함수 Seek [SWS_CRYPT_23613] Upstream: RS_CRYPTO_02304

virtual ara::core::Result< void > Seek (std::int64_t offset, bool from Begin) noexcept=0;

Set the position of the next byte within the data stream.

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

ara::crypto::cryp::SymmetricCipherCtx 인터페이스의 Seek 메서드는 데이터 스트림 내에서 다음에 처리할 바이트의 위치를 설정합니다 [SWS_CRYPT_23613]. Future와 같은 비동기 반환 유형이 없으므로 호출은 동기식으로 이루어질 것으로 추정됩니다. 질문 Q-fccf732722263f60 (열림)

사용

위치 지정은 두 개의 매개변수를 통해 제어됩니다 [SWS_CRYPT_23613]:

  • offset: 스트림 시작 또는 현재 위치를 기준으로 한 데이터 스트림 내 바이트 오프셋 [SWS_CRYPT_23613].
  • fromBegin: 위치 지정의 기준점; true은(는) 스트림 시작으로부터의 오프셋을 지정하고, false은(는) 현재 위치 기준을 지정합니다 [SWS_CRYPT_23613].

이 함수는 noexcept(으)로 선언되어 있으며, 성공적인 완료를 알리거나 발생한 오류 객체를 포함하는 ara::core::Result<void>을(를) 반환합니다 [SWS_CRYPT_23613].

동시성 및 제약사항

명세에 따르면 Seek은(는) 예외 안전(exception safe) 및 스레드 안전(thread-safe)으로 분류됩니다 [SWS_CRYPT_23613]. 실행을 위한 전제 조건은 사전에 Start()을(를) 호출하여 데이터 처리가 시작되었어야 한다는 점입니다 [SWS_CRYPT_23613].

오류 처리

모든 오류 사례에는 정의된 롤백 시맨틱(rollback_semantics)이 적용되므로 오류 발생 시에도 내부 상태가 일관되게 유지됩니다 [SWS_CRYPT_23613]:

  • ara::crypto::CryptoErrc::kUnsupported: 현재 암호화 컨텍스트에서 Seek 작업을 지원하지 않습니다 [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kProcessingNotStarted: 데이터 처리가 사전에 Start()을(를) 통해 시작되지 않았습니다 [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kOutOfBounds: 결과 오프셋이 데이터 스트림에 비해 너무 작거나 너무 큽니다 [SWS_CRYPT_23613].
  • ara::crypto::CryptoErrc::kInvalidArgument: 컨텍스트에서 블록 정렬을 요구함에도 불구하고 결과 오프셋이 블록 경계에 정렬되지 않았습니다 [SWS_CRYPT_23613].

이 텍스트는 AI에 의해 생성되었습니다.

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

Parameter (in)

ParameterBeschreibung
offsetthe offset value in bytes, relative to begin or current position in the data stream
fromBeginthe starting point for positioning within the stream: from begin (if true) or from current position (if false)

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the seek operation is not supported by this context
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kOutOfBoundsrollback_semantics if the resulting offset value is too large or too small
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the resulting offset is not block aligned but the context requires block alignment

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23613
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23613@rel:R25-11#ed9bc03d
Content hash
ed9bc03d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23613
Status: valid/unmigrated Version: rel:R25-11#383a800f 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_23613@rel:R25-11#383a800f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6a4153822026-09-30
  • R19-11rel:R19-11#9c63158a2026-10-14
  • R20-11rel:R20-11#36a48d2b2026-10-14
  • R21-11rel:R21-11#f3b5692c2026-10-14
  • R22-11rel:R22-11#a11f983a2026-10-14
  • R23-11rel:R23-11#10ff1b922026-10-14
  • R24-11rel:R24-11#23dbf8e42026-10-14
  • R25-11rel:R25-11#383a800f2026-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_50043] 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 en-/decryption is started.

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

순수 가상 메서드 SetKey은 향후 암호화 작업을 위해 전달된 KeySlot의 키를 사용하도록 ara::crypto::cryp::SymmetricCipherCtx의 인스턴스를 구성합니다 [SWS_CRYPT_50043].

사용법 및 호출 컨텍스트

호출은 동기적으로 수행되며, 매개변수 keySlot(으)로 SymmetricKey을(를) 포함하는 KeySlot::Sptr을(를) 받습니다 [SWS_CRYPT_50043]. 반환값은 성공을 알리거나 오류 발생 시 오류 코드를 전달하는 ara::core::Result<void>입니다 [SWS_CRYPT_50043]. 이 구성은 슬롯에 저장된 키가 실제 암호화 또는 복호화가 시작되는 시점에 비로소 참조되도록 합니다 [SWS_CRYPT_50043].

오류 처리

오류 발생 시 예외가 발생하지 않고(메서드는 noexcept 및 exception safe로 명시됨), 롤백 시맨틱을 갖는 오류 코드가 반환됩니다 [SWS_CRYPT_50043]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: 전달된 KeySlot이(가) 암호화 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_50043].
  • ara::crypto::CryptoErrc::kUnsupported: 컨텍스트 구현이 직접 키(예: SymmetricKey) 설정만을 지원하고 KeySlot을(를) 통한 할당은 지원하지 않습니다 [SWS_CRYPT_50043].

동시성 및 상호 작용

이 메서드는 thread-safe로 지정되어 있습니다 [SWS_CRYPT_50043]. 해석: 키 자료의 실제 읽기는 암호화 또는 복호화가 시작될 때 비로소 이루어질 것으로 보이므로, 변환 시작 전까지 슬롯이 일관되게 유지되어야 합니다. 질문 Q-799125800ab0f93c (열림) 직접적인 키 객체 대신 KeySlot::Sptr을 통해 컨텍스트를 구성하는 개념은 KeyDerivationFunctionCtx [SWS_CRYPT_50010], MessageAuthnCodeCtx [SWS_CRYPT_50026], SymmetricKeyWrapperCtx [SWS_CRYPT_50034] 및 VerifierPublicCtx [SWS_CRYPT_50018]을(를) 포함한 관련 암호화 컨텍스트의 통일된 패턴과 일치합니다.

이 텍스트는 AUTOSAR Adaptive R25-11 명세를 기반으로 AI에 의해 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a SymmetricKey.

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_50043
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50043@rel:R25-11#bc44b3e0
Content hash
bc44b3e0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50043
Status: valid/unmigrated Version: rel:R25-11#e7e7c9ab 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_50043@rel:R25-11#e7e7c9ab
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_50138] 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 symmetric key.

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

사용

SetKey 메서드는 전달된 대칭 키를 사용하도록 ara::crypto::cryp::SymmetricCipherCtx의 인스턴스를 구성하는 데 사용됩니다 [SWS_CRYPT_50138]. 입력 매개변수로 이 함수는 사용할 키를 SymmetricKey::Sptr 유형의 스마트 포인터 key(으)로 전달받습니다. 호출은 동기식으로 수행되며, 할당에 성공하면 비어 있고 오류 발생 시 오류 코드를 제공하는 ara::core::Result<void>을(를) 반환합니다 [SWS_CRYPT_50138]. 선언은 헤더 ara/crypto/cryp/symmetric_cipher_ctx.h을(를) 통해 포함됩니다.

오류 처리

오류 처리는 롤백 시맨틱을 보장하므로 할당이 실패할 경우 컨텍스트는 이전 상태를 유지합니다 [SWS_CRYPT_50138]. 두 가지 특정 오류가 정의되어 있습니다:

  • ara::crypto::CryptoErrc::kUnsupported: 컨텍스트가 KeySlot을(를) 통한 키 할당만을 독점적으로 지원할 때 발생합니다 [SWS_CRYPT_50138].
  • ara::crypto::CryptoErrc::kIncompatibleObject: 전달된 키 객체가 컨텍스트와 호환되지 않을 때 반환됩니다 [SWS_CRYPT_50138].

동시성 및 상호 작용

이 가상 함수는 noexcept(으)로 정의되어 있고 Exception-safe로 간주되며 사양에 따라 thread-safe하게 구현되어 있습니다 [SWS_CRYPT_50138]. SymmetricKey::Sptr의 할당을 위한 유사한 인터페이스는 AuthCipherCtx [SWS_CRYPT_23911] 및 SymmetricKeyWrapperCtx [SWS_CRYPT_24018]와(과) 같은 관련 암호화 컨텍스트에서도 찾을 수 있습니다. 또한 키 컨테이너와의 상호 작용은 대안으로 KeySlot::Sptr을(를) 허용하는 컨텍스트 클래스들에서도 명확히 드러납니다 [SWS_CRYPT_50034].

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

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

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

Parameter (in)

ParameterBeschreibung
keythe SymmetricKey to be used.

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided key object is incompatible with this context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50138@rel:R25-11#014b91bf
Content hash
014b91bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50138
Status: valid/unmigrated Version: rel:R25-11#aa2f4130 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_50138@rel:R25-11#aa2f4130
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

함수 Start [SWS_CRYPT_23625] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0;

Initialize the context for a new encryption or decryption and set the IV used by the context.

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

사용

Start 메서드는 새로운 동기식 암호화 또는 복호화 작업을 위해 컨텍스트 ara::crypto::cryp::SymmetricCipherCtx을(를) 초기화하고 관련 초기화 벡터(IV) 또는 논스 값을 설정합니다 [SWS_CRYPT_23625]. 매개변수 transformDirection을(를) 통해 변환 방향이 결정되며, iv은(는) 초기화 벡터를 ReadOnlyMemRegion(으)로 제공합니다 [SWS_CRYPT_23625]. 버퍼의 허용 크기는 사전에 메서드 GetMinimumInputIvSize() 및 GetMaximumInputIvSize()을(를) 통해 조회할 수 있습니다 [SWS_CRYPT_23625]. 이 호출은 ara::core::Result<void>을(를) 반환하고, noexcept(으)로 선언되어 있으며, 예외 안전(exception safe)한 것으로 간주됩니다 [SWS_CRYPT_23625].

오류 처리

오류 발생 시 롤백 시맨틱을 갖는 오류 코드가 반환됩니다 [SWS_CRYPT_23625]:

  • ara::crypto::CryptoErrc::kUninitializedContext: 컨텍스트가 사전에 키 할당을 통해 초기화되지 않았습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 IV 크기가 지원되지 않습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUnsupported: 지정된 변환 방향으로의 IV 설정 또는 스트림 처리가 컨텍스트에서 지원되지 않습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 현재 비어 있습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kUsageViolation: 허용된 키 용도에 암호화를 위한 kAllowDataEncryption 또는 복호화를 위한 kAllowDataDecryption이(가) 포함되어 있지 않습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kIncompatibleObject: 키 유형이 변환 또는 변환 방향과 호환되지 않습니다 [SWS_CRYPT_23625].
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 [SWS_CRYPT_23625].

동시성 및 상호 작용

이 함수는 스레드 안전(thread-safe)으로 명시되어 있습니다 [SWS_CRYPT_23625]. 스트림 처리 과정에서 Start은(는) 시작 단계로 작동하며, 예를 들어 Seek을(를) 통한 위치 지정 작업 [SWS_CRYPT_23613] 또는 FinishEncrypt을(를) 통한 완료 [SWS_CRYPT_23618] 등이 그 뒤를 따릅니다.

이 텍스트는 AUTOSAR 사양 R25-11을 기반으로 AI 시스템에 의해 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan Initialization Vector (IV) or "nonce" value. The allowed size of the IV can be queried using the functions GetMinimumInputIvSize() and GetMaximumInputIvSize().

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support setting an IV in the given transform Direction or if stream processing is not supported by the context
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23625@rel:R25-11#c21d39bc
Content hash
c21d39bc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23625
Status: valid/unmigrated Version: rel:R25-11#608e87fd 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_23625@rel:R25-11#608e87fd
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a536a6ca2026-09-30
  • R20-11rel:R20-11#6996665a2026-10-14
  • R21-11rel:R21-11#c2b5cf1e2026-10-14
  • R22-11rel:R22-11#25b4dab42026-10-14
  • R23-11rel:R23-11#e01d837d2026-10-14
  • R24-11rel:R24-11#26e85c6c2026-10-14
  • R25-11rel:R25-11#608e87fd2026-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

함수 Start [SWS_CRYPT_50044] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0;

Initialize the context for a new encryption or decryption. An IV is either not required for this context in this transformation direction, or set by the context itself.

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

사용

Start 메서드는 향후 수행될 암호화 또는 복호화([SWS_CRYPT_50044])를 위해 ara::crypto::cryp::SymmetricCipherCtx 인스턴스를 동기식으로 초기화합니다. 이 메서드는 transformDirection 매개변수로 지정된 변환 방향에 초기화 벡터(IV)가 필요하지 않거나 컨텍스트가 이를 직접 생성하는 경우([SWS_CRYPT_50044])에 사용됩니다. 반면 선택한 방향에서 컨텍스트가 명시적 IV를 요구하는 경우에는 IV 매개변수가 포함된 오버로드를 호출해야 합니다([SWS_CRYPT_23625]).

오류 처리 및 동시성

이 연산은 스레드 안전(Thread-safe) 및 예외 안전(Exception-safe)으로 명세되어 있습니다([SWS_CRYPT_50044]). 오류가 발생하면 함수는 롤백 시맨틱을 갖는 ara::core::Result<void>을 반환합니다([SWS_CRYPT_50044]). 관련된 오류 원인은 다음과 같습니다:

  • ara::crypto::CryptoErrc::kUninitializedContext: 컨텍스트에 사전에 키가 할당되지 않았습니다 ([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUnsupported: 스트림 처리가 지원되지 않거나, 해당 방향의 연산에서 IV 설정이 반드시 필요합니다([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kUsageViolation: 키에 필요한 kAllowDataEncryption 또는 kAllowDataDecryption 권한이 없습니다([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kIncompatibleObject 또는 ara::crypto::CryptoErrc::kEmptyKeySlot: 키 유형이 변환과 일치하지 않거나 구성된 키 슬롯이 비어 있습니다([SWS_CRYPT_50044]).
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 현재 사용 중입니다([SWS_CRYPT_50044]).

상호 작용

성공적으로 초기화된 후에는 필요에 따라 Seek를 통해 데이터 스트림의 위치를 지정할 수 있습니다([SWS_CRYPT_23613]). 컨텍스트가 직접 IV를 결정한 경우, 이는 암호화가 끝날 때 FinishEncrypt를 통해 호출자에게 전달됩니다([SWS_CRYPT_23618]).

이 사용 참고사항은 AUTOSAR 사양 R25-11을 바탕으로 자동 작성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV in the given transformDirection or if stream processing is not supported by the context
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 kAllowData Encryption for encryption, or kAllowDataDecryption for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation or the transformation direction

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50044
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50044@rel:R25-11#81e3aa37
Content hash
81e3aa37
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50044
Status: valid/unmigrated Version: rel:R25-11#842f896d 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_50044@rel:R25-11#842f896d
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

함수 Update [SWS_CRYPT_50139] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt or decrypt a data buffer.

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

동기식 메서드 Update()은(는) ara::crypto::cryp::SymmetricCipherCtx에서 부분 데이터 스트림을 단계별로 암호화하거나 복호화하는 역할을 합니다 [SWS_CRYPT_50139]. 이 메서드는 일반 텍스트 또는 암호문이 포함된 입력 버퍼 in(타입 ReadOnlyMemRegion)을(를) 처리하고 변환된 데이터를 출력 버퍼 out(타입 ReadWriteMemRegion)에 씁니다 [SWS_CRYPT_50139]. 반환값 ara::core::Result<std::size_t>은(는) 성공 시 실제로 out에 기록된 정확한 바이트 수를 제공하며, 이는 대상 버퍼의 총 용량보다 작을 수 있습니다 [SWS_CRYPT_50139].

호출에는 정해진 사전 조건과 버퍼 규칙이 적용됩니다:

  • 실행 순서: 데이터 처리는 반드시 사전에 Start() 메서드로 시작되었어야 합니다. 그렇지 않으면 호출이 ara::crypto::CryptoErrc::kProcessingNotStarted(으)로 실패합니다 [SWS_CRYPT_50139].
  • 버퍼 크기 결정: 단일 호출당 허용되는 최대 입력 크기는 GetMaximumChunkSize()을(를) 통해 확인할 수 있습니다 [SWS_CRYPT_50050]. 유효하지 않은 버퍼 크기에 대해 메서드는 ara::crypto::CryptoErrc::kInvalidInputSize(으)로 응답합니다 [SWS_CRYPT_50139]. 필요한 출력 버퍼는 GetRequiredOutputBufferSize()을(를) 통해 조회할 수 있습니다 [SWS_CRYPT_50139]. 버퍼가 너무 작으면 ara::crypto::CryptoErrc::kInsufficientCapacity(으)로 이어집니다 [SWS_CRYPT_50139].
  • 스트리밍 지원: 구체적인 컨텍스트가 지속적인 스트림 처리를 지원하지 않으면 호출이 ara::crypto::CryptoErrc::kUnsupported(으)로 실패합니다 [SWS_CRYPT_50139].

이 인터페이스는 thread-safe 및 exception safe(으)로 명세되어 있으며 모든 오류 시 롤백 시맨틱을 보장합니다 [SWS_CRYPT_50139]. 처리 주기 내에서 GetMaximumChunkSize() 및 Finish() 또는 FinishEncrypt()와(과) 같은 종료 연산과 함께 상호 작용합니다 [SWS_CRYPT_50050].

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

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data will be written into. The required size of this buffer can be queried using GetRequiredOutputBufferSize()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50139@rel:R25-11#909f5c59
Content hash
909f5c59
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50139
Status: valid/unmigrated Version: rel:R25-11#50161066 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_50139@rel:R25-11#50161066
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_50137] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<SymmetricCipherCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/symmetric_cipher_ctx.h"
Scopeclass ara::crypto::cryp::SymmetricCipherCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50137@rel:R25-11#cc32231f
Content hash
cc32231f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50137
Status: valid/unmigrated Version: rel:R25-11#61315479 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_50137@rel:R25-11#61315479
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