DEENESPTFRRUARHIKOZHNL

클래스 ara::crypto::cryp::MessageAuthnCodeCtx

[SWS_CRYPT_22100] Upstream: RS_CRYPTO_02203

class MessageAuthnCodeCtx :           public CryptoContext {...};

Keyed Message Authentication Code Context interface definition.

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

사용자 가이드AI 생성

암호화 Message Authentication Code의 키 기반 계산 및 검증에 사용됩니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: b9d1594d1774 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

암호화 Message Authentication Code의 키 기반 계산 및 검증에 사용됩니다.

이 인터페이스는 임의 길이의 메시지에 대한 Message Authentication Code의 키 기반 계산 및 검증을 지원합니다. [SWS_CRYPT_22118]을 통해 대칭 키로 초기화한 후 시작, 업데이트 및 완료 호출을 통해 단일 단계 또는 스트리밍 방식으로 MAC 다이제스트를 처리할 수 있습니다. 결과 검증 결과는 이후 검색하거나 목표값과 직접 비교할 수 있습니다. 모든 메서드는 스레드 안전한 것으로 명세되어 있으며, 잘못된 절차나 불충분한 버퍼 용량을 [SWS_CRYPT_22116]에 따른 표준화된 반환값을 통해 알립니다.

컨텍스트

MessageAuthnCodeCtx 인터페이스는 키 기반 메시지 인증 코드(Message Authentication Codes, MAC)의 생성 및 검증을 위한 암호화 연산을 정의합니다. 증분 데이터 스트림뿐만 아니라 개별 연속 메모리 블록을 통해 임의 양의 데이터에 대한 진위성 및 무결성 검사를 지원합니다. 인스턴스 관리는 제공되는 스마트 포인터 타입 Sptr [SWS_CRYPT_22101]를 통해 수행됩니다.

주요 상호작용 주체는 호출 애플리케이션 컴포넌트 및 키 객체입니다. 컨텍스트는 대칭 키 객체 SymmetricKey [SWS_CRYPT_22118]을 직접 사용하거나 논리적 저장 위치 KeySlot [SWS_CRYPT_50026]을 통해 구성될 수 있습니다. 데이터 전달은 입력 데이터용 ReadOnlyMemRegion 및 계산된 MAC 다이제스트용 ReadWriteMemRegion와 같은 버퍼 구조를 통해 수행됩니다.

수명 주기

컨텍스트 인스턴스는 초기화부터 MAC 결과 제공까지 정의된 상태 시퀀스를 거칩니다:

  • Uninitialized: 생성 후 컨텍스트는 아직 키를 보유하지 않으며 계산 호출을 거부합니다.
  • Configured: 키 [SWS_CRYPT_22118] 또는 키 저장소 [SWS_CRYPT_50026]를 사용하여 SetKey()을 호출하면 컨텍스트가 초기화됩니다. 이 상태에서는 단일 호출(Single-Call) 메서드를 실행하거나 스트리밍 세션을 시작할 수 있습니다.
  • Processing: 초기화 벡터 없이 Start()을 호출하거나([SWS_CRYPT_22111]) IV와 함께 호출하면([SWS_CRYPT_22110]) 스트리밍 처리가 시작됩니다. 반복되는 Update() [SWS_CRYPT_22113]를 통해 데이터 블록이 공급됩니다. Cancel()를 통해 중단이 가능합니다 [SWS_CRYPT_50027].
  • Finished: 메서드 Finish() [SWS_CRYPT_22115]은 계산을 완료합니다. 그 후 결과를 조회하거나 비교할 수 있습니다.

해석: 완료 또는 중단 후 컨텍스트는 구성된 상태로 유지되며 새로운 연산을 위해 재사용될 수 있을 것으로 추정됩니다. 질문 Q-b61229b77ae88ab0 (열림) 인터페이스의 모든 메서드는 스레드 안전하고 예외 안전한 것으로 명세되어 있습니다.

mac_states Uninitialized Uninitialized Configured Configured Uninitialized->Configured SetKey() Configured->Configured Generate() / Verify() Processing Processing Configured->Processing Start() Processing->Configured Cancel() Processing->Processing Update() Finished Finished Processing->Finished Finish() Finished->Processing Start() Finished->Finished GetDigest() / Compare()

상태 다이어그램: MAC 컨텍스트의 수명 주기 및 상태 전환. 출처: [SWS_CRYPT_22118], [SWS_CRYPT_50026], [SWS_CRYPT_22110], [SWS_CRYPT_22111], [SWS_CRYPT_22113], [SWS_CRYPT_22115], [SWS_CRYPT_50027], [SWS_CRYPT_22116], [SWS_CRYPT_50029], [SWS_CRYPT_50031]

사용 경로

인터페이스는 증분 스트리밍과 단일 호출 처리라는 두 가지 전형적인 사용 경로를 지원합니다.

스트리밍 경로에서 호출자는 먼저 SetKey() [SWS_CRYPT_22118]을 통해 키를 바인딩합니다. 시작하기 전에 GetRecommendedIvSize() [SWS_CRYPT_50135]을 통해 권장 IV 크기와 같은 알고리즘 매개변수 및 GetMaximumChunkSize() [SWS_CRYPT_50033]를 통해 최대 청크 크기를 쿼리할 수 있습니다. Start() [SWS_CRYPT_22110]을 호출한 후 메시지 조각들이 Update()을 통해 연속적으로 처리됩니다 [SWS_CRYPT_22113]. 모든 데이터가 전달되면 Finish()이 계산을 완료합니다 [SWS_CRYPT_22115]. 생성된 다이제스트는 이후 GetDigest()를 통해 버퍼로 복사되며 [SWS_CRYPT_22116], 이 버퍼의 최소 크기는 사전에 GetDigestSize()를 통해 확인할 수 있습니다 [SWS_CRYPT_50134]. 대안으로 Compare() [SWS_CRYPT_50133] 또는 CompareSubspan() [SWS_CRYPT_50028]를 사용하면 예상되는 기준값과 직접 비교할 수 있습니다.

메시지 인증 코드의 스트리밍 계산애플리케이션MessageAuthnCodeCtxSetKey(key)Result<void>Start(iv)Result<void>loop각 데이터 블록에 대해Update(chunk)Result<void>Finish()Result<void>GetDigest(digest)Result<size_t>

시퀀스 다이어그램: 스트리밍 모드에서의 증분 MAC 계산 절차. 출처: [SWS_CRYPT_22118], [SWS_CRYPT_22110], [SWS_CRYPT_22113], [SWS_CRYPT_22115], [SWS_CRYPT_22116]

전체 메시지가 이미 완전히 존재하는 경우 스트리밍 없이 Generate() [SWS_CRYPT_50029]을 통해 또는 GenerateSubspan() [SWS_CRYPT_50030]을 통해 단축된 형태로 한 단계에서 계산을 수행할 수 있습니다. 검증을 위해서는 이와 유사하게 Verify() [SWS_CRYPT_50031] 및 VerifySubspan() [SWS_CRYPT_50032] 메서드가 제공됩니다.

오류 시나리오

오류는 반환 타입 ara::core::Result을 통해 보고되며 다음과 같은 원인을 다룹니다:

이 클래스 가이드는 crypto 모듈에 대한 AUTOSAR Adaptive R25-11 사양을 기반으로 합니다.

멤버 맵

클래스 다이어그램

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

G nara__crypto__cryp__MessageAuthnCodeCtx845 MessageAuthnCodeCtx + Cancel() + Compare() + CompareSubspan() + Finish() + Generate() + GenerateSubspan() + GetDigest() + GetDigestSize() + GetMaximumChunkSize() + GetRecommendedIvSize() + SetKey() + Start() + Update() + Verify() + VerifySubspan() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__MessageAuthnCodeCtx845->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;
Compare 함수

Compare the size and content of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;
Finish 함수

Finish the MAC calculation.

virtual ara::core::Result< void > Finish () noexcept=0;
Generate 함수

Calculate a MAC digest and write it to the provided output buffer.

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;
GetDigest 함수

Write the calculated MAC digest into the provided output buffer.

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

Get the output digest size.

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

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

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

virtual ara::core::Result< std::size_t > GetRecommendedIvSize () const noexcept=0;
SetKey 함수 2

Configure the context to use the provided key.

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

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

오버로드 Start 2
virtual ara::core::Result< void > Start (ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_22110
virtual ara::core::Result< void > Start () noexcept=0; SWS_CRYPT_22111
Update 함수

Update the MAC calculation context by a new part of the message.

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;
Verify 함수

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

타입 별칭

Sptr 타입 별칭

Smart pointer of the interface.

메서드 문서

함수 Cancel [SWS_CRYPT_50027] 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 · 온도: 제어 불가 · 프롬프트: 53954aee5980 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

순수 가상 메서드 Cancel은 인터페이스 ara::crypto::cryp::MessageAuthnCodeCtx에서 이전에 Start()를 통해 시작되었으나 아직 완료되지 않은 스트리밍 작업을 중단하는 역할을 합니다[SWS_CRYPT_50027]. 호출은 동기식으로 수행되고 전달 매개변수를 받지 않으며, 성공 시 작업의 성공적인 중단을 확인하는 빈 ara::core::Result<void>를 반환합니다[SWS_CRYPT_50027].

호출 전에 데이터 처리가 Start() 메서드를 통해 적절히 시작되지 않은 경우 실행이 실패합니다. 이 경우 함수는 롤백 시맨틱을 보장하면서 특정 오류 코드 ara::crypto::CryptoErrc::kProcessingNotStarted을 갖는 결과를 반환합니다[SWS_CRYPT_50027]. 실행 안전성과 관련하여 이 인터페이스는 스레드 안전(thread-safe)으로 명시되어 있으며, noexcept으로 선언되어 예외를 던지지 않으므로 예외 안전성(exception safe)을 보장합니다[SWS_CRYPT_50027].

암호화 모듈의 모든 관련 컨텍스트 인터페이스는 아직 완료되지 않은 스트리밍 처리에 대해 동일한 중단 동작을 공유합니다:

해석: 미완료된 작업을 중단함으로써 컨텍스트는 나중에 Start()을 통한 재초기화를 허용하는 정리된 상태로 복원될 것으로 보입니다. 질문 Q-a8fa5cb85c3dab50 (열림)

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

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

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50027
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50027@rel:R25-11#2f9c619b
Content hash
2f9c619b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50027
Status: valid/unmigrated Version: rel:R25-11#c993fffd 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_50027@rel:R25-11#c993fffd
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

함수 Compare [SWS_CRYPT_50133] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the size and content of the calculated MAC digest against an expected value.

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

사용

ara::crypto::cryp::MessageAuthnCodeCtx 클래스의 순수 가상 메서드 Compare은(는) 계산된 메시지 인증 코드(MAC)의 크기와 내용을 예상 다이제스트와 대조하는 역할을 합니다 [SWS_CRYPT_50133]. 매개변수로는 예상 MAC 다이제스트가 ReadOnlyMemRegion expected을(를) 통해 전달됩니다. 이 함수는 계산된 MAC 값이 예상 값과 정확히 일치하는 경우 true을(를) 포함하고 그렇지 않은 경우 false을(를) 포함하는 ara::core::Result<bool>을(를) 반환합니다 [SWS_CRYPT_50133].

오류 처리

오류 발생 시 결과 객체에 오류 코드가 반환되며, 롤백 시맨틱이 적용됩니다 [SWS_CRYPT_50133]:

  • ara::crypto::CryptoErrc::kProcessingNotFinished: 다이제스트 계산이 사전에 Finish() 메서드 호출을 통해 완료되지 않은 경우 보고됩니다 [SWS_CRYPT_50133].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 예상 MAC 다이제스트의 버퍼 크기가 컨텍스트에서 지원되지 않을 때 발생합니다 [SWS_CRYPT_50133].

동시성 및 제약사항

이 메서드는 const 및 noexcept(으)로 선언되어 있으며, 명세에 따라 스레드 안전(thread-safe) 및 예외 안전(exception safe)합니다 [SWS_CRYPT_50133]. 필수적인 사전 조건은 사전에 Finish()을(를) 통해 성공적으로 완료된 다이제스트 계산입니다 [SWS_CRYPT_50133].

상호 작용

전체 MAC 다이제스트의 완전한 일치 여부를 검증하는 Compare과(와) 달리 [SWS_CRYPT_50133], CompareSubspan은(는) 동일한 컨텍스트에서 최상위 비트(most significant bits)만을 예상 값과 비교합니다 [SWS_CRYPT_50028]. 키가 없는 해시 함수의 경우 ara::crypto::cryp::HashFunctionCtx에 동일한 이름의 Compare 함수가 존재합니다 [SWS_CRYPT_50154].

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the expected MAC value equals the calculated MAC value, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50133@rel:R25-11#7807b230
Content hash
7807b230
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50133
Status: valid/unmigrated Version: rel:R25-11#0e62292d 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_50133@rel:R25-11#0e62292d
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

함수 CompareSubspan [SWS_CRYPT_50028] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > CompareSubspan (ReadOnlyMemRegion expected) const noexcept=0;

Compare the most significant bits of the calculated MAC digest against an expected value.

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

ara::crypto::cryp::MessageAuthnCodeCtx 클래스의 동기식 메서드 CompareSubspan은 계산된 MAC 값의 최상위 비트(Most Significant Bits)를 지정된 기준과 비교합니다[SWS_CRYPT_50028]. 예상되는 비교값은 매개변수 expected을 통해 ReadOnlyMemRegion로 전달됩니다[SWS_CRYPT_50028]. 결과는 ara::core::Result<bool>으로 반환되며, 최상위 비트가 일치할 경우 true을 포함하고 차이가 있을 경우 false을 포함합니다[SWS_CRYPT_50028].

오류 처리 및 실행 조건

유효한 비교를 위해서는 검사값 계산이 완료되어야 합니다. 사전에 Finish() 메서드를 호출하지 않은 경우, 호출은 오류 코드 ara::crypto::CryptoErrc::kProcessingNotFinished과 함께 실패합니다[SWS_CRYPT_50028]. 전달된 매개변수 expected의 버퍼 크기가 사용된 절차에 대해 유효하지 않은 경우, 메서드는 ara::crypto::CryptoErrc::kInvalidInputSize를 보고합니다[SWS_CRYPT_50028]. 두 오류 유형 모두 롤백 시맨틱을 보장합니다[SWS_CRYPT_50028].

동시성 및 실행 컨텍스트

이 작업은 noexcept(예외 안전)으로 명세되어 있으며 스레드 안전(thread-safe)으로 분류되어 있습니다[SWS_CRYPT_50028]. 해석: 선언된 스레드 안전성은 Finish()가 완료된 후의 상태를 의미할 것으로 보이며, 이에 따라 여러 스레드가 계산된 동일한 다이제스트를 병렬로 검증할 수 있습니다. 질문 Q-ac8b7ead6a5b508e (열림)

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

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

Parameter (in)

ParameterBeschreibung
expectedthe expected MAC digest

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the most-significant bits of the calculated MAC equal the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the expected MAC digest is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50028
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50028@rel:R25-11#2b1ffbfa
Content hash
2b1ffbfa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50028
Status: valid/unmigrated Version: rel:R25-11#e7ce513a 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_50028@rel:R25-11#e7ce513a
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_22115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02203

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

Finish the MAC calculation.

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

메서드 Finish()은(는) 인터페이스 MessageAuthnCodeCtx 내에서 Message Authentication Code (MAC)의 진행 중인 계산을 확정적으로 완료합니다 [SWS_CRYPT_22115]. 호출은 동기적으로 수행되며, 매개변수를 받지 않고 ara::core::Result<void>을(를) 반환하는데, 이는 일반적인 성공 시 빈 결과를 나타냅니다 [SWS_CRYPT_22115].

오류 발생 시, 호출 전에 MAC 계산이 성공적으로 시작되지 않은 경우 함수는 오류 코드 ara::crypto::CryptoErrc::kProcessingNotStarted을(를) 반환하며, 이때 롤백 시맨틱이 적용됩니다 [SWS_CRYPT_22115]. 작업은 noexcept(으)로 선언되어 있으며 사양에 따라 예외 안전(exception safe) 및 스레드 안전(thread-safe) 모두로 명시되어 있습니다 [SWS_CRYPT_22115].

처리 흐름에서 Finish()은(는) 데이터 처리와 평가 간의 연결고리를 형성합니다. 호출 후 생성된 MAC 다이제스트는 GetDigest()을(를) 통해 제공된 버퍼로 전송되거나 [SWS_CRYPT_22116], CompareSubspan()을(를) 사용하여 기준값과 직접 비교 검증될 수 있습니다 [SWS_CRYPT_50028]. GetMaximumChunkSize() [SWS_CRYPT_50033]이(가) Update() 또는 Finish()에 대한 버퍼 크기를 일반적인 방식으로 설명하는 반면, Finish()은(는) 여기서 데이터를 직접 처리하지 않습니다. 요구사항에서의 언급은 아마도 모든 암호화 컨텍스트에 걸친 일관된 패턴을 반영하는 것으로 추정됩니다. 질문 Q-79b4f4ecf3998e48 (열림)

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the MAC calculation has not been started successfully.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22115@rel:R25-11#68e10ee6
Content hash
68e10ee6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22115
Status: valid/unmigrated Version: rel:R25-11#e646e46d 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_22115@rel:R25-11#e646e46d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7d2b83f62026-09-30
  • R20-11rel:R20-11#a059cf072026-10-14
  • R21-11rel:R21-11#760e02282026-10-14
  • R22-11rel:R22-11#194848542026-10-14
  • R23-11rel:R23-11#499debd32026-10-14
  • R24-11rel:R24-11#d34af0022026-10-14
  • R25-11rel:R25-11#e646e46d2026-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

함수 Generate [SWS_CRYPT_50029] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > Generate (ReadOnlyMemRegion data, ReadWriteMemRegion digest, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and write it to the provided output buffer.

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

클래스 ara::crypto::cryp::MessageAuthnCodeCtx의 동기 멤버 함수 Generate은 [SWS_CRYPT_50029]에 따라 단일 단계에서 메시지 인증 코드(MAC)를 계산하고 계산된 다이제스트를 제공된 출력 버퍼에 기록하는 역할을 합니다.

호출을 위해 다음 매개변수가 전달됩니다:

  • data: MAC 계산을 위한 입력 데이터(ReadOnlyMemRegion 형식).
  • digest: 다이제스트가 기록될 ReadWriteMemRegion 형식의 대상 메모리 영역.
  • iv: 선택적 초기화 벡터(ara::core::Optional<ReadOnlyMemRegion> 형식).

성공 시 함수는 기록된 MAC 다이제스트의 바이트 크기를 포함하는 ara::core::Result<std::size_t>을 반환합니다 [SWS_CRYPT_50029].

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

  • UninitializedContext: 컨텍스트가 키 할당을 통해 아직 초기화되지 않았습니다.
  • ara::crypto::CryptoErrc::kUsageViolation: 사용된 키에 필수 용도 플래그 kAllowMac이(가) 없습니다. 해석: 적절한 대칭 키가 사전에 GenerateSymmetricKey을 통해 생성 및 구성되어야 할 것으로 보입니다 [SWS_CRYPT_20721]. 질문 Q-d22f397bbc02487b (열림)
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 현재 비어 있습니다.
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출(Single-Call) 처리가 지원되지 않거나 초기화 벡터 지정이 알고리즘 요구사항을 충족하지 않습니다(IV 누락 또는 잘못 지정됨).
  • ara::crypto::CryptoErrc::kInvalidInputSize: 입력 데이터 또는 IV의 버퍼 크기가 지원되지 않습니다.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 대상 버퍼 digest이(가) MAC 다이제스트를 담기에 너무 작습니다.
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 시스템 리소스가 점유되어 있습니다.

동시성과 관련하여 이 메서드는 thread-safe 및 exception safe(으)로 명시되어 있습니다 [SWS_CRYPT_50029]. 이 메서드는 const noexcept(으)로 선언되어 있으며 실행 시 컨텍스트의 상태를 변경하지 않습니다.

이 사용 지침은 자동으로 생성되었으며 R25-11 릴리스의 AUTOSAR Adaptive 사양을 기반으로 합니다.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50029
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50029@rel:R25-11#062c5296
Content hash
062c5296
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50029
Status: valid/unmigrated Version: rel:R25-11#66865bf3 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_50029@rel:R25-11#66865bf3
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

함수 GenerateSubspan [SWS_CRYPT_50030] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GenerateSubspan (ReadOnlyMem Region data, ReadWriteMemRegion truncatedDigest, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and fill the provided output buffer with the beginning (MSB) of the calculated digest.

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

클래스 ara::crypto::cryp::MessageAuthnCodeCtx의 메서드 GenerateSubspan은(는) 단일 단계에서 입력 데이터에 대한 Message Authentication Code (MAC)를 계산하고 data 계산된 다이제스트의 시작 부분(최상위 바이트, MSB)을 출력 버퍼 truncatedDigest에 씁니다 [SWS_CRYPT_50030]. 필요한 경우 선택적 매개변수 iv을(를) 통해 초기화 벡터를 전달할 수 있습니다 [SWS_CRYPT_50030]. ara::core::Result<std::size_t>의 직접적인 반환은 동기식 실행을 나타내는 것으로 보이며, 성공적으로 완료되면 MAC 다이제스트의 기록된 바이트 수가 반환됩니다 [SWS_CRYPT_50030]. 질문 Q-167c6d44b9f39fed (열림)

사양은 오류 발생 시 롤백 시맨틱을 정의하고 다음과 같은 오류 코드를 규정합니다 [SWS_CRYPT_50030]:

  • UninitializedContext: 컨텍스트가 사전에 키 할당을 통해 초기화되지 않았습니다 [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 현재 비어 있습니다 [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUsageViolation: 키의 허용된 사용 권한에 kAllowMac이(가) 포함되어 있지 않습니다 [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kUnsupported: 단일 단계 처리가 지원되지 않거나 IV 구성이 컨텍스트와 일치하지 않습니다(필수 IV 누락 또는 허용되지 않는 IV 전달) [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 데이터 data 또는 iv의 크기가 지원되지 않습니다 [SWS_CRYPT_50030].
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 [SWS_CRYPT_50030].

실행 환경과 관련하여 이 메서드는 thread-safe로 명시되어 있으며 예외 안전성(noexcept)을 제공합니다 [SWS_CRYPT_50030]. 오류 없는 호출을 위한 전제 조건은 컨텍스트에서 적절한 권한을 가진 키를 사전에 제공하는 것입니다 [SWS_CRYPT_50030].

이 텍스트는 AI에 의해 생성되었으며 참고용으로 제공됩니다. 공식 AUTOSAR 명세서가 기준이 됩니다.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
truncatedDigestan output data buffer that the beginning of the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call processing is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50030
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50030@rel:R25-11#7891543e
Content hash
7891543e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50030
Status: valid/unmigrated Version: rel:R25-11#10f782d6 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_50030@rel:R25-11#10f782d6
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

함수 GetDigest [SWS_CRYPT_22116] Upstream: RS_CRYPTO_02203

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

Write the calculated MAC digest into the provided output buffer.

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

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the MAC digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the MAC digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the MAC calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22116@rel:R25-11#8186c8ed
Content hash
8186c8ed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22116
Status: valid/unmigrated Version: rel:R25-11#0213970e 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_22116@rel:R25-11#0213970e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#f62c871b2026-09-30
  • R20-11rel:R20-11#97dd7dc32026-10-14
  • R21-11rel:R21-11#73d2dfec2026-10-14
  • R22-11rel:R22-11#086949e02026-10-14
  • R23-11rel:R23-11#c0af69462026-10-14
  • R24-11rel:R24-11#601580872026-10-14
  • R25-11rel:R25-11#0213970e2026-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

함수 GetDigestSize [SWS_CRYPT_50134] Upstream: RS_CRYPTO_02309

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

Get the output digest size.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the hash digest 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_50134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50134@rel:R25-11#a98da06a
Content hash
a98da06a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50134
Status: valid/unmigrated Version: rel:R25-11#2e6c359a 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_50134@rel:R25-11#2e6c359a
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

함수 GetMaximumChunkSize [SWS_CRYPT_50033] 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() or Finish() by this context.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
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_50033
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50033@rel:R25-11#e92f4d59
Content hash
e92f4d59
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50033
Status: valid/unmigrated Version: rel:R25-11#74ba2c5f 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_50033@rel:R25-11#74ba2c5f
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

함수 GetRecommendedIvSize [SWS_CRYPT_50135] Upstream: RS_CRYPTO_02309

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

Get default expected size of the Initialization Vector (IV) or nonce, e.g., 12 bytes for GMAC, 0 bytes for CMAC.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >default expected 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_50135
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50135@rel:R25-11#5accc2cf
Content hash
5accc2cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50135
Status: valid/unmigrated Version: rel:R25-11#b1b43096 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_50135@rel:R25-11#b1b43096
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_22118] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0;

Configure the context to use the provided key.

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

메서드 SetKey은(는) 제공된 대칭 키 [SWS_CRYPT_22118]을(를) 사용하여 후속 MAC 계산을 수행하도록 ara::crypto::cryp::MessageAuthnCodeCtx의 인스턴스를 구성합니다. 호출은 동기식으로 수행되며 키 객체를 스마트 포인터 SymmetricKey::Sptr(으)로 전달받습니다. 함수는 성공 시 비어 있거나 오류 시 특정 오류 코드를 캡슐화하는 ara::core::Result<void>을(를) 결과로 반환합니다 [SWS_CRYPT_22118].

할당이 실패하면 컨텍스트의 이전 상태를 보존하는 롤백 의미론(rollback semantics)이 적용됩니다 [SWS_CRYPT_22118]. ara::crypto::CryptoErrc의 다음 오류 상태가 명시되어 있습니다:

  • kUnsupported: 컨텍스트가 직접적인 키 객체 대신 KeySlot을(를) 통한 바인딩만 지원합니다 [SWS_CRYPT_22118].
  • kIncompatibleObject: 전달된 대칭 키 객체가 대상 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_22118].
  • kUsageViolation: 키의 권한 플래그에 필수적인 사용 용도 kAllowMac이(가) 포함되어 있지 않습니다 [SWS_CRYPT_22118].

실행 안전성과 관련하여 인터페이스는 thread-safe 및 exception safe(noexcept 포함)(으)로 정의됩니다 [SWS_CRYPT_22118]. 키 관리와의 상호작용에서 이는 슬롯 기반 할당의 직접적인 대응물 역할을 합니다. 즉, 구현이나 사용 사례에서 영구 슬롯 사용을 지원하는 경우 대신 KeySlot::Sptr에 대한 오버로드가 사용됩니다 [SWS_CRYPT_50026].

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

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

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

Parameter (in)

ParameterBeschreibung
keysymmetric key object used for MAC calculation

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
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22118
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22118@rel:R25-11#1925e6c5
Content hash
1925e6c5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22118
Status: valid/unmigrated Version: rel:R25-11#e40511f7 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_22118@rel:R25-11#e40511f7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#c6787c932026-09-30
  • R20-11rel:R20-11#02ea3abd2026-10-14
  • R21-11rel:R21-11#a4675ce22026-10-14
  • R22-11rel:R22-11#d5224dc92026-10-14
  • R23-11rel:R23-11#5cceac172026-10-14
  • R24-11rel:R24-11#6e177cb62026-10-14
  • R25-11rel:R25-11#e40511f72026-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_50026] 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 MAC calculation is started.

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

사용

헤더 파일 ara/crypto/cryp/message_authn_code_ctx.h의 인터페이스 ara::crypto::cryp::MessageAuthnCodeCtx의 가상 멤버 함수 SetKey은 메시지 인증 코드(MAC)의 계산 또는 검증을 위한 컨텍스트를 구성합니다 [SWS_CRYPT_50026]. 이 동기 메서드는 대칭 키를 보유하는 KeySlot::Sptr 타입의 스마트 포인터 keySlot를 매개변수로 받아 ara::core::Result<void>을 반환합니다 [SWS_CRYPT_50026]. 키 바인딩은 의미론적으로 지연됩니다. 즉, 슬롯에 저장된 키는 MAC 계산이 실제로 시작되는 시점에 비로소 참조됩니다 [SWS_CRYPT_50026]. 해석: 따라서 계산 시작 전까지의 슬롯 내용에 대한 사후 업데이트는 유효하게 유지될 것으로 보입니다. 질문 Q-d1886811d8af71e3 (열림)

동시성 및 실행 안전성

이 인터페이스는 noexcept으로 정의되어 예외 안전성(exception safe)을 보장하며, 동시 호출(thread-safe)에 대해 명시적으로 지정되어 있습니다 [SWS_CRYPT_50026].

오류 처리 및 상호 작용

오류 발생 시 이 메서드는 엄격한 롤백 시맨틱을 보장하므로 컨텍스트의 이전 상태가 완전히 유지됩니다 [SWS_CRYPT_50026]. 결과 객체에는 다음 오류 코드가 나타날 수 있습니다:

  • ara::crypto::CryptoErrc::kIncompatibleObject: 전달된 KeySlot이 이 대칭 키 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_50026].
  • ara::crypto::CryptoErrc::kUnsupported: 컨텍스트의 구체적인 구현이 KeySlot을 통한 설정을 지원하지 않습니다 [SWS_CRYPT_50026]. 이 경우 키를 직접 전달하는 대체 오버로드 SetKey(SymmetricKey::Sptr)을 사용해야 합니다 [SWS_CRYPT_22118].

이 사용 지침은 사양 데이터를 기반으로 자동 생성되었습니다.

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

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a symmetric key

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided keySlot is incompatible with this symmetric key 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_50026
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50026@rel:R25-11#f3761799
Content hash
f3761799
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50026
Status: valid/unmigrated Version: rel:R25-11#3de24834 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_50026@rel:R25-11#3de24834
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_22110] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation and set an IV (e.g., used for GMAC)

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

ara::crypto::cryp::MessageAuthnCodeCtx의 Start 메서드는 새 MAC 계산을 위한 컨텍스트를 초기화하며, 이때 매개변수 iv을(를) 통해 초기화 벡터 또는 논스(nonce) 값을 설정합니다 ([SWS_CRYPT_22110]). 이는 예를 들어 GMAC와 같은 알고리즘에서 사용됩니다 ([SWS_CRYPT_22110]). 명시적인 초기화 벡터가 없는 계산의 경우, 매개변수가 없는 오버로드 Start()을(를) 대안으로 사용할 수 있습니다 ([SWS_CRYPT_22111]).

사용 및 동시성

호출은 동기식으로 수행되며 thread-safe 및 exception safe(으)로 명시되어 있습니다 ([SWS_CRYPT_22110]). 성공적으로 호출한 후에는 Update을(를) 사용하여 컨텍스트에 메시지 부분을 순차적으로 전달할 수 있습니다 ([SWS_CRYPT_22113]). 진행 중이며 아직 완료되지 않은 스트리밍 작업은 필요한 경우 Cancel을(를) 통해 중단할 수 있습니다 ([SWS_CRYPT_50027]).

오류 처리

이 메서드는 ara::core::Result<void>을(를) 반환하며, 이는 오류 발생 시 롤백 시맨틱을 갖습니다 ([SWS_CRYPT_22110]). 가능한 오류 상태는 다음과 같습니다:

  • UninitializedContext: 컨텍스트에 사전에 키가 할당되지 않았습니다 ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 비어 있습니다 ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUsageViolation: 키의 권한에 kAllowMac이(가) 포함되어 있지 않습니다 ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 IV 크기가 지원되지 않습니다 ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kUnsupported: 알고리즘 또는 컨텍스트에서 스트리밍 또는 IV 설정을 지원하지 않습니다 ([SWS_CRYPT_22110]).
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 ([SWS_CRYPT_22110]).

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

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

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

Parameter (in)

ParameterBeschreibung
ivan Initialization Vector (IV) or "nonce" value

Rückgabewert

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

Fehler

FehlercodeBeschreibung
UninitializedContextif 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 streaming or the algorithm does not support setting an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22110
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22110@rel:R25-11#35d430f5
Content hash
35d430f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22110
Status: valid/unmigrated Version: rel:R25-11#a5427060 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_22110@rel:R25-11#a5427060
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#ce38532b2026-09-30
  • R20-11rel:R20-11#15ffee6c2026-10-14
  • R21-11rel:R21-11#a3f8962f2026-10-14
  • R22-11rel:R22-11#fad6ef962026-10-14
  • R23-11rel:R23-11#765095392026-10-14
  • R24-11rel:R24-11#55625d952026-10-14
  • R25-11rel:R25-11#a54270602026-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_22111] Upstream: RS_CRYPTO_02302

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

Initialize the context for a new MAC calculation.

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

사용

Start() 메서드는 새로운 MAC 계산을 위해 ara::crypto::cryp::MessageAuthnCodeCtx의 인스턴스를 초기화합니다 [SWS_CRYPT_22111]. 이 호출은 매개변수를 받지 않으며 ara::core::Result<void>를 반환합니다 [SWS_CRYPT_22111]. 결과 객체가 즉시 제공되므로 실행은 동기적으로 이루어질 것으로 추정됩니다. 질문 Q-1e6e36f4ed1176d3 (열림)

오류 처리 및 동시성

초기화 중에 오류가 발생하면 롤백 시맨틱이 적용되고 다음 오류 코드 중 하나가 반환됩니다 [SWS_CRYPT_22111]:

  • UninitializedContext: 컨텍스트에 사전에 키가 할당되지 않았습니다 [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUnsupported: 컨텍스트가 스트리밍을 지원하지 않거나 알고리즘이 초기화 벡터(IV)를 반드시 요구합니다 [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 비어 있습니다 [SWS_CRYPT_22111].
  • ara::crypto::CryptoErrc::kUsageViolation: 키가 kAllowMac 설정 없이는 MAC 계산을 허용하지 않습니다 [SWS_CRYPT_22111].

해당 함수는 스레드 안전하며 예외 안전(exception safe)한 것으로 명세되어 있습니다 [SWS_CRYPT_22111].

스트리밍 흐름에서의 상호작용

알고리즘이 IV를 요구하는 경우(예: GMAC), 대신 Start(ReadOnlyMemRegion iv) 오버로드를 사용해야 합니다 [SWS_CRYPT_22110]. 호출이 성공하면 Update()를 통해 메시지 데이터를 단계적으로 전달할 수 있습니다 [SWS_CRYPT_22113]. 아직 완료되지 않은 스트리밍 작업은 Cancel()를 통해 폐기할 수 있습니다 [SWS_CRYPT_50027].

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

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

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support streaming or the algorithm requires setting an IV
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22111
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22111@rel:R25-11#8f84f5d4
Content hash
8f84f5d4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22111
Status: valid/unmigrated Version: rel:R25-11#7b2a29d5 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_22111@rel:R25-11#7b2a29d5
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d8957c992026-09-30
  • R20-11rel:R20-11#93def7c72026-10-14
  • R21-11rel:R21-11#268430762026-10-14
  • R22-11rel:R22-11#55642f832026-10-14
  • R23-11rel:R23-11#8f849ff62026-10-14
  • R24-11rel:R24-11#fa181e4f2026-10-14
  • R25-11rel:R25-11#7b2a29d52026-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

함수 Update [SWS_CRYPT_22113] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;

Update the MAC calculation context by a new part of the message.

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

사용

컨텍스트 ara::crypto::cryp::MessageAuthnCodeCtx의 동기 메서드 Update는 진행 중인 메시지 인증 코드(MAC) 계산에 입력 메시지의 추가 단편을 덧붙이는 데 사용됩니다 [SWS_CRYPT_22113]. 처리할 데이터 섹션은 ReadOnlyMemRegion 형태의 data 매개변수를 통해 전달됩니다. 반환값으로 이 함수는 성공적인 중간 단계를 확인하거나 오류 발생 시 오류 원인에 대한 정보를 제공하는 ara::core::Result<void>를 반환합니다 [SWS_CRYPT_22113].

오류 처리 및 동시성

오류 발생 시 롤백 시맨틱이 보장되므로 이전의 계산 상태가 변경되지 않고 유지됩니다 [SWS_CRYPT_22113]. 가능한 오류 원인은 다음과 같습니다:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: 계산이 사전에 Start() 메서드 호출을 통해 시작되지 않았습니다 [SWS_CRYPT_22113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 데이터 블록의 크기를 컨텍스트에서 지원하지 않습니다 [SWS_CRYPT_22113].

이 메서드는 noexcept로 선언되어 있으며 스레드 안전 및 예외 안전(exception safe)한 것으로 명세되어 있습니다 [SWS_CRYPT_22113].

상호 작용

ara::crypto::CryptoErrc::kInvalidInputSize를 통한 버퍼 오류를 방지하기 위해, 개별 호출에 허용되는 최대 입력 크기를 GetMaximumChunkSize() 메서드를 통해 사전에 조회할 수 있습니다 [SWS_CRYPT_50033]. 모든 메시지 부분을 연속적으로 처리한 후 MAC 태그 계산은 해석상 일반적으로 Finish() 메서드를 통해 완료될 것으로 추정됩니다 [SWS_CRYPT_50033]. 질문 Q-7f8eaf8ebbf30d55 (열림)

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

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

Parameter (in)

ParameterBeschreibung
dataa part of the input message that should be processed

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the digest calculation was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22113@rel:R25-11#8a0c81bd
Content hash
8a0c81bd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22113
Status: valid/unmigrated Version: rel:R25-11#36f72b69 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_22113@rel:R25-11#36f72b69
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#fa55dfba2026-09-30
  • R20-11rel:R20-11#f6d1433b2026-10-14
  • R21-11rel:R21-11#c608c8842026-10-14
  • R22-11rel:R22-11#a558bc872026-10-14
  • R23-11rel:R23-11#67ff09652026-10-14
  • R24-11rel:R24-11#8f531e602026-10-14
  • R25-11rel:R25-11#36f72b692026-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

함수 Verify [SWS_CRYPT_50031] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Verify (ReadOnlyMemRegion data, Read OnlyMemRegion expected, ara::core::Optional< ReadOnlyMemRegion > iv) const noexcept=0;

Calculate a MAC digest and compare the calculated MAC digest against an expected value.

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

사용

ara::crypto::cryp::MessageAuthnCodeCtx의 메서드 Verify([SWS_CRYPT_50031])은 입력 버퍼 data에 대한 MAC 다이제스트를 동기적으로 계산하고 이를 예상 값 expected과(와) 직접 비교하는 역할을 합니다. 선택적으로 iv를 통해 초기화 벡터를 전달할 수 있습니다. 결과로서 함수는 ara::core::Result<bool>을 반환하며, 이는 계산된 MAC이 예상 바이트 시퀀스와 일치하는 경우 true을(를) 포함하고 그렇지 않은 경우 false을(를) 포함합니다.

오류 처리

시스템적 또는 암호화적 이유로 검증에 실패하면, 메서드는 해당 오류 코드가 포함된 ara::core::Result을 반환합니다([SWS_CRYPT_50031]):

  • UninitializedContext: 컨텍스트가 사전에 키 할당을 통해 초기화되지 않은 경우.
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이(가) 비어 있는 경우.
  • ara::crypto::CryptoErrc::kUsageViolation: 키의 허용된 용도에 kAllowMac이(가) 포함되지 않은 경우.
  • ara::crypto::CryptoErrc::kInvalidInputSize: data, expected 또는 iv의 버퍼 크기가 허용되지 않는 경우.
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출(Single-Call) 실행이 지원되지 않거나 iv의 제공이 알고리즘 요구사항을 충족하지 않는 경우.
  • ara::crypto::CryptoErrc::kBusyResource: 리소스 충돌 발생 시.

동시성 및 상호 작용

이 메서드는 thread-safe 및 exception safe(으)로 명시되어 있습니다([SWS_CRYPT_50031]). 오류 발생 시 롤백 시맨틱이 적용됩니다. ara::crypto::cryp::VerifierPublicCtx의 비대칭 서명 검증([SWS_CRYPT_24112], [SWS_CRYPT_50024])과 달리, Verify은 대칭 MAC 컨텍스트에서 작동합니다. 단일 호출에서 처리할 수 있는 최대 버퍼 크기는 서명 검증기의 버퍼 쿼리([SWS_CRYPT_50025])와 유사하게 컨텍스트 구현에 의해 제한될 것으로 보입니다. 질문 Q-51e7427e4e082881 (열림)

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

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

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

함수 VerifySubspan [SWS_CRYPT_50032] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > VerifySubspan (ReadOnlyMemRegion data, ReadOnlyMemRegion expected, ara::core::Optional< ReadOnlyMem Region > iv) const noexcept=0;

Calculate a MAC digest and compare the most-significant bits of the calculated MAC digest against an expected value.

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

클래스 ara::crypto::cryp::MessageAuthnCodeCtx의 메서드 VerifySubspan은(는) MAC 다이제스트의 동기식 계산 및 가장 유의미한 비트와 예상 바이트 시퀀스의 후속 비교에 사용됩니다 [SWS_CRYPT_50032]. data을(를) 통한 입력 데이터, expected을(를) 통한 예상 선행 비트, iv을(를) 통한 선택적 초기화 벡터를 처리합니다 [SWS_CRYPT_50032]. 결과는 ara::core::Result<bool>(으)로 반환되며 성공적으로 일치하면 true, 그렇지 않으면 false을(를) 신호합니다 [SWS_CRYPT_50032].

이 인터페이스는 noexcept(으)로 명시되어 있고, exception safe 및 thread-safe이며 오류 발생 시 롤백 시맨틱을 적용합니다 [SWS_CRYPT_50032]. 실패한 호출은 반환값에서 특정 오류 코드를 제공합니다 [SWS_CRYPT_50032]:

  • UninitializedContext: 키를 할당하여 컨텍스트가 사전에 초기화되지 않았습니다 [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUsageViolation: 키의 허용된 사용 목적에 kAllowMac이 포함되어 있지 않습니다 [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kEmptyKeySlot: 구성된 KeySlot이 현재 비어 있습니다 [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 데이터, 예상 검사 값 또는 IV의 크기가 지원되지 않습니다 [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출(Single-Call) 작업이 지원되지 않거나 IV 제공이 컨텍스트 요구사항과 모순됩니다 [SWS_CRYPT_50032].
  • ara::crypto::CryptoErrc::kBusyResource: 필요한 리소스가 사용 중입니다 [SWS_CRYPT_50032].

본 사용 지침은 명세를 기반으로 자동 생성되었습니다.

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

Parameter (in)

ParameterBeschreibung
datathe input data for the MAC
expectedthe expected most significant bits of the MAC digest
ivan optional initialization vector

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the calculated MAC equals the expected byte sequence, false otherwise.

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the provided data, expected digest or IV is not supported
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 kAllowMac

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50032
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50032@rel:R25-11#382757c0
Content hash
382757c0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50032
Status: valid/unmigrated Version: rel:R25-11#ff2bb246 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_50032@rel:R25-11#ff2bb246
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_22101] Upstream: RS_CRYPTO_02203

using Sptr = std::shared_ptr<MessageAuthnCodeCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/message_authn_code_ctx.h"
Scopeclass ara::crypto::cryp::MessageAuthnCodeCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_22101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_22101@rel:R25-11#ebba81a8
Content hash
ebba81a8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22101
Status: valid/unmigrated Version: rel:R25-11#3fbb9742 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_22101@rel:R25-11#3fbb9742
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#553114f32026-09-30
  • R19-11rel:R19-11#2bb7b6d02026-10-14
  • R20-11rel:R20-11#7e9953b02026-10-14
  • R21-11rel:R21-11#7e9953b02026-10-14
  • R22-11rel:R22-11#5e819bc12026-10-14
  • R23-11rel:R23-11#6def4d652026-10-14
  • R24-11rel:R24-11#6def4d652026-10-14
  • R25-11rel:R25-11#3fbb97422026-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