AUTOSAR Classic Security & Intrusion Detection
Das Security-Cluster schützt vernetzte Fahrzeugfunktionen gegen Cyber-Bedrohungen durch Intrusion Detection (IdsM), kryptographische PDU-Authentifizierung und Freshness-Protection (SecOC) sowie Key- und Zertifikatsmanagement (KeyM).
클러스터 가이드AI 생성
암호화 서비스, PDU 인증, 키 관리 및 이벤트 감지를 통해 온보드 보안을 보장합니다.
암호화 서비스, PDU 인증, 키 관리 및 이벤트 감지를 통해 온보드 보안을 보장합니다.
Security & Intrusion Detection 클러스터는 CSM, CryIf 및 Crypto Driver를 통해 암호화 프리미티브를 제공하고, SecOC를 통해 인증 데이터로 I-PDU를 보호하며, KeyM으로 키 및 인증서를 관리합니다 AUTOSAR_CP_SWS_CryptoServiceManager 21쪽. 보안 인시던트는 이벤트로서 IdsM에 보고되고, 그곳에서 버퍼링된 후 비동기적으로 필터링됩니다 [SWS_IdsM_00702]. 셧다운 시에는 RAM 키 데이터의 능동적 삭제를 통해 무단 침해로부터 보호합니다.
Security & Intrusion Detection 모듈 클러스터는 AUTOSAR Classic Platform에서 차량 통신을 보호하고 보안 인시던트를 감지하기 위해 모듈 secoc, idsm, keym, csm, cryif 및 crypto를 통합합니다 AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 21쪽. 암호화 기본 서비스는 계층적으로 Crypto Service Manager (CSM)를 통해 제공되며, CSM은 작업을 Crypto_JobType 구조체로 캡슐화하고 [SWS_Csm_01013] Crypto Interface(CryIf_ProcessJob [SWS_CryIf_91003])를 통해 Crypto Driver의 특정 하드웨어 또는 소프트웨어 드라이버 객체로 전달합니다.
PDU 통신은 메시지 인증 코드(MAC) 및 신선도 값을 통해 SecOC에 의해 보호되는 반면([SWS_SecOC_91006], [SWS_SecOC_00012]), Key Manager (KeyM)는 CSM을 위한 인증서와 키를 준비, 업데이트 및 검증합니다([SWS_KeyM_00052], [SWS_KeyM_00059]). 실패한 PDU 검사와 같은 보안 관련 이벤트는 Security Events (SEv)로서 IdsM에 보고되며 [SWS_IdsM_91002], IdsM은 이를 동기식으로 버퍼링하고 [SWS_IdsM_00701] 구성 가능한 필터 체인을 통해 비동기식으로 한정(qualify)합니다 [SWS_IdsM_01020].
아키텍처 다이어그램: Security 및 Intrusion Detection 클러스터의 계층 아키텍처 및 인터페이스 관계. 출처: AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 21쪽, AUTOSAR_CP_SWS_CryptoServiceManager 21쪽.
실행 시 동기식 API 진입점과 IdsM_MainFunction, SecOC_MainFunctionTx [SWS_SecOC_00176] 및 KeyM_MainBackgroundFunction [SWS_KeyM_00075]의 연산 집약적인 백그라운드 태스크가 분리됩니다. 오류 발생 시 또는 시스템 과부하 시(CRYPTO_E_BUSY) SecOC의 표준 인증 패턴 [SWS_SecOC_91013] 및 IdsM의 NvM 롤백 [SWS_IdsM_01702]과 같은 폴백 메커니즘이 전체 시스템의 안정성을 확보하며, 셧다운 시 KeyM은 활성 RAM 키 자료를 완전히 삭제합니다 [SWS_KeyM_00047].
시스템 아키텍처 & 모듈 클러스터의 역할
AUTOSAR Classic Platform(릴리스 R20-11)의 Security & Intrusion Detection 모듈 클러스터는 암호화, 안전한 온보드 통신, 키 및 인증서 관리, 침입 감지를 위한 표준화된 서비스를 제공합니다. 기능적으로 이 클러스터는 여러 AUTOSAR Basic Software (BSW) 계층에 걸쳐 구성됩니다. 서비스 계층에서는 Crypto Service Manager (CSM)가 하드웨어 독립적인 암호화 서비스를 캡슐화합니다 AUTOSAR_CP_SWS_CryptoServiceManager 21쪽. I-PDU의 안전한 통신은 통신 계층의 Secure Onboard Communication (SecOC) 모듈이 담당하며 [SWS_SecOC_00162], 보안 서비스로서 Key Manager (KeyM)는 암호화 키와 인증서의 라이프사이클을 오케스트레이션합니다 SWS_KeyManager 31쪽. 추가로 Intrusion Detection System Manager (IdsM)는 전체 시스템에서 보안 관련 이벤트를 위한 중앙 어그리게이터 및 필터 역할을 합니다 AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 21쪽.
CSM 하위에서는 계층 CryIf으로서 Crypto Interface (CryIf)가 여러 암호화 드라이버 객체에 대한 하드웨어 또는 소프트웨어별 접근을 추상화하고 작업 및 키 디스패칭 메커니즘을 표준화합니다 SWS_CryptoInterface 1쪽. MCAL 및 드라이버 계층에서는 Crypto Driver(Crypto)가 소프트웨어 또는 하드웨어 보안 모듈(HSM)에서 실제 계산을 수행합니다 [SWS_Crypto_91016]. 이러한 계층 간의 상호작용은 애플리케이션 소프트웨어(SW-C) 및 통신 모듈을 하드웨어별 암호화 가속기로부터 완전히 디커플링하도록 보장합니다.
아키텍처 다이어그램: Security 및 Intrusion Detection 클러스터의 계층 아키텍처 및 인터페이스 관계. 출처: AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 21쪽, AUTOSAR_CP_SWS_CryptoServiceManager 21쪽.
모듈 간 상호작용 & 인터랙션 경로
클러스터의 모듈들은 명확하게 정의된 제어 및 데이터 흐름 경로를 통해 서로 연결되어 있습니다. 암호화 작업의 처리는 주로 CSM을 통해 수행됩니다. 애플리케이션 모듈 또는 SecOC 및 KeyM과 같은 BSW 모듈은 Csm_MacGenerate [SWS_Csm_00982], Csm_Encrypt [SWS_Csm_00984], Csm_AEADEncrypt [SWS_Csm_01023], Csm_SignatureGenerate [SWS_Csm_00992], Csm_Hash [SWS_Csm_00980] 또는 Csm_RandomGenerate [SWS_Csm_01543]과 같은 CSM 서비스를 통해 작업을 시작합니다. 작업은 표준화된 런타임 구조체 Crypto_JobType로 캡슐화되며 [SWS_Csm_01013], 이는 동작 모드(CRYPTO_OPERATIONMODE_START, UPDATE, FINISH 또는 SINGLECALL과 같은 Crypto_OperationModeType)를 통해 제어됩니다 [SWS_Csm_00802]. CSM은 해당 작업을 CryIf_ProcessJob [SWS_CryIf_91003]에 전달하고, 이는 해당 암호화 드라이버 객체로 호출을 전달합니다.
SecOC 모듈은 PduR과 통신 버스 간의 PDU 전송을 보호합니다. SecOC_TpRxIndication [SWS_SecOC_00125]을 통해 보안 PDU를 수신할 때 SecOC는 먼저 SecOC_GetRxFreshnessAuthData를 통해 신선도 값을 조회하고 [SWS_SecOC_91006] 명세 SecOcProtocol 19쪽에 따라 인증할 데이터를 구성합니다. MAC 검증을 위해 SecOC는 CSM을 사용합니다 [SWS_SecOC_00012]. 검증에 성공하면 정품 PDU가 상위 계층으로 전달됩니다. 검증에 실패하면 결과가 상태 SecOC_VerificationStatusType에 기록되며 [SWS_SecOC_00160], [SWS_SecOC_91014], Interpretation: 이러한 실패는 Security Event로서 IdsM에 보고됩니다 AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 21쪽. 질문 Q-8cfd1660757f3f1f (열림)
Key Manager (KeyM)에서는 키 및 인증서 업데이트가 준비되고 실행됩니다. 인증서 검증 시(예: KeyM_VerifyCertificates [SWS_KeyM_00059] 또는 KeyM_VerifyCertificateChain [SWS_KeyM_00061]을 통해) KeyM은 서명 검증을 위해 CSM의 암호화 프리미티브를 사용하고, 유효성 검사를 위해 StbM의 외부 타임베이스를 사용합니다 SWS_KeyManager 119쪽. 키 업데이트(KeyM_Update [SWS_KeyM_00052])는 사용자 정의 핸들러(KeyM_KH_Update [SWS_KeyM_00069], [SWS_KeyM_00055])를 바인딩하며, 결과 키 바이트는 Csm_KeyElementSet [SWS_Csm_00957] 및 Csm_JobKeySetValid [SWS_Csm_91027]을 통해 암호화 드라이버에서 활성화됩니다. 키 유도 및 복사 작업은 CryIf가 CryIf_KeyDerive [SWS_CryIf_91009] 또는 CryIf_KeyElementCopy [SWS_CryIf_91015]을 통해 Crypto_KeyElementCopyPartial [SWS_Crypto_91015]와 같은 드라이버 함수로 전달합니다.
IdsM은 IdsM_SetSecurityEvent [SWS_IdsM_91002] 또는 IdsM_SetSecurityEventWithCount [SWS_IdsM_91018]과 같은 인터페이스를 통해 BSW 센서(SecOC 포함) 및 애플리케이션 SW-C로부터 보안 이벤트(Security Events, SEv)를 수집합니다. 이벤트는 버퍼링되고, 필터 체인(예: Block State Filter [SWS_IdsM_01020] 또는 집합 필터 AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 40쪽)을 통해 한정(qualify)된 후 최종적으로 PduR을 통해 전달됩니다 [SWS_IdsM_91009], [SWS_IdsM_91010].
시퀀스 다이어그램: 암호화 스택을 사용한 SecOC 내 보안 PDU 검증 및 IdsM으로의 보안 이벤트 보고. 출처: [SWS_SecOC_00125], [SWS_SecOC_00012], [SWS_CryIf_91003], [SWS_CryIf_91013], [SWS_IdsM_91002].
동기화, 재진입성 및 태스크 컨텍스트
암호화 연산 및 보안 작업의 실행에는 동기식 호출 경로와 비동기식 태스크 컨텍스트의 엄격한 분리가 필요합니다. CSM 및 CryIf에서 실행 동작은 암호화 프리미티브의 구성에 따라 달라집니다. 즉, 작업이 동기 블로킹 방식 또는 비동기 방식으로 실행될 수 있습니다 [SWS_Csm_00982], [SWS_CryIf_91003]. 비동기 작업의 경우 암호화 드라이버가 CryIf_CallbackNotification [SWS_CryIf_91013]을 통해 완료를 알리고, 이에 따라 CSM이 호출자의 등록된 콜백 함수를 처리합니다 [SWS_SecOC_00012]. 중단 가능하거나 장시간 실행되는 계산을 위해 CSM은 중단 함수 Csm_CancelJob를 제공하며 [SWS_Csm_00968], 이는 CryIf_CancelJob [SWS_CryIf_91014]을 통해 드라이버에 위임됩니다.
SecOC 모듈의 전송은 시간 트리거 방식으로 디커플링됩니다. 주기적인 사이클에서 SecOC_MainFunctionTx은 서명할 새 정품 PDU가 대기 중인지 확인하고, 인증자를 계산하며, PduR 전송을 시작합니다 [SWS_SecOC_00176]. IdsM에서는 보고된 이벤트의 수신이 IdsM_SetSecurityEvent [SWS_IdsM_91002]을 통해 센서 컨텍스트(태스크 또는 ISR)에서 고성능으로 수행되며, 이벤트는 먼저 구성 가능한 이벤트 버퍼에 동기식으로 저장됩니다 [SWS_IdsM_00701], [SWS_IdsM_00702]. 많은 시간이 소요되는 필터링, 컨텍스트 데이터 처리, StbM 또는 RTE를 통한 타임스탬프 보강은 주기적인 IdsM_MainFunction 컨텍스트에서 완전히 비동기식으로 처리됩니다 SWS_IntrusionDetectionSystemManager 87쪽, AUTOSAR_CP_SWS_IntrusionDetectionSystemManager 86쪽.
Key Manager는 시간에 민감한 태스크와 연산 집약적인 태스크를 구분합니다. 표준 상태 쿼리 및 콜백 오케스트레이션이 KeyM_MainFunction에서 실행되는 반면 [SWS_KeyM_00074], 연산 집약적인 동기식 핸들러 시퀀스(예: KeyM_KH_Update)의 경우 선점형 백그라운드 함수 KeyM_MainBackgroundFunction에서의 실행이 지정되어 있습니다 [SWS_KeyM_00075]. 또한 멀티코어 아키텍처에서 CSM은 파티션별 메인 함수 및 초기화를 지원합니다 [SWS_Csm_00646], SWS_CryptoInterface 1쪽. Interpretation: 이러한 파티셔닝은 프로세서 코어별 전용 하드웨어 드라이버 객체 할당과 일치합니다. 질문 (열림)
일반적인 수명 주기 및 동작 모드
클러스터의 초기화는 하위 계층에서 상위 계층으로의 엄격한 종속성 계층 구조를 따릅니다. 먼저 하드웨어 근접 드라이버가 Crypto_Init을 통해 구성되고 [SWS_Crypto_91016], 이어서 인터페이스 CryIf [SWS_CryIf_91118]와 Csm_Init [SWS_Csm_00646]를 통한 CSM이 구성됩니다. 그 후에야 종속 모듈인 SecOC, KeyM 및 IdsM을 초기화할 수 있습니다. SecOC는 초기화를 통해 SECOC_UNINIT 상태에서 SECOC_INIT 상태로 전환됩니다 [SWS_SecOC_00162]. KeyM에서는 구성된 모든 인증서가 NvM에서 읽히거나 KeyM_SetCertificate 또는 진단을 통해 로드 및 검증되기 전에 SWS_KeyManager 119쪽 초기에 KEYM_CERTIFICATE_NOT_AVAILABLE [SWS_KeyM_00021], [SWS_KeyM_91003] 상태를 받습니다.
런타임 시 차량 상태 변경은 IdsM의 작동 모드에 영향을 줍니다. Basic Software Manager (BswM)는 IdsM_BswM_StateChanged을 통해 IdsM에 상태 변경을 알립니다 [SWS_IdsM_91005]. 이러한 상태는 Block State Filter [SWS_IdsM_01020], [SWS_IdsM_91017]을 제어하여 특정 작동 단계(예: 프로그래밍 모드 또는 슬립 단계)에서 보안 이벤트의 전달을 억제합니다. 또한 이벤트의 보고 모드는 DCM을 통해 진단적으로 수정될 수 있으며(IdsM_Dcm_SetReportingMode_Start [SWS_IdsM_91008], [SWS_IdsM_91013]) NvM에 영구적으로 저장될 수 있습니다 [SWS_IdsM_01700], [SWS_IdsM_01701].
ECU 셧다운 시 모듈들은 순서대로 초기화 해제됩니다. SecOC_DeInit은 안전한 통신을 중지하고 모든 내부 버퍼와 변수를 비우며 SecOC를 다시 SECOC_UNINIT 상태로 전환합니다 [SWS_SecOC_00161]. KeyM_Deinit [SWS_KeyM_00047] 호출 시 대기 상태에서의 무단 판독을 방지하기 위해 보안상의 이유로 RAM에 있는 모든 암호화 키 자료가 능동적으로 파기되고 초기값으로 덮어써집니다.
오류 처리, DET 추적 및 성능 저하
이 모듈 클러스터는 개발 오류(Development Error Tracer, DET) 및 런타임 문제를 감지하기 위한 일관된 메커니즘을 구현합니다. 모든 모듈은 초기화 여부를 확인하고 초기화되지 않은 상태에서 호출 시 DET 오류를 보고합니다. 예를 들어 CryIf_RandomSeed [SWS_CryIf_91007], CryIf_CancelJob [SWS_CryIf_91014], CryIf_KeyDerive [SWS_CryIf_91009] 또는 CryIf_CallbackNotification [SWS_CryIf_91013]과 같은 CryIf 인터페이스에서의 CRYIF_E_UNINIT이 있습니다. 마찬가지로 잘못된 포인터 매개변수는 Crypto_GetVersionInfo [SWS_Crypto_91001]에서의 CRYPTO_E_PARAM_POINTER와 같은 DET 보고로 이어지며, CSM의 초기화 오류는 CSM_E_INIT_FAILED로 보고됩니다 [SWS_Csm_00646].
암호화 하드웨어 객체의 과부하 또는 장애 발생 시 드라이버는 CRYPTO_E_BUSY 상태를 알립니다 [SWS_CryIf_91003], [SWS_Csm_00957]. 이러한 성능 저하 시나리오에서 SecOC는 차량 가용성을 유지하기 위해 SecOC_SendDefaultAuthenticationInformation을 통해 인증되지 않은 대체 PDU를 하위 계층으로 구성 가능하게 전송할 수 있도록 허용합니다 [SWS_SecOC_91013]. IdsM에서는 구성된 이벤트 버퍼가 고갈되면 내부 보안 이벤트 SEV_IDSM_NO_EVENT_BUFFER_AVAILABLE [SWS_IdsM_00703]가 트리거됩니다. 수정된 IdsM 매개변수의 NvM 지속성 저장이 실패하면 IdsM은 이전 상태로 자동 롤백을 수행합니다 [SWS_IdsM_01702]. Csm_KeyElementSet에서 키 설정 중 오류가 발생하면 키 요소의 상태는 정의되지 않은 것으로 간주되며 Csm_KeyGetStatus [SWS_Csm_91047] 및 CryIf_KeyGetStatus [SWS_CryIf_91012]를 통해 유효성을 검증해야 합니다.
이 가이드는 릴리스 R20-11용 Classic Platform의 AUTOSAR 명세를 기반으로 하며 Security & Intrusion Detection 클러스터의 아키텍처를 요약합니다.
초기화 및 상태
IdsM_GetVersionInfoIdsM_InitKeyM_DeinitKeyM_GetVersionInfoKeyM_InitSecOC_DeInitSecOC_GetVersionInfoSecOC_Init서비스 · Set…
서비스 · Get…
서비스 · Verify…
서비스 · Cert…
서비스 · Certificate…
서비스 · Crypto…
서비스 · Dcm…
서비스 · K…
서비스 · Tp…
서비스 · 기타
IdsM_BswM_StateChangedKeyM_FinalizeKeyM_MainBackgroundFunctionKeyM_PrepareKeyM_ServiceCertificateCallbackNotificationKeyM_StartSecOC_IfCancelTransmitSecOC_IfTransmitSecOC_SendDefaultAuthenticationInformation콜백
IdsM_CopyTxDataIdsM_TpTxConfirmationIdsM_TxConfirmationSecOC_CopyRxDataSecOC_CopyTxDataSecOC_RxIndicationSecOC_SPduTxConfirmationSecOC_StartOfReceptionSecOC_TpRxIndicationSecOC_TpTxConfirmationSecOC_TriggerTransmitSecOC_TxConfirmation콜아웃 및 예상 인터페이스
SecOC_VerificationStatusCallout주기적
IdsM_MainFunctionKeyM_MainFunctionSecOC_MainFunctionRxSecOC_MainFunctionTx타입
IdsM_ConfigTypeIdsM_Filters_BlockStateTypeIdsM_Filters_ReportingModeTypeIdsM_SecurityEventIdTypeIdsM_TimestampTypeKeyM_CertDataPointerTypeKeyM_CertDataTypeKeyM_CertElementIdTypeKeyM_CertElementIteratorTypeKeyM_CertificateElementTypeKeyM_CertificateIdTypeKeyM_CertificateStatusTypeKeyM_ConfigTypeKeyM_CryptoKeyDataTypeKeyM_CryptoKeyIdTypeKeyM_KH_UpdateOperationTypeKeyM_ResultTypeKeyM_ServiceCertificateTypeKeyM_StartTypeMaxSecOC_ConfigTypeSecOC_FreshnessArrayTypeSecOC_OverrideStatusTypeSecOC_StateTypeSecOC_VerificationResultTypeSecOC_VerificationStatusType함수
IdsM_BswM_StateChangedIdsM_CopyTxDataIdsM_Dcm_GetReportingMode_RequestResultsIdsM_Dcm_GetReportingMode_StartIdsM_Dcm_SetReportingMode_StartIdsM_GetVersionInfoIdsM_InitIdsM_MainFunctionIdsM_SetSecurityEventIdsM_SetSecurityEventWithContextDataIdsM_SetSecurityEventWithCountIdsM_SetSecurityEventWithCountContextDataIdsM_SetSecurityEventWithTimestampCountIdsM_SetSecurityEventWithTimestampCountContextDataIdsM_TpTxConfirmationIdsM_TxConfirmationKeyM_CertElementGetKeyM_CertElementGetFirstKeyM_CertElementGetNextKeyM_CertGetStatusKeyM_CertificateElementGetByIndexKeyM_CertificateElementGetCountKeyM_CertificateVerifyCallbackNotificationKeyM_CryptoKeyFinalizeCallbackNotificationKeyM_CryptoKeyUpdateCallbackNotificationKeyM_CryptoKeyVerifyCallbackNotificationKeyM_DeinitKeyM_FinalizeKeyM_GetCertificateKeyM_GetVersionInfoKeyM_InitKeyM_KH_FinalizeKeyM_KH_PrepareKeyM_KH_StartKeyM_MainBackgroundFunctionKeyM_MainFunctionKeyM_PrepareKeyM_ServiceCertificateCallbackNotificationKeyM_SetCertificateKeyM_StartKeyM_VerifyCertificateKeyM_VerifyCertificateChainKeyM_VerifyCertificatesSecOC_CopyRxDataSecOC_CopyTxDataSecOC_DeInitSecOC_GetRxFreshnessSecOC_GetRxFreshnessAuthDataSecOC_GetTxFreshnessSecOC_GetTxFreshnessTruncDataSecOC_GetVersionInfoSecOC_IfCancelTransmitSecOC_IfTransmitSecOC_InitSecOC_MainFunctionRxSecOC_MainFunctionTxSecOC_RxIndicationSecOC_SendDefaultAuthenticationInformationSecOC_SPduTxConfirmationSecOC_StartOfReceptionSecOC_TpCancelReceiveSecOC_TpCancelTransmitSecOC_TpRxIndicationSecOC_TpTransmitSecOC_TpTxConfirmationSecOC_TriggerTransmitSecOC_TxConfirmationSecOC_VerificationStatusCalloutSecOC_VerifyStatusSecOC_VerifyStatusOverride타입
IdsM_ConfigTypeIdsM_Filters_BlockStateTypeIdsM_Filters_ReportingModeTypeIdsM_SecurityEventIdTypeIdsM_TimestampTypeKeyM_CertDataPointerTypeKeyM_CertDataTypeKeyM_CertElementIdTypeKeyM_CertElementIteratorTypeKeyM_CertificateElementTypeKeyM_CertificateIdTypeKeyM_CertificateStatusTypeKeyM_ConfigTypeKeyM_CryptoKeyDataTypeKeyM_CryptoKeyIdTypeKeyM_KH_UpdateOperationTypeKeyM_ResultTypeKeyM_ServiceCertificateTypeKeyM_StartTypeMaxSecOC_ConfigTypeSecOC_FreshnessArrayTypeSecOC_OverrideStatusTypeSecOC_StateTypeSecOC_VerificationResultTypeSecOC_VerificationStatusType주제 맵
IdsM
21KeyM
42SecOC
33이 릴리스에 대한 요소 데이터가 없습니다
IdsM
This callback function is invoked by the BswM to indicate ECU state changes.
void IdsM_BswM_StateChanged (IdsM_Filters_BlockStateType state);This function is called to acquire the transmit data of an I-PDU segment (N-PDU). Each call to this function provides the next part of the I-PDU data unless retry->TpDataState is TP_ DATARETRY. In this case the function restarts to copy the data beginning at the offset from the current position indicated by retry->TxTpDataCnt. The size of the remaining data is written to the position indicated by availableDataPtr.
BufReq_ReturnType IdsM_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);This function is a request from DCM to the IdsM to read the routine results triggered by function IdsM_Dcm_GetReportingMode_Start().
Std_ReturnType IdsM_Dcm_GetReportingMode_RequestResults (Dcm_OpStatusType OpStatus, uint8* Out_ReportingMode, Dcm_NegativeResponseCodeType* ErrorCode);This function is a request from DCM to the IdsM to start the routine execution to request the current reporting mode of a specific Security Event ID.
Std_ReturnType IdsM_Dcm_GetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);This function is a request from DCM to the IdsM to start the routine execution to set the reporting mode of a specific Security Event ID.
Std_ReturnType IdsM_Dcm_SetReportingMode_Start (uint16 In_SecurityEventId, uint8 In_SensorInstanceId, uint8 In_ReportingMode, Dcm_OpStatusType OpStatus, Dcm_NegativeResponseCodeType* ErrorCode);Returns version information, vendor ID and AUTOSAR module ID of the component.
void IdsM_GetVersionInfo (const Std_VersionInfoType* versionInfo);Service to initialize the module IdsM. It initializes all variables and sets the module state to initialized.
void IdsM_Init (const IdsM_ConfigType* configPtr);This function is called periodically. It processes security events asynchronously which are queued during API function calls.
void IdsM_MainFunction (void);This API is the application interface to report security events to the IdsM.
void IdsM_SetSecurityEvent (IdsM_SecurityEventIdType securityEventId);This API is the application interface to report security events with context data to the IdsM.
void IdsM_SetSecurityEventWithContextData (IdsM_SecurityEventIdType securityEventId, const uint8* contextData, uint16 contextDataSize);This API is the application interface for Smart Sensors to report security events with a count value to the IdsM.
void IdsM_SetSecurityEventWithCount (IdsM_SecurityEventIdType securityEventId, uint16 count);This API is the application interface for Smart Sensors to report security events with a count value and context data to the IdsM.
void IdsM_SetSecurityEventWithCountContextData (IdsM_SecurityEventIdType securityEventId, uint16 count, const uint8* contextData, uint16 contextDataSize);This API is the application interface for Smart Sensors to report security events with a timestamp and a count value to the IdsM.
void IdsM_SetSecurityEventWithTimestampCount (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count);This API is the application interface for Smart Sensors to report security events with a timestamp, a count value and context data to the IdsM.
void IdsM_SetSecurityEventWithTimestampCountContextData (IdsM_SecurityEventIdType securityEventId, IdsM_TimestampType timestamp, uint16 count, const uint8* contextData, uint16 contextDataSize);This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.
void IdsM_TpTxConfirmation (PduIdType id, Std_ReturnType result);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void IdsM_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);Configuration data structure of IdsM module.
Data type used for "Block State" filter values (bit masks)
Reporting modes used by the reporting mode filter
Data type used for local IdsM Security Event IDs
Data type for IdsM timestamps
KeyM
Service KeyM_CertElementGet.
Std_ReturnType KeyM_CertElementGet (KeyM_CertificateIdType CertId, KeyM_CertElementIdType CertElementId, uint8* CertElementData, uint32* CertElementDataLength);Service KeyM_CertElementGetFirst.
Std_ReturnType KeyM_CertElementGetFirst (KeyM_CertificateIdType CertId, KeyM_CertElementIdType CertElementId, KeyM_CertElementIteratorType* CertElementIterator, uint8* CertElementData, uint32* CertElementDataLength);Service KeyM_CertElementGetNext.
Std_ReturnType KeyM_CertElementGetNext (KeyM_CertElementIteratorType* CertElementIterator, uint8* CertElementData, uint32* CertElementDataLength);This function provides the sta tus of a certificate.
Std_ReturnType KeyM_CertGetStatus (KeyM_CertificateIdType CertId, KeyM_CertificateStatusType* Status);Service KeyM_CertificateElementGetByIndex.
Std_ReturnType KeyM_CertificateElementGetByIndex (KeyM_CertificateIdType CertId, KeyM_CertElementIdType CertElementId, uint32 Index, uint8* CertElementDataPtr, uint32* CertElementDataLengthPtr);This function provides the total number of data elements that a re available for the specified certificate element. Typically, only one data element is available. But in some cases, several data elements can be assigned to one certificate element in a row. This function retrieves the total number of elements. The indiv idual data elements can then accessed with Key M_ Certificate Element Get By Index(). It is similar to the functions Key M_ Cert Element Get First/ Key M_ Cert Element Get Next to retrieve a group of data elements of one certificate element. AUTOSAR CP R20 - of
Std_ReturnType KeyM_CertificateElementGetCount (KeyM_CertificateIdType CertId, KeyM_CertElementIdType CertElementId, uint16* CountPtr);Notifies the application that a certificate verification has been finished. The function name is configurable by Key MCertificate Verify Callback Notification Func. Availabl e via Key M_ Externals.h
Std_ReturnType KeyM_CertificateVerifyCallbackNotification (KeyM_CertificateIdType CertId, KeyM_CertificateStatusType Result);This function resets the key management module to the uninitialized state.
void KeyM_Deinit (void);The function is used to finalize key update operations. It is typi cally used in conjunction with the Key M_
Std_ReturnType KeyM_Finalize (const uint8* RequestDataPtr, uint16 RequestDataLength, uint8* ResponseDataPtr, uint16 ResponseMaxDataLength);This function provides the certificate data
Std_ReturnType KeyM_GetCertificate (KeyM_CertificateIdType CertId, KeyM_CertDataType* CertificateDataPtr);Provides the version information of this module.
void KeyM_GetVersionInfo (Std_VersionInfoType* VersionInfo);This function initializes the key management module.
void KeyM_Init (const KeyM_ConfigType* ConfigPtr);If Key MCrypto Key Start Finalize Function Enabled and Key MCrypto Key Handler Start Finalize Enabled is set to TRUE, this function will be called immediately when Key M_
Std_ReturnType KeyM_KH_Finalize (const uint8* RequestData, uint16 RequestDataLength, uint8* ResponseData, uint16* ResponseDataLength);If the configuration parameters Key MCrypto Key Prepare Function Enabled and Key MCrypto Key Handler Prepare Enabled are both set to TRUE, then this function w ill be called immediately when Key M_ Prepare gets called. The function takes over the task to prepare a key management operation. The response data will be passed on as is to the caller of Key_ Prepare.
Std_ReturnType KeyM_KH_Prepare (const uint8* RequestData, uint16 RequestDataLength, uint8* ResponseDataPtr, uint16* ResponseDataLength);If Key MCrypto Key Start Finalize Function Enabled and Key MCrypto Key
Std_ReturnType KeyM_KH_Start (KeyM_StartType StartType, const uint8* RequestData, uint16 RequestDataLength, uint8* ResponseData, uint16* ResponseDataLength);Function is called from a pre - emptive operating system when no other task operation is needed. Can be used for calling time consuming synchronous functions such as Key M_ KH_ Update().
void KeyM_MainBackgroundFunction (void);Function is called periodically according the specified time interval.
void KeyM_MainFunction (void);This function is used to prepare a key update operation. The main intent is to provide information for the key operation to the key server. Other operations may start the negotiation for a common secret that is used further to derive key material. This function is only av ailable if Key MCrypto Key Prepare Function Enabled is set to TRUE.
Std_ReturnType KeyM_Prepare (const uint8* RequestData, uint16 RequestDataLength, uint8* ResponseData, uint16* ResponseDataLength);Notifies the application that the certificate service operation has been finished. This function is used by the certificate submodule. Thi s callback is only provided if Key MService Certificate Function Enabled is set to TRUE. The function name is configurable by Key MService Certificate Callback Notification Func.
This function provides the certificate data to the key managem ent module to temporarily store the certificate.
Std_ReturnType KeyM_SetCertificate (KeyM_CertificateIdType CertId, const KeyM_CertDataType* CertificateDataPtr);This function is optional and only used if the configuration item Key MCrypto Key Start Finalize Function Enabled is set to true. It intents to allow key update operation.
Std_ReturnType KeyM_Start (KeyM_StartType StartType, const uint8* RequestData, uint16 RequestDataLength, uint8* ResponseData, uint16* ResponseDataLength);Service KeyM_VerifyCertificate.
Std_ReturnType KeyM_VerifyCertificate (KeyM_CertificateIdType CertId);Service KeyM_VerifyCertificateChain.
Std_ReturnType KeyM_VerifyCertificateChain (KeyM_CertificateIdType CertId, const KeyM_CertDataType[] certChainData, uint8 NumberOfCertificates);This function verifies two certificates that are stored and parsed internally against each other. The certificat e referenced with Cert Id was signed by the certificate referenced with cert Upper Id. Only these two certificates are validated against each other.
Std_ReturnType KeyM_VerifyCertificates (KeyM_CertificateIdType CertId, KeyM_CertificateIdType CertUpperId);Byte - pointer to the data of the certificate
This structure is used to exchange certificate data through interface functions.
Certificate Element handle.
This structure is used to iterate through a number of elements of a certificate.
Array long enough to store data
Certificate handle.
Type KeyM_CertificateStatusType.
This structure is the base type to initialize the Key Manager module. A pointer to an instance of this structure will be used in the initialization of the Key Manager module.
Byte - pointer to the input or output data
Crypto key handle.
Specifies the type of key handler update operation that was performed in the callback.
Specifies the result type of an asynchronous key management fu nction.
This type specifies the requested service operation and what information is provided with this function.
This type specifies in which mode the key operation will start. The OEM production mode provides higher privileges compared to workshop mode.
Array long enough to store the key or certificate name. base Type Encoding = UTF -
SecOC
This function is called to provide the received data of an I - PDU segment (N - PDU) to the upper layer. Each call to this function provides the next part of the I - PDU data. The si ze of the remaining buffer is written to the position indicated by buffer Size Ptr.
BufReq_ReturnType SecOC_CopyRxData (PduIdType id, const PduInfoType* info, PduLengthType* bufferSizePtr);Service SecOC_CopyTxData.
BufReq_ReturnType SecOC_CopyTxData (PduIdType id, const PduInfoType* info, const RetryInfoType* retry, PduLengthType* availableDataPtr);This service stops the secure onboard communication. All buffered I - PDU are removed and have to be obtained again, if needed, after Sec OC_ Init has been called. By a call to Sec OC_ De Init the AUTOSAR Sec OC module is put into a not in itialized state (Sec OC_ UNINIT).
void SecOC_DeInit (void);Service SecOC_GetRxFreshnessAuthData.
Std_ReturnType SecOC_GetRxFreshnessAuthData (uint16 SecOCFreshnessValueID, const uint8* SecOCTruncatedFreshnessValue, uint32 SecOCTruncatedFreshnessValueLength, const uint8* SecOCAuthDataFreshnessValue, uint16 SecOCAuthDataFreshnessValueLength, uint16 SecOCAuthVerifyAttempts, uint8* SecOCFreshnessValue, uint32* SecOCFreshnessValueLength);This API returns th e freshness value from the Most Significant Bits in the first byte in the array (Sec OCFreshness Value), in big endian format.
Std_ReturnType SecOC_GetTxFreshness (uint16 SecOCFreshnessValueID, uint8* SecOCFreshnessValue, uint32* SecOCFreshnessValueLength);Returns the version information of this module.
void SecOC_GetVersionInfo (Std_VersionInfoType* versioninfo);Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.
Std_ReturnType SecOC_IfCancelTransmit (PduIdType TxPduId);Requests transmission of a PDU.
Std_ReturnType SecOC_IfTransmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);Initializes the the Sec OC module. Successful initialization leads to state Sec OC_ INIT. In configurations, in which Sec OC is assigned to more than one partition (i.e. Sec OC_ Main Functions are mapped to partition s), Sec OC may provide one init AUTOSAR CP R20 - of Document ID : AUTOSAR_SWS_SecureOnboardCommunication function per partition. The decision on whether a single Sec OC_ Init() function or one per partition is provided is implementation - specific. In case a given implementation provides one Sec OC_ Init() function per partition, it is up to the implementation to devise a naming pattern that prevents name clashes among the different Sec OC_ Init() functions (e.g., by adding a suffix containing short name the Ecuc Partition.
void SecOC_Init (const SecOC_ConfigType* config);This function performs the processing of the Sec OC module's authentication and verification processing for the Rx path. Per configured Sec OCMain Function Rx instance one Sec OC_ Main Function Rx_ shall be implemented. Hereby is the short name of the Sec OCMain Function Rx configuration container in the ECU configuration.
void SecOC_MainFunctionRx (void);This function performs the processing of the Sec OC module's authentication and verification processing for the Tx path. Per configured Sec OCMain Function Tx instance one Sec OC_ Main Function Tx_ shall be implemented. Hereby is t he short name of the Sec OCMain Function Tx configuration container in the ECU configuration.
void SecOC_MainFunctionTx (void);Indication of a received PDU from a lower layer communication interface module.
void SecOC_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);The service provides the ability to enable the sending of un - authenticated PDU to lower layer. (example: in case authentication build counter has reached the configuration value Sec OCAuthentication Build Attempts or the query of the freshness function returns E_ NOT_ OK or the calculation of the authenticator has returned a non - recoverable error such as returning E_ NOT_ OK or KEY_ FAILURE). T his service is optional (the service is available only if Sec OCDefault Authentication Information Pattern is configured). If the service is not available or the service is available but the service was called with send Default
Std_ReturnType SecOC_SendDefaultAuthenticationInformation (uint16 FreshnessValueID, boolean sendDefaultAuthenticationInformation);This interface is used by the Sec OC to indicate that the Secured I - PDU has been initiated for transmission.
void SecOC_SPduTxConfirmation (uint16 SecOCFreshnessValueID);Service SecOC_StartReception.
BufReq_ReturnType SecOC_StartOfReception (PduIdType id, const PduInfoType* info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr);Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.
Std_ReturnType SecOC_TpCancelReceive (PduIdType RxPduId);Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.
Std_ReturnType SecOC_TpCancelTransmit (PduIdType TxPduId);Called after an I - PDU has been received via the TP API, the result indicates whether the transmission was successful or not.
void SecOC_TpRxIndication (PduIdType id, Std_ReturnType result);Requests transmission of a PDU.
Std_ReturnType SecOC_TpTransmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);This function is called after the I - PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.
void SecOC_TpTxConfirmation (PduIdType id, Std_ReturnType result);Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.
Std_ReturnType SecOC_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
void SecOC_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);Service is used to propagate the status of each verification attempt from the Sec OC module to other modules. This service can be configured such that: Only: "False" Verifica tion Status is propagated to modules Both: "True" and "False" Verification Status are propagated to modules None: No Verification Status is propagated
void SecOC_VerificationStatusCallout (SecOC_VerificationStatusType verificationStatus);This s ervice provides the ability to inform the application about the result of the verification attempt of a received PDU by the Sec OC module.
void SecOC_VerifyStatus (SecOC_VerificationStatusType verificationStatus);Service SecOC_VerifyStatusOverride.
Std_ReturnType SecOC_VerifyStatusOverride (uint16 ValueID, SecOC_OverrideStatusType overrideStatus, uint8 numberOfMessagesToOverride);Configuration data structure of Sec OC module
Type SecOC_OverrideStatusType.
States of the Sec OC module
Enumeration to indicate veri fication results.
Data structure to bundle the status of a verification attempt for a specific Freshness Value and Data ID
Module im Cluster
Firewall (Fw)
AUTOSAR Classic Communication Services-Modul Firewall (Fw, Spezifikation: AUTOSAR_CP_SWS_Firewall.pdf).
Intrusion Detection System Manager (IdsM)
Collects and reports onboard security events to detect threats.
Key Manager (KeyM)
Manages lifecycle, storage, and distribution of cryptographic keys and certificates.
MACsec Key Agreement (Mka)
AUTOSAR Classic Communication Services-Modul MACsec Key Agreement (Mka, Spezifikation: AUTOSAR_CP_SWS_MACsecKeyAgreement.pdf, AUTOSAR_SWS_MACsecKeyAgreement.pdf).
Secure Onboard Communication (SecOC)
Provides cryptographic authentication and freshness protection for critical communication PDUs.
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문