Autosar Sws Keymanager
Autosar Sws Keymanager
AUTOSAR CP R19-11
Disclaimer
This work (specification and/or software implementation) and the material contained
in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR
and the companies that have contributed to it shall not be liable for any use of the
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
3 Related documentation........................................................................................ 7
3.1 Input documents ........................................................................................... 7
3.2 Related standards and norms ...................................................................... 7
3.3 Related specification .................................................................................... 7
4 Constraints and assumptions .............................................................................. 8
4.1 Limitations .................................................................................................... 8
4.2 Applicability to car domains .......................................................................... 8
5 Dependencies to other modules .......................................................................... 9
5.1 Dependencies to Crypto Service Manager ................................................... 9
5.2 Dependencies to Non Volatile Memory ........................................................ 9
5.3 Dependencies to Synchronized Time Base .................................................. 9
6 Requirements traceability .................................................................................. 10
The crypto key submodule provides an API and configuration items to introduce or
update pre-defined cryptographic key material. It acts as a key client to interpret the
provided data from a key server and to create respective key materials. These keys
are provided to the crypto service manager. After successful installation of the key
material, the application is able to utilize the crypto operations. This allows OEMs to
introduce key materials in production or maintenance phase to ECUs separate from
the application.
Abbreviation / Description:
Acronym:
KeyM Key Manager
PKI Public Key Infrastructure
CSR Certificate Signing Request
CSM Crypto Service Manager
CRL Certificate Revocation List
CA Certificate Authority
OID Object Identifier. A byte array that identifies a certificate element or group
or list of certificate elements.
3 Related documentation
[7] IETF 5280 Internet X.509 Public Key Infrastructure Certificate and Certificate
Revocation List (CRL) Profile
Thus, the specification SWS BSW General [3] shall be considered as additional and
required specification for the Key and Certificate Management module.
4.1 Limitations
The Key Management module shall be used with a Crypto Service Manager and its
underlying modules.
Certificate Interface
Signature Interface
6 Requirements traceability
7 Functional specification
The Key Management module can roughly be divided into two parts: the crypto key
sub module and the certificate sub module. The crypto key sub module is mainly
used to interact with a key provisioning entity (key master) that initiates the
generation or provides key material directly. These keys are assigned to crypto keys
of the CSM and stored in dedicated NVM blocks or can be stored as keys of the
respective crypto driver. The certificate sub module allows to configure certificates of
a chain, providing interfaces to store and verify them. The public key contained in a
certificate can further be assigned to CSM keys so that they can be used by crypto
jobs.
[SWS_KeyM_00001] ⌈ The crypto key sub module of the Key Manager shall be
completely disabled if KeyMCryptoKeyManagerEnabled is set to FALSE. No function
shall be available and no resources shall be allocated in this case that is not needed
for other operation.
⌋ (SRS_CryptoStack_00013, SRS_CryptoStack_00007)
[SWS_KeyM_00002] ⌈ The support of the certificate sub module within the Key
Manager shall be completely disabled if KeyMCertificateManagerEnabled is set to
FALSE. No function shall be available and no resources shall be allocated in this
case that is associated to certificate operations.
⌋ (SRS_CryptoStack_00013, SRS_CryptoStack_00007)
should be provided to CSM keys which are assigned to crypto jobs that are used for
authentication of Secured I-PDUs. It is therefore crucial from a modelling aspect to
assign the keys provided by the key master to the CSM keys and jobs used for the
respective Secured-I PDUs. This is an overall task in a vehicle and affects several
ECUs in the same way. It is one purpose of the crypto key submodule to support this
operation.
The key master can either be located directly in the vehicle to coordinate the key
generation internally, e.g. as a particular ECU. It is also possible to use a backend
system in the cloud that generates the key material and provides the necessary data
in a secure way to the ECUs. Usually diagnostic commands are used for the
communication, directly or indirectly, between the key master and the crypto key sub
module.
[SWS_KeyM_00005] ⌈ By default, the KeyM_Start() function will not consider any input
data or length information and will not provide any output data nor will the output data
length be changed.
⌋ ()
Rationale: The KeyM_KH_Start() function can perform OEM specific checks like
signature verification of any input data to prove the authenticity for a key
management operation.
[SWS_KeyM_00009] ⌈ The function KeyM_Finalize() will return E_OK if all keys have
been validated successfully. If at least one key could not be validated successfully,
the function shall return E_NOT_OK. Nevertheless, all keys shall be validated that
have been updated and the operation shall not be aborted if one key validation has
failed.
⌋ ()
Rationale:
The intention is to call KeyM_Prepare() once at the beginning after the key update
session has been initiated. The calling diagnostic service can provide specific data to
the key handler which is needed to perform the following key update operation. For
example, it could be used to extract crypto driver specific information needed by the
key master which is extracted from the (SHE-)hardware and provided in the output
buffer back again. Or it can initiate an OEM specific key negotiation process with
results that are later on necessary for the key update process. Another possibility
would be, that a (encrypted) common key is provided by the key master during
preparation. The specific key handler is able to (decrypt and) store the key in the
CSM. This results in a common key that is assigned to a CSM key and can further be
used to derive other keys from it.
Note: In this case, the CsmKey should be configured as a SHE key. The format
should be of algorithm type SHE and the KeyMCryptoKeyGenerationType should be
set to KEYM_STORED_KEY.
One obvious option is to call the KeyM_Update() function several times, i.e. once per
key that shall be updated. The key master will trigger the function call from outside
and will provide the key material with every service function. Another possibility is to
provide a container with one single call to e.g. KeyM_Prepare() which in turn calls
KeyM_KH_Prepare(). This allows to provide the container in an OEM specific format.
The key handler will scan the container and has to call KeyM_Update() several times
for each key available in the container.
The certificate submodule allows to define and configure certificates so that they can
be stored at production time and further be used for several purposes. The
configuration allows to define certificates of a certificate chain in a hierarchical
structure with root, intermediate and target certificates used in a PKI system. The
stored certificates will be checked at startup according to the configured hierarchy.
The configuration allows also to check if specific certificate elements have
determined values. There is further support to read specific elements of a certificate
and the contained public key can be associated to a CsmKey to use them with
configured CSM crypto jobs.
15 of 134 Document ID 907: AUTOSAR_SWS_KeyManager
- AUTOSAR confidential -
Specification of Key Manager
AUTOSAR CP R19-11
One important part of the specification is therefore the configuration to define the
parts of a certificate for flexible and comprehensive verification and for information
extraction. The certificates can be associated to KeyMCryptoKey container. This
allows a permanent storage of certificates in either NVM or CSM.
7.2.2 Initialization
Since parsing and verification of certificates can take a significant amount of time it is
recommended to perform this operation for stored certificates in the background task
after startup.
Rationale:
A root certificate has the characteristics, that the signature is verified with the public
key stored in the same certificate (self-signed certificate). It is the top certificate in
the hierarchy.
[SWS_KeyM_00025] ⌈ A certificate is stored for verification with the call of the function
KeyM_SetCertificate(). The certificate will be placed in the preconfigured storage
class of the KeyMCertificate/KeyMCertificateStorage.
⌋ ()
Note:
Such a certificate is typically placed in RAM and is not intended to be used for
permanent storage. KeyM_SetCertificate() is just used for the verification of a
presented certificate. It is not intended to be used for permanent storage like for
example the Root certificate. For operation to store a certificate permanently, the
function KeyM_ServiceCertificate() shall be used.
[SWS_KeyM_00145] ⌈ If development errors are active the Key Manager shall check
on every function where result buffers are provided if the provided buffer is large
enough to store the requested result. If not, the development error
KEYM_E_SMALL_BUFFER shall be set.
⌋ ()
[SWS_KeyM_00146] ⌈ If development errors are active the Key Manager shall check
on every function where pointers are provided if the pointer is not a NULL_PTR. If a
NULL_PTR is provided but not expected, the development error
KEYM_E_PARAM_POINTER shall be set.
⌋ ()
8 API specification
In this chapter all types included from the following files are listed:
[SWS_KeyM_00037]⌈
Module Header File Imported Type
Rte_Csm_Type.h Crypto_OperationModeType
Csm
Rte_Csm_Type.h Crypto_VerifyResultType
Rte_StbM_Type.h StbM_SynchronizedTimeBaseType
Rte_StbM_Type.h StbM_TimeBaseStatusType
StbM
Rte_StbM_Type.h StbM_TimeStampType
Rte_StbM_Type.h StbM_UserDataType
Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType
⌋()
The Key Management module uses the following extension to the Std_ReturnType:
[SWS_KeyM_00040]⌈
KEYM_E_BUSY 0x02 Key management is busy with other operations.
KEYM_E_CERT_
Certificate verification failed - Invalid Chain of
INVALID_CHAIN_OF_ 0x09
Trust
TRUST
Available
KeyM.h
via
⌋()
8.2.1 KeyM_ConfigType
[SWS_KeyM_00157]⌈
Name KeyM_ConfigType
Kind Structure
Implementation specific
Elements Type --
This structure is the base type to initialize the Key Manager module.
Description
A pointer to an instance of this structure will be used in the initialization of the Key
Manager module.
Available
KeyM.h
via
⌋(SWS_BSW_00216)
8.2.2 KeyM_KH_UpdateOperationType
[SWS_KeyM_00055]⌈
Name KeyM_KH_UpdateOperationType
Kind Enumeration
Description Specifies the type of key handler update operation that was performed in the callback.
Available
KeyM.h
via
⌋()
8.2.3 KeyM_CertElementIteratorType
[SWS_KeyM_00042]⌈
Name KeyM_CertElementIteratorType
Kind Structure
Implementation specific
Elements
Type --
⌋()
8.2.4 KeyM_CryptoKeyIdType
[SWS_KeyM_00302]⌈
Name KeyM_CryptoKeyIdType
Kind Type
⌋()
8.2.5 KeyM_CertDataType
[SWS_KeyM_00041]⌈
Name KeyM_CertDataType
Kind Structure
certDataLength
Type uint32
Elements
Comment Length of the certificate data.
certData
Type KeyM_CertDataPointerType
Pointer references the data for a certificate on a local data area of the
Comment
caller.
Description This structure is used to exchange certificate data through interface functions.
Available
KeyM.h
via
⌋()
8.3.1 General
8.3.1.1 KeyM_Init
[SWS_KeyM_00043]⌈
Service Name KeyM_Init
void KeyM_Init (
Syntax const KeyM_ConfigType* ConfigPtr
)
Sync/Async Synchronous
Note: A Configuration of the Key Manager at initialization is currently not used and
shall therefore pass a NULL_PTR to the module.
Rationale: The operation can be done in a background task if CPU time is available,
Pre-validating certificates will help to speed-up the authentication when a certificate
is presented and shall be verified at runtime against a pre-installed certificate chain.
[SWS_KeyM_00046] ⌈ If the crypto key submodule is active, all keys stored in NVM
shall be read from and stored to CSM (RAM-) key slots during initialization.
⌋ ()
8.3.1.2 KeyM_Deinit
[SWS_KeyM_00047]⌈
Service Name KeyM_Deinit
void KeyM_Deinit (
Syntax void
)
Sync/Async Synchronous
Description This function resets the key management module to the uninitialized state.
⌋()
[SWS_KeyM_00048] ⌈
For security reason the crypto key submodule shall actively destroy all data in RAM
that was used for cryptographical key material. Especially symmetric keys and
intermediate results shall be set to an initial value.
⌋ ()
8.3.1.3 KeyM_GetVersionInfo
[SWS_KeyM_00049]⌈
Service Name KeyM_GetVersionInfo
void KeyM_GetVersionInfo (
Syntax Std_VersionInfoType* VersionInfo
)
Sync/Async Synchronous
⌋(SRS_BSW_00407)
8.3.2.1 KeyM_Start
[SWS_KeyM_00050]⌈
Service Name KeyM_Start
Std_ReturnType KeyM_Start (
KeyM_StartType StartType,
const uint8* RequestData,
Syntax uint16 RequestDataLength,
uint8* ResponseData,
uint16* ResponseDataLength
)
Service ID
0x04
[hex]
Sync/Async Synchronous
Parameters RequestData Information that comes along with the request, e.g. signature
(in)
RequestData
Length of data in the RequestData array
Length
Parameters
ResponseData Data returned by the function.
(out)
This function is optional and only used if the configuration item KeyMCryptoKey
Description
StartFinalizeFunctionEnabled is set to true. It intents to allow key update operation.
⌋()
[SWS_KeyM_00088] ⌈ OEM or security specific checks for the start operation shall
be performed in the corresponding key handler operation.
⌋ ()
8.3.2.2 KeyM_Prepare
[SWS_KeyM_00051]⌈
Service
KeyM_Prepare
Name
Std_ReturnType KeyM_Prepare (
const uint8* RequestData,
uint16 RequestDataLength,
Syntax
uint8* ResponseData,
uint16* ResponseDataLength
)
Service ID
0x05
[hex]
Sync/Async Synchronous
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes
Parameters
ResponseData Data returned by the function.
(out)
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
Description
negotiation for a common secret that is used further to derive key material. This
function is only available if KeyMCryptoKeyPrepareFunctionEnabled is set to TRUE.
⌋()
8.3.2.3 KeyM_Update
[SWS_KeyM_00052]⌈
Std_ReturnType KeyM_Update (
const uint8* KeyNamePtr,
uint16 KeyNameLength,
const uint8* RequestDataPtr,
Syntax
uint16 RequestDataLength,
uint8* ResultDataPtr,
uint16 ResultDataMaxLength
)
Service ID
0x06
[hex]
Sync/Async Asynchronous
Parameters RequestData
Information that comes along with the request
(in) Ptr
RequestData
Length of data in the RequestData array
Length
ResultDataMax
Max number of bytes available in ResultDataPtr.
Length
Parameters
None
(inout)
Parameters
ResultDataPtr Pointer to a data buffer used by the function to store results.
(out)
Description This function is used to initiate the key generation or update process.
⌋()
Info:
The result data is either the result from the key handler or, if no key handler is used,
contains the M4M5 for a SHE key.
8.3.2.4 KeyM_Finalize
[SWS_KeyM_00053]⌈
Service
KeyM_Finalize
Name
Std_ReturnType KeyM_Finalize (
const uint8* RequestDataPtr,
uint16 RequestDataLength,
Syntax
uint8* ResponseDataPtr,
uint16 ResponseMaxDataLength
)
Service ID
0x07
[hex]
Sync/Async Asynchronous
Parameters ResponseData
Data returned by the function.
(out) Ptr
⌋()
Info:
Since key validation can take considerable amount of time this function is used in
asynchronous mode only. Since the key handler is called in synchronous mode it is
recommended to call it not from within KeyM_Finalize() but delegate the call to the
background task.
35 of 134 Document ID 907: AUTOSAR_SWS_KeyManager
- AUTOSAR confidential -
Specification of Key Manager
AUTOSAR CP R19-11
The caller of KeyM_Finalize() shall provide a buffer that is large enough to store the
response. This buffer shall not be touched by the caller if KeyM_Finalize() returns
E_OK until the callback notification has indicated the end of the finalize operation.
[SWS_KeyM_00106] ⌈ At the end of a key finalize operation, all flags for key
validation have to be cleared and the session state shall be set to the init mode.
Thus, no further key update operations are allowed anymore.
⌋ ()
8.3.2.5 KeyM_Verify
[SWS_KeyM_00054]⌈
Service
KeyM_Verify
Name
Std_ReturnType KeyM_Verify (
const uint8* KeyNamePtr,
uint16 KeyNameLength,
const uint8* RequestData,
Syntax
uint16 RequestDataLength,
uint8* ResponseData,
uint16* ResponseDataLength
)
Service ID
0x08
[hex]
KeyNamePtr Points to an array that defines the name of the key to be updated
RequestData
Length of data in the RequestData array
Length
Parameters Response
Data returned by the function.
(out) Data
The key server requests to verify the provided keys. The key manager performs
operation on the assigned job and returns the result to the key server who verifies if
Description
the results was provided with this key as expected. This function is only available if
KeyMCryptoKeyVerifyFunctionEnabled is set to TRUE.
⌋()
Info:
Since only one input and output buffer is specified, only MAC generate and data
decrypt/encrypt operations can be done autonomously in this function. Other
operations such as AEAD encrypt/decrypt or MAC verify requires interpretation of
structured RequestData which needs to be interpreted in the key handler verification
function.
Info:
This is especially useful if at least one CSM verify job is configured for asynchronous
operation. Ideally, the verification is initiated in the background task.
8.3.3.1 KeyM_ServiceCertificate
[SWS_KeyM_00056]⌈
Service
KeyM_ServiceCertificate
Name
Std_ReturnType KeyM_ServiceCertificate (
KeyM_ServiceCertificateType Service,
const uint8* CertNamePtr,
uint16 CertNameLength,
Syntax const uint8* RequestData,
uint16 RequestDataLength,
uint8* ResponseData,
uint16 ResponseDataLength
)
Service ID
0x09
[hex]
Sync/Async Asynchronous
Service Provides the type of service the key manager has to perform.
RequestData
Length of data in the RequestData array
Length
ResponseData
Max number of bytes available in ResponseDataPtr.
Length
Parameters
None
(inout)
Parameters
ResponseData Data returned by the function.
(out)
The key server requests an operation from the key client. The type of operation is
specified in the first parameter KeyM_ServiceCertificateType. Certificate operation
Description
requests are operated through this function. This function is only available if the
configuration parameter KeyMServiceCertificateFunctionEnabled is set to TRUE.
⌋()
KEYM_SERVICE_CERT_ The key server requests to store a root certificate. The service checks
SET_ROOT if the certificate slot is empty and if so will validate the root certificate
according to the configured rule and will store the root certificate
KEYM_SERVICE_CERT_ The key server requests to update an existing root certificate. The
UPDATE_ROOT service checks if a root certificate exists and verifies the new root
certificate against the already existing ones. If the validation was
successful, the root certificate is re-newed in the slot.
KEYM_SERVICE_CERT_ The key server requests to store an intermediate certificate. A root
SET_INTERMEDIATE certificate shall already exist to allow to validate the intermediate
certificate against the root certificate and other certificates that might
exist in the chain. The certificate slot is checked to be empty. If the
validation was successful, the certificate is stored in the slot.
KEYM_SERVICE_CERT_ The key server requests to update an intermediate certificate. It is
UPDATE_INTERMEDIAT verified against the root certificate and other certificates that might
E exist in the chain. If the validation was successful the certificate is
updated.
KEYM_SERVICE_CERT_ The key server provides a certificate revocation list. The service
UPDATE_CRL checks the signature of the list and stores it in the slot if the validation
was successful. The revocation list shall then be checked during the
verification of certificates if at least one CRL is available.
8.3.3.2 KeyM_SetCertificate
[SWS_KeyM_00057]⌈
Service Name KeyM_SetCertificate
Std_ReturnType KeyM_SetCertificate (
KeyM_CertificateIdType CertId,
Syntax const KeyM_CertDataType* CertificateDataPtr
)
Sync/Async Synchronous
CertificateData
Pointer to a structure that provides the certificate data.
Ptr
Parameters
None
(inout)
Parameters
None
(out)
This function provides the certificate data to the key management module to
Description
temporarily store the certificate.
⌋()
[SWS_KeyM_00115] ⌈ If all parameters are accepted the function shall store the
provided certificate data in an internal memory that is assigned to the certificate slot
referenced by the given CertId, typically in RAM. Once the certificate is provided the
certificate submodule will start parsing the certificate.
⌋()
The parsing of a certificate can either be done directly within this function or can be
operated in the background or main function.
Note: Setting the certificate and parsing it successfully does not necessarily imply
that the certificate is validated in its chain of trust. The parsing is merely a pre-
requisite to perform a certificate validation which is requested with another function.
[SWS_KeyM_00166] ⌈
If the storage class of the certificate referenced by the container
KeyMCertificate//KeyMCertificateStorage is set to KEYM_STORAGE_IN_CSM or
KEYM_STORAGE_IN_NVM a development error KEYM_E_CONFIG_FAILURE shall
be generated. If development mode is disabled the value E_NOT_OK shall be
returned.
⌋()
8.3.3.3 KeyM_GetCertificate
[SWS_KeyM_00058]⌈
Service
KeyM_GetCertificate
Name
Std_ReturnType KeyM_GetCertificate (
KeyM_CertificateIdType CertId,
Syntax
KeyM_CertDataType* CertificateDataPtr
)
Service ID
0x0b
[hex]
Sync/Async Synchronous
Parameters
CertId Holds the identifier of the certificate
(in)
Parameters
None
(out)
⌋()
8.3.3.4 KeyM_VerifyCertificates
[SWS_KeyM_00059]⌈
Service
KeyM_VerifyCertificates
Name
Std_ReturnType KeyM_VerifyCertificates (
KeyM_CertificateIdType CertId,
Syntax KeyM_CertificateIdType CertUpperId
)
Service ID
0x0c
[hex]
Sync/Async Asynchronous
Parameters
None
(inout)
Parameters
None
(out)
This function verifies two certificates that are stored and parsed internally against
each other. The certificate referenced with CertId was signed by the certificate
Description
referenced with certUpperId. Only these two certificates are validated against each
other.
⌋()
[SWS_KeyM_00139] ⌈ If a certificate shall be verified but has not yet been parsed,
the parsing operation shall be done as soon as possible and the verification process
shall be started afterwards.
⌋()
8.3.3.5 KeyM_VerifyCertificate
[SWS_KeyM_00060]⌈
Std_ReturnType KeyM_VerifyCertificate (
Syntax KeyM_CertificateIdType CertId
)
Service ID
0x0d
[hex]
Sync/Async Asynchronous
Parameters
CertId Holds the identifier of the certificate
(in)
Parameters
None
(inout)
Parameters
None
(out)
This function verifies a certificate that was previously provided with KeyM_Set
Description Certificate() against already stored and provided certificates stored with other
certificate IDs.
⌋()
trust and check if the root certificate has been validated. If this is valid, the next
intermediate certificate shall be checked until the certificate referenced by CertID is
to be verified. The order of the validation is important to meet security requirements.
[SWS_KeyM_00121] ⌈ The function returns E_OK if the operation has been accepted
and can be performed. Any other return value will indicate the appropriate error and
the verification will not be started.
⌋()
8.3.3.6 KeyM_VerifyCertificateChain
[SWS_KeyM_00061]⌈
Service
KeyM_VerifyCertificateChain
Name
Std_ReturnType KeyM_VerifyCertificateChain (
KeyM_CertificateIdType CertId,
Syntax const KeyM_CertDataType[] certChainData,
uint8 NumberOfCertificates
)
Service ID
0x0e
[hex]
Sync/Async Asynchronous
Parameters
None
(inout)
Parameters
None
(out)
⌋()
[SWS_KeyM_00125] ⌈ The function returns E_OK if the operation has been accepted
and can be performed. Any other return value will indicate the appropriate error and
the verification will not be started.
⌋()
8.3.3.7 KeyM_CertElementGet
[SWS_KeyM_00063]⌈
Service
KeyM_CertElementGet
Name
Std_ReturnType KeyM_CertElementGet (
KeyM_CertificateIdType CertId,
KeyM_CertElementIdType CertElementId,
Syntax
uint8* CertElementData,
uint32* CertElementDataLength
)
Service ID
0x0f
[hex]
Sync/Async Synchronous
In: Pointer to a value that contains the maximum data length of the
Cert
Parameters CertElementData buffer. Out: The data length will be overwritten with
Element
(inout) the actual length of data placed to the buffer if the function returns E_
DataLength
OK. Otherwise, the it will be overwritten with the value zero.
⌋()
8.3.3.8 KeyM_CertElementGetFirst
[SWS_KeyM_00064]⌈
Service
KeyM_CertElementGetFirst
Name
Std_ReturnType KeyM_CertElementGetFirst (
KeyM_CertificateIdType CertId,
KeyM_CertElementIdType CertElementId,
Syntax KeyM_CertElementIteratorType* CertElementIterator,
uint8* CertElementData,
uint32* CertElementDataLength
)
Service ID
0x10
[hex]
Sync/Async Synchronous
E_OK: Element found and data provided in the buffer. The cert
ElementIterator has been initialized accordingly.
E_NOT_OK: Element data not found. CertElementIterator cannot be
used for further calls.
KEYM_E_PARAMETER_MISMATCH: Certificate ID or certificate
Std_Return- element ID invalid.
Return value
Type KEYM_E_KEY_CERT_SIZE_MISMATCH: Provided buffer for the
certificate element too small.
KEYM_E_KEY_CERT_EMPTY: No certificate data available, the
certificate is empty.
KEYM_E_CERT_INVALID: Certificate is not valid or not verified
successfully
This function is used to initialize the interative extraction of a certificate data element.
It always retrieves the top element from the configured certificate element and
Description
initializes the structure KeyM_CertElementIterator so that consecutive data from this
element can be read with KeyM_CertElementGetNext().
⌋()
Rationale:
Some certificate elements can contain more than one element associated to an
object ID. The function pair of KeyM_CertElementGetFirst/
KeyM_CertElementGetNext shall be used to retrieve a list of elements one after
another. The iterator, which is implementation specific, shall be used to forward
iterate through the list of elements.
8.3.3.9 KeyM_CertElementGetNext
[SWS_KeyM_00065]⌈
Service
KeyM_CertElementGetNext
Name
Std_ReturnType KeyM_CertElementGetNext (
KeyM_CertElementIteratorType* CertElementIterator,
Syntax uint8* CertElementData,
uint32* CertElementDataLength
)
Service ID
0x11
[hex]
Sync/Async Synchronous
Parameters
None
(in)
E_OK: Element found and data provided in the buffer. The Cert
ElementIterator has been initialized accordingly.
E_NOT_OK: Element data not found. CertElementIterator cannot be
used for further calls.
KEYM_E_PARAMETER_MISMATCH: Certificate ID or certificate
Std_Return- element ID invalid.
Return value
Type KEYM_E_KEY_CERT_SIZE_MISMATCH: Provided buffer for the
certificate element too small.
KEYM_E_KEY_CERT_EMPTY: No certificate data available, the
certificate is empty.
KEYM_E_CERT_INVALID: Certificate is not valid or not verified
successfully
This function provides further data from a certificate element, e.g. if a set of data are
located in one certificate element that shall be read one after another. This function
Description
can only be called if the function KeyM_CertElementGetFirst() has been called once
before.
⌋()
[SWS_KeyM_00148] ⌈ This function can only be called for certificate elements where
KeyMCertificateElementHasIteration is set to TRUE. Otherwise, the function shall
return KEYM_E_CERT_INVALID_FORMAT.
⌋ ()
8.3.3.10 KeyM_CertGetStatus
[SWS_KeyM_00066]⌈
Service Name KeyM_CertGetStatus
Std_ReturnType KeyM_CertGetStatus (
Syntax KeyM_CertificateIdType CertId,
KeyM_CertificateStatusType* Status
52 of 134 Document ID 907: AUTOSAR_SWS_KeyManager
- AUTOSAR confidential -
Specification of Key Manager
AUTOSAR CP R19-11
Sync/Async Synchronous
⌋()
8.5.1 KeyM_MainFunction
[SWS_KeyM_00074]⌈
Service Name KeyM_MainFunction
void KeyM_MainFunction (
Syntax void
)
⌋()
8.5.2 KeyM_MainBackgroudFunction
[SWS_KeyM_00075]⌈
Service
KeyM_MainBackgroundFunction
Name
void KeyM_MainBackgroundFunction (
Syntax void
)
Service ID
0x1a
[hex]
Function is called from a pre-emptive operating system when no other task operation
Description is needed. Can be used for calling time consuming synchronous functions such as
KeyM_KH_Update().
⌋()
This chapter defines all external interfaces which are required to fulfill the core
functionality of the module.
[SWS_KeyM_00076]⌈
Header
API Function Description
File
Retrieves the key element bytes from a specific key element of the key
Csm_Key-
Csm.h identified by the keyId and stores the key element in the memory location
ElementGet
pointed by the key pointer.
Csm_Key-
Csm.h Sets the given key element bytes to the key identified by keyId.
ElementSet
Csm_KeySet-
Csm.h Sets the key state of the key identified by keyId to valid.
Valid
⌋()
This chapter defines all external interfaces which are required to fulfill an optional
functionality of the module.
[SWS_KeyM_00078]⌈
API Header
Description
Function File
Derives a new key by using the key elements in the given key identified by
Csm_Key- the keyId. The given key contains the key elements for the password and
Csm.h
Derive salt. The derived key is stored in the key element with the id 1 of the key
identified by targetCryptoKeyId.
Csm_-
Verifies the given MAC by comparing if the signature is generated with the
Signature- Csm.h
given data.
Verify
Det_Report-
Det.h Service to report development errors.
Error
Returns a time value (Local Time Base derived from Global Time Base) in
standard format.
StbM_Get-
StbM.h
CurrentTime Note: This API shall be called with locked interrupts / within an Exclusive
Area to prevent interruption (i.e., the risk that the time stamp is outdated
on return of the function call).
⌋()
In this chapter all interfaces are listed where the target function could be configured.
The target function is usually a call-back function. The names of these kind of
interfaces is not fixed because they are configurable.
Hint:
The functional behaviour of key handler functions is described in the respective
section of the calling Key Management function.
8.6.3.1 KeyM_KH_Start
[SWS_KeyM_00067]⌈
Service
KeyM_KH_Start
Name
Std_ReturnType KeyM_KH_Start (
KeyM_StartType StartType,
const uint8* RequestData,
Syntax uint16 RequestDataLength,
uint8* ResponseData,
uint16* ResponseDataLength
)
Sync/Async Synchronous
Parameters RequestData Information that comes along with the request, e.g. signature
(in)
RequestData
Length of data in the RequestData array
Length
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes in ResponseData if function returns E_OK.
Parameters
ResponseData Data returned by the function.
(out)
⌋()
8.6.3.2 KeyM_KH_Prepare
[SWS_KeyM_00068]⌈
Service
KeyM_KH_Prepare
Name
Std_ReturnType KeyM_KH_Prepare (
const uint8* RequestData,
uint16 RequestDataLength,
Syntax uint8* ResponseDataPtr,
uint16* ResponseDataLength
)
Sync/Async Synchronous
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes in ResponseData.
Parameters
ResponseDataPtr Data returned by the function.
(out)
⌋()
8.6.3.3 KeyM_KH_Update
[SWS_KeyM_00069]⌈
Service
KeyM_KH_Update
Name
Std_ReturnType KeyM_KH_Update (
const uint8* KeyNamePtr,
uint16 KeyNameLength,
const uint8* RequestData,
Syntax uint16 RequestDataLength,
uint8* ResultDataPtr,
uint16* ResultDataLengthPtr,
KeyM_CryptoKeyIdType* KeymId,
KeyM_KH_UpdateOperationType* UpdateOperation
Sync/Async Synchronous
KeyName
Points to an array that defines the name of the key to be updated
Ptr
Request
Length of data in the RequestData array
DataLength
Parameters
(inout) Provides a reference to the crypto key as an index to the crypto key
table. In: Providing the key ID if a name was provided and a key was
KeymId found. Returns 0xFFFFFFFFul if no key was found. Out: Key ID of the
key where the operation shall be performed to if updateOperation
indicates a key operation.
ResultData
Data returned by the function.
Ptr
Parameters
(out)
Update Provides information to the caller what operation has been performed
Operation and how to interpret the ResultData.
⌋()
[SWS_KeyM_00096] ⌈ If the key handler returns E_OK and provides the operation
type KEYM_KH_UPDATE_KEY_UPDATE_REPEAT and ResultDataLengthPtr
indicates a value greater than 0 then the key manager shall perform the key update
operation according to the configuration (store or derive the key in CSM) and use the
data stored in ResultDataPtr.
If the update operation was successful, the key handler shall be called again.
⌋ ()
Info: The repeated call to the key handler update operation allows the key handler to
update several keys at a time.
[SWS_KeyM_00093] ⌈ If the key handler returns and provides the operation type
KEYM_KH_UPDATE_FINISH, the key update operation shall finish and use the
return value from the key handler. The data buffer from
KeyM_KH_Update::ResultDataPtr shall be copied to the buffer provided with
KeyM_Update::ResultDataPtr and the KeyM_CryptoKeyUpdateCallbackNotification()
function shall be called by the KeyM_Update() function.
⌋ ()
Info:
This allows the key handler update operation to provide results back to the key
server.
8.6.3.4 KeyM_KH_Finalize
[SWS_KeyM_00070]⌈
Service
KeyM_KH_Finalize
Name
Std_ReturnType KeyM_KH_Finalize (
const uint8* RequestData,
uint16 RequestDataLength,
Syntax uint8* ResponseData,
uint16* ResponseDataLength
)
Sync/Async Synchronous
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes in ResponseData.
Parameters
ResponseData Data returned by the function.
(out)
⌋()
8.6.3.5 KeyM_KH_Verify
[SWS_KeyM_00071]⌈
Service
KeyM_KH_Verify
Name
Std_ReturnType KeyM_KH_Verify (
const uint8* KeyNamePtr,
uint16 KeyNameLength,
const uint8* RequestData,
Syntax
uint16 RequestDataLength,
uint8* ResponseData,
uint16* ResponseDataLength
)
Sync/Async Synchronous
KeyNamePtr Pointer to an array that defines the name of the key to be updated
RequestData
Length of data in the RequestData array
Length
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes in ResponseData.
Parameters
ResponseData Data returned by the function.
(out)
⌋()
8.6.3.6 KeyM_KH_ServiceCertificate
[SWS_KeyM_00072]⌈
Service Name KeyM_KH_ServiceCertificate
Std_ReturnType KeyM_KH_ServiceCertificate (
KeyM_ServiceCertificateType Service,
const uint8* CertName,
uint16 CertNameLength,
Syntax const uint8* RequestData,
uint16 RequestDataLength,
uint8* ResponseData,
uint16* ResponseDataLength
)
Sync/Async Synchronous
Parameters
Specifies the number of bytes in keyName. The value 0
(in) CertNameLength
indicates that no keyName is provided within this function.
RequestData
Length of data in the RequestData array
Length
Parameters ResponseData In: Max number of bytes available in ResponseData Out: Actual
(inout) Length number of bytes in ResponseData.
Parameters
ResponseData Data returned by the function.
(out)
⌋()
8.6.3.7 KeyM_CryptoKeyUpdateCallbackNotification
[SWS_KeyM_00077]⌈
Service Name KeyM_CryptoKeyUpdateCallbackNotification
void KeyM_CryptoKeyUpdateCallbackNotification (
KeyM_ResultType Result,
Syntax uint16 ResultDataLength,
const uint8* ResultDataPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
Notifies the application that a crypto key update operation has been finished. This
Description
function is used by the key manager.
⌋()
8.6.3.8 KeyM_CryptoKeyFinalizeCallbackNotification
[SWS_KeyM_00079]⌈
Service Name KeyM_CryptoKeyFinalizeCallbackNotification
void KeyM_CryptoKeyFinalizeCallbackNotification (
KeyM_ResultType Result,
Syntax uint16 ResultDataLength,
const uint8* ResultDataPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
ResultData
Parameters ontains the length of the resulting data of this operation.
Length
(in)
Pointer to the data of the result (the data buffer that has been
ResultDataPtr
provided with the service function).
Parameters
None
(inout)
Parameters
None
(out)
Notifies the application that a crypto key finalize operation has been finished. The
Description callback function is only called and needed if KeyMCryptoKeyStartFinalizeFunction
Enabled is set to TRUE.
⌋()
ResultData can provide additional information about the finalization operation used to
provide this back to the key server.
⌋()
8.6.3.9 KeyM_CryptoKeyVerifyCallbackNotification
[SWS_KeyM_00081]⌈
Service Name KeyM_CryptoKeyVerifyCallbackNotification
void KeyM_CryptoKeyVerifyCallbackNotification (
KeyM_ResultType Result,
uint32 KeyId,
Syntax uint16 ResultDataLength,
const uint8* ResultDataPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
KeyId The key identifier where this verification was started for.
Parameters (in)
Contains the length of the resulting data of this operation if
ResultDataLength
any.
Parameters
None
(inout)
Parameters
None
(out)
Notifies the application that a crypto key verify operation has been finished. This
Description
function is used by the key manager.
⌋()
8.6.3.10 KeyM_ServiceCertificateCallbackNotification
[SWS_KeyM_00147]⌈
Service
KeyM_ServiceCertificateCallbackNotification
Name
void KeyM_ServiceCertificateCallbackNotification (
KeyM_CertificateIdType CertId,
KeyM_ResultType Result,
Syntax
uint16 ResultDataLength,
const uint8* ResultDataPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
CertId The certificate identifier where this service was started for.
Parameters
None
(inout)
Parameters
None
(out)
Notifies the application that the certificate service operation has been finished. This
function is used by the certificate submodule. This callback is only provided if Key
Description
MServiceCertificateFunctionEnabled is set to TRUE. The function name is
configurable by KeyMServiceCertificateCallbackNotificationFunc.
⌋()
8.6.3.11 KeyM_CertificateVerifyCallbackNotification
[SWS_KeyM_00073]⌈
Service Name KeyM_CertificateVerifyCallbackNotification
Std_ReturnType KeyM_CertificateVerifyCallbackNotification (
KeyM_CertificateIdType CertId,
Syntax
KeyM_CertificateStatusType Result
)
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
Notifies the application that a certificate verification has been finished. The function
Description
name is configurable by KeyMCertificateVerifyCallbackNotificationFunc.
⌋()
This chapter defines blueprints of the AUTOSAR Interfaces of the Key Manager
Service (KeyM).
According to TPS_GST_00081 these blueprints are placed in ARPackage
/AUTOSAR/KeyM.
8.7.2.1 KeyM_StartType
[SWS_KeyM_00038]⌈
Name KeyM_StartType
Kind Enumeration
This type specifies in which mode the key operation will start. The OEM production
Description
mode provides higher privileges compared to workshop mode.
Variation --
Available
Rte_KeyM_Type.h
via
⌋()
8.7.2.2 KeyM_CertElementIdType
[SWS_KeyM_00300]⌈
Name KeyM_CertElementIdType
Kind Type
Variation --
⌋()
8.7.2.3 KeyM_CertificateIdType
[SWS_KeyM_00301]⌈
Name KeyM_CertificateIdType
Kind Type
Variation --
⌋()
8.7.2.4 KeyM_ServiceCertificateType
[SWS_KeyM_00039]⌈
Name KeyM_ServiceCertificateType
Kind Enumeration
KEYM_SERVICE_CERT_
0x03 Key server wants to add a new root certificate.
SET_ROOT
KEYM_SERVICE_CERT_
0x07 Provide or update a certificate revocation list.
UPDATE_CRL
This type specifies the requested service operation and what information is provided
Description
with this function.
Variation --
Available
Rte_KeyM_Type.h
via
⌋()
8.7.2.5 KeyM_KeyCertNameDataType
[SWS_KeyM_91000]⌈
Name KeyM_KeyCertNameDataType
Variation --
⌋()
[SWS_KeyM_91001]⌈
Name KeyM_CertificateDataType_{KeyMCertificate}
⌋()
[SWS_KeyM_91002]⌈
Name KeyM_CertificateType_{KeyMCertificate}
Kind Structure
Elements certDataLength
Type uint32
certData
Type KeyM_CertificateDataType_{KeyMCertificate}
Pointer references the data for a certificate on a local data area of the
Comment
caller.
Available
Rte_KeyM_Type.h
via
⌋()
8.7.2.8 KeyM_CertificateStatusType
[SWS_KeyM_91003]⌈
Name KeyM_CertificateStatusType
Kind Enumeration
KEYM_CERTIFICATE_NOT_
0x04 Certificate not set
AVAILABLE
Variation --
Available
Rte_KeyM_Type.h
via
⌋()
[SWS_KeyM_91004]⌈
Name KeyM_CertificateElementType_{KeyMCertificate}_{KeyMCertificateElement}
KeyMCertificate ={ecuc(KeyM/KeyMCertificate.SHORT-NAME)}KeyMCertificate
Variation
Element ={ecuc(KeyM/KeyMCertificate/KeyMCertificateElement.SHORT-NAME)}
Available
Rte_KeyM_Type.h
via
⌋()
8.7.2.10 KeyM_CryptoKeyDataType
[SWS_KeyM_91012]⌈
Name KeyM_CryptoKeyDataType
Kind Pointer
Type uint8*
Variation --
⌋()
8.7.2.11 KeyM_ResultType
[SWS_KeyM_91008]⌈
Name KeyM_ResultType
Kind Enumeration
KEYM_RT_CERT_
INVALID_CHAIN_OF_ 0x05 Certificate verification failed - Invalid Chain of Trust
TRUST
Variation --
Available
Rte_KeyM_Type.h
via
⌋()
8.7.3 Client-Server-Interfaces
8.7.3.1 KeyM_Certificate
[SWS_KeyM_00082]⌈
Name KeyMCertificate_{KeyMCertificate}
IsService true
0 E_OK --
1 E_NOT_OK --
2 KEYM_E_BUSY --
4 KEYM_E_KEY_CERT_SIZE_MISMATCH --
Possible Errors
5 KEYM_E_PARAMETER_MISMATCH --
7 KEYM_E_KEY_CERT_WRITE_FAIL --
9 KEYM_E_KEY_CERT_READ_FAIL --
10 KEYM_E_KEY_CERT_EMPTY --
11 KEYM_E_CERT_INVALID_CHAIN_OF_TRUST --
Operation GetCertificate
Variation --
Certificate
Type KeyM_CertificateType_{KeyMCertificate}
Comment Certificate
E_OK
E_NOT_OK
KEYM_E_KEY_CERT_SIZE_MISMATCH
Possible Errors
KEYM_E_PARAMETER_MISMATCH
KEYM_E_KEY_CERT_READ_FAIL
KEYM_E_KEY_CERT_EMPTY
Operation GetStatus
Variation --
Status
Type KeyM_CertificateStatusType
Variation --
E_NOT_OK
Operation SetCertificate
Variation --
Certificate
Type KeyM_CertificateType_{KeyMCertificate}
Parameters Direction IN
E_OK
E_NOT_OK
Possible Errors KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
KEYM_E_KEY_CERT_WRITE_FAIL
Operation VerifyCertificate
Variation --
E_OK
E_NOT_OK
KEYM_E_BUSY
Possible Errors KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
KEYM_E_KEY_CERT_EMPTY
KEYM_E_CERT_INVALID_CHAIN_OF_TRUST
⌋()
8.7.3.2 KeyMCertificateNotification
[SWS_KeyM_00159]⌈
Name KeyMCertificateNotification
Comment This service interface provides callbacks for certificate management operation.
IsService true
Variation --
Possible Errors -- -- --
Comment Notifies the application that a certificate verification has been finished.
Result
Type KeyM_CertificateStatusType
Parameters Direction IN
Variation --
Possible Errors --
Operation ServiceCertificateCallbackNotification
Notifies the application that the certificate service operation has been finished. This
function is used by the certificate submodule.
Comment
This callback is only provided if KeyMServiceCertificateFunctionEnabled is set to
TRUE.
Variation --
Result
Parameters
Type KeyM_ResultType
Direction IN
Variation --
ResponseDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction IN
Variation --
Possible
--
Errors
⌋()
8.7.3.3 KeyMCertificateElement
[SWS_KeyM_00083]⌈
Name KeyMCertificateElement_{KeyMCertificate}_{KeyMCertificateElement}
IsService true
0 E_OK --
1 E_NOT_OK --
4 KEYM_E_KEY_CERT_SIZE_MISMATCH --
Possible
Errors
5 KEYM_E_PARAMETER_MISMATCH --
6 KEYM_E_CERT_INVALID --
10 KEYM_E_KEY_CERT_EMPTY --
Operation CertificateElementGet
Variation --
CertificateElementData
KeyM_CertificateElementType_{KeyMCertificate}_{KeyMCertificate-
Type
Element}
Direction OUT
Comment --
CertificateDataLength
Type uint32
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible KEYM_E_KEY_CERT_SIZE_MISMATCH
Errors KEYM_E_PARAMETER_MISMATCH
KEYM_E_CERT_INVALID
KEYM_E_KEY_CERT_EMPTY
Operation CertificateElementGetByIndex
Variation --
Index
Type uint16
Direction IN
Variation --
CertificateElementData
KeyM_CertificateElementType_{KeyMCertificate}_{KeyMCertificate-
Type
Element}
Parameters
Direction OUT
Comment --
CertificateDataLength
Type uint32
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible KEYM_E_KEY_CERT_SIZE_MISMATCH
Errors KEYM_E_PARAMETER_MISMATCH
KEYM_E_CERT_INVALID
KEYM_E_KEY_CERT_EMPTY
Operation CertificateElementGetCount
Comment This operation returns the amount of items available for a certificate element.
Variation --
count
Type uint16
Variation --
E_OK
E_NOT_OK
KEYM_E_KEY_CERT_SIZE_MISMATCH
Possible Errors
KEYM_E_PARAMETER_MISMATCH
KEYM_E_CERT_INVALID
KEYM_E_KEY_CERT_EMPTY
⌋()
8.7.3.4 KeyMCryptoKey
[SWS_KeyM_00084]⌈
Name KeyMCryptoKey
IsService true
Variation --
0 E_OK --
1 E_NOT_OK --
2 KEYM_E_BUSY --
3 KEYM_E_PENDING --
Possible Errors
4 KEYM_E_KEY_CERT_SIZE_MISMATCH --
5 KEYM_E_PARAMETER_MISMATCH --
6 KEYM_E_CERT_INVALID --
10 KEYM_E_KEY_CERT_EMPTY --
Operation Finalize
Comment --
RequestData
Type KeyM_CryptoKeyDataType
Direction IN
Comment Information that comes along with the request, e.g. signature
Variation --
Parameters
RequestDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction OUT
Variation --
ResponseDataLength
Type uint16
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible Errors
KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
Operation Prepare
Comment --
RequestData
Type KeyM_CryptoKeyDataType
Direction IN
Parameters
Comment Information that comes along with the request, e.g. signature
Variation --
RequestDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction OUT
Variation --
ResponseDataLength
Type uint16
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible Errors
KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
Operation Start
StartType
Parameters
Type KeyM_StartType
Direction IN
Variation --
RequestData
Type KeyM_CryptoKeyDataType
Direction IN
Comment Information that comes along with the request, e.g. signature
Variation --
RequestDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction OUT
Variation --
ResponseDataLength
Type uint16
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible Errors
KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
Operation Update
Comment --
Variation --
KeyName
Type KeyM_KeyCertNameDataType
Direction IN
Variation --
KeyNameLength
Type uint16
Parameters
Direction IN
Comment --
Variation --
RequestData
Type KeyM_CryptoKeyDataType
Direction IN
Comment Information that comes along with the request, e.g. signature
Variation --
RequestDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction OUT
Variation --
ResponseDataLength
Type uint16
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
Possible Errors
KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
Operation Verify
The intention is to perform a verification of input data using an assigned crypto job
Comment
with its key.
KeyName
Type KeyM_KeyCertNameDataType
Direction IN
Variation --
KeyNameLength
Type uint16
Direction IN
Comment --
Variation --
Parameters
RequestData
Type KeyM_CryptoKeyDataType
Direction IN
Comment Information that comes along with the request, e.g. signature
Variation --
RequestDataLength
Type uint16
Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction OUT
Variation --
ResponseDataLength
Type uint16
Direction OUT
Comment --
Variation --
E_OK
E_NOT_OK
KEYM_E_BUSY
Possible KEYM_E_PENDING
Errors KEYM_E_KEY_CERT_SIZE_MISMATCH
KEYM_E_PARAMETER_MISMATCH
KEYM_E_CERT_INVALID
KEYM_E_KEY_CERT_EMPTY
⌋()
8.7.3.5 KeyMCryptoKeyNotification
[SWS_KeyM_91005]⌈
Name KeyMCryptoKeyNotification
IsService true
Variation --
Possible Errors -- -- --
Operation CryptoKeyFinalizeCallbackNotification
Notifies the application that a crypto key finalize operation has been finished.
Comment
The callback function is only called and needed if KeyMCryptoKeyStartFinalize
FunctionEnabled is set to TRUE.
Result
Type KeyM_ResultType
Direction IN
Variation --
ResponseDataLength
Type uint16
Parameters Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction IN
Variation --
Possible
--
Errors
Operation CryptoKeyUpdateCallbackNotification
Notifies the application that a crypto key update operation has been finished. This
Comment
function is used by the key manager.
Variation --
Result
Type KeyM_ResultType
Direction IN
Variation --
ResponseDataLength
Type uint16
Parameters Direction IN
Comment --
Variation --
ResponseData
Type KeyM_CryptoKeyDataType
Direction IN
Variation --
Possible
--
Errors
Operation CryptoKeyVerifyCallbackNotification
Notifies the application that a crypto key verify operation has been finished. This
Comment
function is used by the key manager.
Variation --
Result
Type KeyM_ResultType
Direction IN
Variation --
KeyId
Type uint32
Direction IN
Comment The key identifier where this verification was started for.
Parameters Variation --
ResultDataLength
Type uint16
Direction IN
Comment --
Variation --
ResultData
Type KeyM_CryptoKeyDataType
Direction IN
Variation --
Possible
--
Errors
⌋()
8.7.4 Ports
8.7.4.1 KeyM_Certificate_{KeyMCertificate}
[SWS_KeyM_00160]⌈
Name KeyMCertificate_{KeyMCertificate}
Type KeyM_CertificateIdType
Port Defined Argument Value(s)
Value {ecuc(KeyM/KeyMCertificate/KeyMCertificateId)}
⌋(SRS_CryptoStack_00090, SRS_CryptoStack_00091)
8.7.4.2 KeyM_CertificateNotification_{KeyMCertificate}
[SWS_KeyM_00161]⌈
Name KeyMCertificateNotification_{KeyMCertificate}
Type KeyM_CertificateIdType
Port Defined Argument Value(s)
Value {ecuc(KeyM/KeyMCertificate/KeyMCertificateId)}
KeyMCertificateVerifyCallbackNotificationFunc == NULL
Variation
KeyMCertificate = {ecuc(KeyM/KeyMCertificate.SHORT-NAME)}
⌋(SRS_CryptoStack_00090, SRS_CryptoStack_00091)
8.7.4.3 KeyMCertificateElement_{KeyMCertificate}_{KeyMCertificateElement}
[SWS_KeyM_00162]⌈
Name KeyMCertificateElement_{KeyMCertificate}_{KeyMCertificateElement}
KeyMCertificateElement_{KeyMCertificate}_{-
Kind ProvidedPort Interface
KeyMCertificateElement}
Type KeyM_CertificateIdType
Value {ecuc(KeyM/KeyMCertificate/KeyMCertificateId)}
Port Defined
Argument
Value(s) Type KeyM_CertElementIdType
{ecuc(KeyM/KeyMCertificate/KeyMCertificateElement/Key
Value
MCertificateElementId)}
⌋(SRS_CryptoStack_00090, SRS_CryptoStack_00091)
8.7.4.4 KeyMCryptoKey
[SWS_KeyM_00163]⌈
Name KeyMCryptoKey
Variation --
⌋(SRS_CryptoStack_00090, SRS_CryptoStack_00091)
8.7.4.5 KeyMCryptoKeyNotification
[SWS_KeyM_00164]⌈
Name KeyMCryptoKeyNotification
Variation --
⌋(SRS_CryptoStack_00090, SRS_CryptoStack_00091)
9 Sequence diagrams
KeyM_KH_Prepare()
KeyM_Update("SHE", ...)
Csm_KeySetValid(Std_ReturnType, uint32)
KeyM_Start(Std_ReturnType,
KeyM_StartType, const uint8*, uint16,
uint8**, uint16**): int
state = active
KeyM_Update("1", ...)
Csm_KeyElementSet(Std_ReturnType, uint32, uint32, const uint8*, uint32)
KeyM_Update("2",...)
Csm_KeyElementSet(Std_ReturnType, uint32, uint32, const uint8*, uint32)
KeyM_Update("3",...)
Csm_KeyElementSet(Std_ReturnType, uint32, uint32, const uint8*, uint32)
KeyM_Finalize(Std_ReturnType, const
uint8*, uint16, uint8**, uint16*)
Csm_KeySetValid(Std_ReturnType, uint32)
Csm_XXXVerify(KeyMCryptpKeyCsmVerifyJobRef)
KeyM_Prepare(Std_ReturnType, const
uint8*, uint16, uint8**, uint16**)
KeyM_KH_Prepare()
KeyM_Update("Hugo", ...)
Csm_KeySetValid(Std_ReturnType, uint32)
KeyM_CertGetStatus(Std_ReturnType,
KeyM_CertificateIdType,
KeyM_CertificateStatusType**)
status = KEYM_CERTIFICATE_NOT_AVAILABLE
KeyM_SetCertificate(Std_ReturnType,
KeyM_CertificateIdType, const
KeyM_CertDataType*)
Parsing
Verifying
KeyM_CertGetStatus(Std_ReturnType,
KeyM_CertificateIdType,
KeyM_CertificateStatusType**)
status = KEYM_CERTIFICATE_INVALID
KeyM_VerifyCertificate(Std_ReturnType,
KeyM_CertificateIdType)
subject check
The subject field of the certificate in the upper hierarchy matches the issuer field
of the certificate in the lower hierarchy.
StbM_GetCurrentTime(Std_ReturnType, StbM_SynchronizedTimeBaseType,
StbM_TimeStampType**, StbM_UserDataType**)
The current time provided by the time server (i.e. the time provided by STBM)
matches the "not before" and "not after" time period.
opt
E_OK
Csm_KeySetValid(Std_ReturnType, uint32)
KeyM_CertGetStatus(Std_ReturnType,
KeyM_CertificateIdType,
KeyM_CertificateStatusType**)
status = KEYM_CERTIFICATE_VALID
service == KEYM_SERVICE_CERT_SET_ROOT
service == KEYM_SERVICE_CERT_SET_INTERMEDIATE_CERT
service == KEYM_SERVICE_CERT_UPDATE_INTERMEDIATE
Verifying
subject check
The subject field of the certificate in the upper hierarchy matches the
issuer field of the certificate in the lower hierarchy.
StbM_GetCurrentTime(Std_ReturnType, StbM_SynchronizedTimeBaseType,
StbM_TimeStampType**, StbM_UserDataType**)
The current time provided by the time server (i.e. the time provided by STBM)
matches the "not before" and "not after" time period.
Csm_KeySetValid(Std_ReturnType, uint32)
opt
[Verification successful]
alt
[NvM uesd for Key storage]
NvM_WriteBlock(Std_ReturnType, NvM_BlockIdType, const void*)
Csm_KeySetValid(Std_ReturnType, uint32)
10 Configuration specification
Chapter 10.1 specifies the structure (containers) and the parameters of the module
KeyM.
10.1.1 KeyM
Included Containers
Container Name Multiplicity Scope / Dependency
KeyMCertificate 0..65535 This container contains the certificate configuration.
KeyMCertificateElementVerificatio This container defines if and how certificate elements are
0..65535
n to be verified.
This container contains the crypto keys that can be
KeyMCryptoKey 0..65535
updated.
This container holds general configuration (parameters)
KeyMGeneral 1
for key manager.
Configuration of optional usage of Nvm in case the KeyM
KeyMNvmBlock 0..65535 module requires non volatile memory in the Ecu to store
information (e.g. crypto keys or certificates).
AUTOSARParameterDefinition:
EcucDefinitionCollection
+module
KeyM: EcucModuleDef
+container KeyMGeneral:
upperMultiplicity = 1 EcucParamConfContainerDef
lowerMultiplicity = 0
KeyMCertificate:
+container EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 65535
KeyMCertificateElementVerification:
+container EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 65535
KeyMCryptoKey:
+container EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 65535
10.1.2 KeyMGeneral
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Description Enables (TRUE) or disables (FALSE) the call to the key handler update
function KeyM_KH_Update(). If set to true, the corresponding key handler
function shall be provided.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Description Enables (TRUE) or disables (FALSE) the certificate service function of the
key manager. If set to true, the KeyM_ServiceCertificate() function has to
be called accordingly.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
No Included Containers
KeyMDevErrorDetect: EcucBooleanParamDef
KeyMGeneral: +parameter
EcucParamConfContainerDef defaultValue = false
KeyMMainFunctionPeriod: EcucFloatParamDef
+parameter
min = 0
max = INF
KeyMCertificateChainMaxDepth:
+parameter EcucIntegerParamDef
min = 1
max = 255
KeyMKeyCertNameMaxLength:
+parameter EcucIntegerParamDef
min = 1
max = 255
+parameter KeyMCertificateManagerEnabled:
EcucBooleanParamDef
defaultValue = false
+parameter KeyMCryptoKeyManagerEnabled:
EcucBooleanParamDef
defaultValue = false
KeyMCryptoKeyStartFinalizeFunctionEnabled:
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMCryptoKeyPrepareFunctionEnabled:
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMCryptoKeyVerifyFunctionEnabled:
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMCryptoKeyVerifyAsyncMode:
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMServiceCertificateFunctionEnabled:
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter KeyMCryptoKeyHandlerStartFinalizeEnabled:
EcucBooleanParamDef
defaultValue = false
+parameter KeyMCryptoKeyHandlerPrepareEnabled:
EcucBooleanParamDef
defaultValue = false
+parameter KeyMCryptoKeyHandlerUpdateEnabled:
EcucBooleanParamDef
defaultValue = false
+parameter KeyMCryptoKeyHandlerVerifyEnabled:
EcucBooleanParamDef
defaultValue = false
KeyMCryptoKeyHandlerServiceCertificateEnabled:
+parameter EcucBooleanParamDef
defaultValue = false
KeyMNvmBlock:
EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 65535
10.1.3 KeyMCertificate
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
minLength --
regularExpression --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Multiplicity 0..1
Type Reference to [ KeyMNvmBlock ]
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency dependency: Only necessary if KeyMCertificateStorage is set to
KEYM_STORAGE_IN_NVM
Link time --
Post-build time --
Scope / Dependency scope: local
Included Containers
Container Name Multiplicity Scope / Dependency
KeyMCertificateElement 0..65535 This container contains the certificate element configuration.
KeyMCertificateMaxLength: EcucIntegerParamDef
+parameter
min = 1
max = 65535
+parameter KeyMCertificateName:
EcucStringParamDef
KeyMCertificateVerifyCallbackNotificationFunc:
+parameter EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMServiceCertificateCallbackNotificationFunc:
+parameter EcucFunctionNameDef
lowerMultiplicity = 0
upperMultiplicity = 1
+reference
KeyMCertUpperHierarchicalCertRef:
EcucReferenceDef
+destination
+literal
KeyMCertFormatType: X509:
EcucEnumerationParamDef EcucEnumerationLiteralDef
+parameter +literal
CVC:
EcucEnumerationLiteralDef
+literal
CRL:
EcucEnumerationLiteralDef
+literal
KeyMCertAlgorithmType: RSA:
+parameter EcucEnumerationParamDef EcucEnumerationLiteralDef
+literal
ECC:
EcucEnumerationLiteralDef
CsmJob:
EcucParamConfContainerDef
+reference KeyMCertCsmSignatureVerifyJobRef: +destination
EcucReferenceDef lowerMultiplicity = 1
upperMultiplicity = *
requiresSymbolicNameValue = true
(from Csm)
KeyMCertCsmSignatureVerifyKeyRef:
CsmKey:
+reference EcucReferenceDef +destination EcucParamConfContainerDef
requiresSymbolicNameValue = true
lowerMultiplicity = 0
lowerMultiplicity = 0
upperMultiplicity = *
upperMultiplicity = 1
(from Csm)
StbMSynchronizedTimeBase:
KeyMCertTimebaseRef:
+destination EcucParamConfContainerDef
+reference EcucReferenceDef
lowerMultiplicity = 1
requiresSymbolicNameValue = true upperMultiplicity = *
lowerMultiplicity = 1
upperMultiplicity = 1
(from StbMSynchronizedTimeBase)
KeyMCertPrivateKeyStorageCryptoKeyRef: KeyMCryptoKey:
+destination EcucParamConfContainerDef
+reference EcucReferenceDef
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 65535
KeyMCertificateElementRule:
KeyMCertCertificateElementRuleRef: +destination EcucParamConfContainerDef
+reference EcucReferenceDef
lowerMultiplicity = 1
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = 65535
KeyMCertificateElementId: EcucIntegerParamDef
min = 0
+parameter
KeyMCertificateElement: max = 65535
EcucParamConfContainerDef symbolicNameValue = true
lowerMultiplicity = 0
upperMultiplicity = 65535 KeyMCertificateElementObjectId:
+parameter EcucStringParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMCertificateElementOfStructure: +literal
CertificateVersionNumber:
EcucEnumerationParamDef
EcucEnumerationLiteralDef +literal
CertificateSerialNumber:
EcucEnumerationLiteralDef
+literal
CertificateSignatureAlgorithmID:
EcucEnumerationLiteralDef
+literal
CertificateIssuerName:
EcucEnumerationLiteralDef
+literal
CertificateValidityPeriodNotBefore:
EcucEnumerationLiteralDef
+literal
CertificateValidityPeriodNotBefore:
EcucEnumerationLiteralDef
+literal
CertificateValidityPeriodNotAfter:
EcucEnumerationLiteralDef
+literal
CertificateSubjectName:
+parameter
EcucEnumerationLiteralDef
+literal
CertificateSubjectPublicKeyInfo_PublicKeyAlgorithm:
+subContainer
EcucEnumerationLiteralDef
+literal
CertificateSubjectPublicKeyInfo_SubjectPublicKey:
EcucEnumerationLiteralDef
+literal
CertificateIssuerUniqueIdentifier:
EcucEnumerationLiteralDef
+literal
CertificateSubjectUniqueIdentifier:
EcucEnumerationLiteralDef
+literal
CertificateExtension:
EcucEnumerationLiteralDef
+literal
CertificateSignatureAlgorithm:
EcucEnumerationLiteralDef
+literal
CertificateSignature:
EcucEnumerationLiteralDef
KeyMCertificateElementMaxLength:
+parameter EcucIntegerParamDef
min = 1
max = 65535
+parameter KeyMCertificateElementHasIteration:
EcucBooleanParamDef
defaultValue = false
KeyMCertificateElementObjectType:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1
10.1.4 KeyMCertificateElement
Multiplicity 0..1
Type EcucStringParamDef
Default value --
maxLength --
minLength --
regularExpression --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Post-Build
false
Variant Value
Value Pre-compile time X All Variants
Configuration Link time --
Class Post-build time --
Scope / scope: local
Dependency
No Included Containers
10.1.5 KeyMCertificateElementVerification
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration of KeyElement
compare conditions which can be used as arguments for a
KeyMCertificateElementRule.
KeyMCertificateElementConditio
1..* One KeyMCertificateElementCondition shall contain either
n
one KeyMCertificateElementSwcCallback or one
KeyMCertificateElementSwcSRDataElementRef or one
KeyMCertificateElementSwcSRDataElementValueRef.
This container contains the configuration of a mode rule
which represents a logical expression with
KeyMCertificateElementCondition or other
KeyMCertificateElementRule 1..* KeyMCertificateElementRule as arguments.
All arguments are processed with the operator defined by
KeyMLogicalOperator, for instance: Argument_A AND
Argument_B AND Argument_C.
+literal
KEYM_LESS_THAN:
+subContainer
EcucEnumerationLiteralDef
KeyMCertificateElementRef: KeyMCertificateElement:
+reference EcucReferenceDef +destination EcucParamConfContainerDef
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 65535
+destination
KeyMCertificateElementRef:
EcucReferenceDef
KeyMCertificateElementConditionCerificateElement:
+subContainer +reference
EcucParamConfContainerDef lowerMultiplicity = 1
upperMultiplicity = 1
+subContainer KeyMCertificateElementRule: lowerMultiplicity = 0
EcucParamConfContainerDef upperMultiplicity = 1
lowerMultiplicity = 1
upperMultiplicity = *
KeyMCertificateElementConditionArray: KeyMCertificateElementConditionArrayElement: KeyMCertificateElementConditionArrayElementIndex:
EcucParamConfContainerDef EcucParamConfContainerDef +parameter EcucIntegerParamDef
lowerMultiplicity = 0 lowerMultiplicity = 0 min = 0
upperMultiplicity = 1 upperMultiplicity = * max = 65535
+subContainer +subContainer
KeyMCertificateElementConditionArrayElementValue:
+parameter EcucIntegerParamDef
min = 0
max = 18446744073709551615
KeyMCertificateElementConditionSenderReceiver:
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1
+reference
KeyMCertificateElementConditionSenderReceiver: EcucInstanceReferenceDef
10.1.6 KeyMCertificateElementRule
No Included Containers
+literal
KEYM_LESS_THAN:
+subContainer
EcucEnumerationLiteralDef
KeyMCertificateElementRef: KeyMCertificateElement:
+reference EcucReferenceDef +destination EcucParamConfContainerDef
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 65535
+destination
KeyMCertificateElementRef:
EcucReferenceDef
KeyMCertificateElementConditionCerificateElement:
+subContainer +reference
EcucParamConfContainerDef lowerMultiplicity = 1
upperMultiplicity = 1
+subContainer KeyMCertificateElementRule: lowerMultiplicity = 0
EcucParamConfContainerDef upperMultiplicity = 1
lowerMultiplicity = 1
upperMultiplicity = *
KeyMCertificateElementConditionArray: KeyMCertificateElementConditionArrayElement: KeyMCertificateElementConditionArrayElementIndex:
EcucParamConfContainerDef EcucParamConfContainerDef +parameter EcucIntegerParamDef
lowerMultiplicity = 0 lowerMultiplicity = 0 min = 0
upperMultiplicity = 1 upperMultiplicity = * max = 65535
+subContainer +subContainer
KeyMCertificateElementConditionArrayElementValue:
+parameter EcucIntegerParamDef
min = 0
max = 18446744073709551615
KeyMCertificateElementConditionSenderReceiver:
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1
+reference
KeyMCertificateElementConditionSenderReceiver: EcucInstanceReferenceDef
10.1.7 KeyMCertificateElementCondition
Configuration Parameters
Included Containers
Container Name Multiplicity Scope / Dependency
KeyMCertificateElementConditionValu This container contains the configuration of a
1
e compare value.
10.1.8 KeyMCertificateElementConditionPrimitive
No Included Containers
10.1.9 KeyMCertificateElementConditionArray
Included Containers
Container Name Multiplicity Scope / Dependency
KeyMCertificateElementConditionArrayElemen This container contains the configuration of a
0..*
t array compare value.
10.1.10 KeyMCertificateElementConditionArrayElement
Post-build time --
Scope / Dependency scope: local
No Included Containers
10.1.11 KeyMCertificateElementConditionCerificateElement
No Included Containers
10.1.12 KeyMCertificateElementConditionValue
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration
KeyMCertificateElementConditionArray 0..1
of a array compare value.
This container contains the configuration
KeyMCertificateElementConditionCerificateElemen
0..1 of a certificate element as a compare
t
value.
This container contains the configuration
KeyMCertificateElementConditionPrimitive 0..1
of a primitive compare value.
This container contains the configuration
KeyMCertificateElementConditionSenderReceiver 0..1 of a dynamic compare value in a sender-
/receiver interface.
10.1.13 KeyMCertificateElementConditionSenderReceiver
No Included Containers
10.1.14 KeyMCryptoKey
Container
Description Specifies what type of function for key verification operation is used.
Multiplicity 0..1
Type EcucEnumerationParamDef
Range KEYM_VERIFY_AEADDECRYPT --
KEYM_VERIFY_AEADENCRYPT --
KEYM_VERIFY_DECRYPT --
KEYM_VERIFY_ENCRYPT --
KEYM_VERIFY_MACGENERATE --
KEYM_VERIFY_MACVERIFY --
Post-Build
false
Variant Value
Value Pre-compile time X All Variants
Configuration Link time --
Class Post-build time --
Scope / scope: local
Dependency dependency: This parameter is only needed if
KeymGeneral/KeyMCryptoKey/KeyMCryptoKeyVerifyFunctionEnabled is set to TRUE.
regularExpression --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
No Included Containers
KeyMCryptoKeyMaxLength: EcucIntegerParamDef
+parameter
min = 1
max = 4294967295
KeyMCryptoKeyGenerationType: +literal
KEYM_STORED_KEY:
EcucEnumerationParamDef
+parameter EcucEnumerationLiteralDef
+literal
KEYM_DERIVED_KEY:
EcucEnumerationLiteralDef
+parameter KeyMCryptoKeyName:
EcucStringParamDef
+literal
KeyMCryptoKeyStorage: KEYM_STORAGE_IN_CSM:
EcucEnumerationParamDef EcucEnumerationLiteralDef
+parameter +literal
KEYM_STORAGE_IN_NVM:
EcucEnumerationLiteralDef
+literal
KEYM_STORAGE_IN_RAM:
EcucEnumerationLiteralDef
KeyMCryptoKeyCsmKeySourceDeriveRef: CsmKey:
+reference EcucReferenceDef +destination EcucParamConfContainerDef
requiresSymbolicNameValue = true lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = 1
KeyMCryptoKeyCsmKeyTargetRef:
+reference EcucReferenceDef +destination
lowerMultiplicity = 1
upperMultiplicity = 1
requiresSymbolicNameValue = true
(from Csm)
CsmJob:
KeyMCryptoKeyCsmVerifyJobRef: EcucParamConfContainerDef
+reference EcucReferenceDef +destination
lowerMultiplicity = 1
lowerMultiplicity = 0
upperMultiplicity = *
upperMultiplicity = 1
requiresSymbolicNameValue = true
(from Csm)
KeyMCryptoCsmVerifyJobType: +literal
KEYM_VERIFY_MACGENERATE:
EcucEnumerationParamDef
EcucEnumerationLiteralDef
lowerMultiplicity = 0
upperMultiplicity = 1 +literal
KEYM_VERIFY_MACVERIFY:
EcucEnumerationLiteralDef
+literal
KEYM_VERIFY_ENCRYPT:
+parameter EcucEnumerationLiteralDef
+literal
KEYM_VERIFY_DECRYPT:
EcucEnumerationLiteralDef
+literal
KEYM_VERIFY_AEADENCRYPT:
EcucEnumerationLiteralDef
+literal
KEYM_VERIFY_AEADDECRYPT:
EcucEnumerationLiteralDef
KeyMCryptoKeyGenerationInfo:
+parameter EcucStringParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMCryptoKeyCryptoProps:
+parameter EcucStringParamDef
lowerMultiplicity = 0
upperMultiplicity = 1
KeyMNvmBlock: KeyMNvmBlockDescriptorRef:
EcucParamConfContainerDef NvMBlockDescriptor:
+reference EcucReferenceDef +destination EcucParamConfContainerDef
+subContainer lowerMultiplicity = 0 requiresSymbolicNameValue = true
upperMultiplicity = 1 upperMultiplicity = 65536
lowerMultiplicity = 0
lowerMultiplicity = 1
upperMultiplicity = 1
(from Nvm)
10.1.15 KeyMNvmBlock
No Included Containers
KeyM: EcucModuleDef
upperMultiplicity = 1
lowerMultiplicity = 0
+container
(from Nvm)
KeyMNvmBlockWriteDelayed:
EcucIntegerParamDef
+parameter
min = 0
max = 65535
lowerMultiplicity = 1
upperMultiplicity = 1