SNIP_CLASSIC_CRYPTO_SECTION_8_3_4_7_2_Crypto_KeyExchangeCalcSecret
Wortlaut
8.3.4.7.2 Crypto_KeyExchangeCalcSecret
[SWS_Crypto_91010] Definition of API function Crypto_KeyExchangeCalcSecret
⌈
Service Name
Crypto_KeyExchangeCalcSecret
Syntax
Std_ReturnType Crypto_KeyExchangeCalcSecret (
uint32 cryptoKeyId,
const uint8* partnerPublicValuePtr,
uint32 partnerPublicValueLength
)
Service ID [hex]
0x0a
Sync/Async
Synchronous
Reentrancy
Reentrant but not for the same cryptoKeyId
cryptoKeyId
Holds the identifier of the key which shall be used for the key
exchange protocol.
partnerPublicValuePtr
Holds the pointer to the memory location which contains the
partner’s public value.
Parameters (in)
partnerPublicValueLength
Contains the length of the partner’s public value in bytes.
Parameters (inout)
None
Parameters (out)
None
Return value
Std_ReturnType
E_OK: Request successful
E_NOT_OK: Request failed
CRYPTO_E_BUSY: Request failed, Crypto Driver Object is busy
CRYPTO_E_KEY_EMPTY: Request failed because of uninitialized
source key element
CRYPTO_E_KEY_NOT_VALID: Request failed, the key state of
the key identified by cryIfKeyId is "invalid".
Description
Calculates the shared secret key for the key exchange with the key material of the key identified
by the cryptoKeyId and the partner public key. The shared secret key is stored as a key element
in the same key.
Available via
Crypto.h
⌋
[SWS_Crypto_00111] Report uninitialized module error
Upstream requirements: SRS_BSW_00369, SRS_BSW_00386
⌈If the module is not yet initialized and if development error detection for the Crypto
Driver is enabled, the function Crypto_KeyExchangeCalcSecret shall report
CRYPTO_E_UNINIT to the DET and return E_NOT_OK.⌋
[SWS_Crypto_00112] Report cryptoKeyId out of range error
Upstream requirements: SRS_BSW_00369, SRS_BSW_00386
⌈If the parameter cryptoKeyId is out of range and if development error detection for
the Crypto Driver is enabled, the function Crypto_KeyExchangeCalcSecret shall
report CRYPTO_E_PARAM_HANDLE to the DET and return E_NOT_OK⌋
[SWS_Crypto_00113] Report partnerPublicValuePtr null pointer error
Upstream requirements: SRS_BSW_00369, SRS_BSW_00386
⌈If the parameter partnerPublicValuePtr is a null pointer and if development error detection for the Crypto Driver is enabled, the function Crypto_KeyExchangeCalcSecret shall report CRYPTO_E_PARAM_POINTER to the DET and return E_NOT_
OK.⌋
[SWS_Crypto_00115] Report partnerPublicValueLength zero length error
Upstream requirements: SRS_BSW_00369, SRS_BSW_00386
⌈If partnerPublicValueLength is zero and if development error detection for the Crypto
Driver is enabled, the function Crypto_KeyExchangeCalcSecret shall report
CRYPTO_E_PARAM_VALUE to the DET and return E_NOT_OK.⌋
If no errors are detected by Crypto, the service Crypto_KeyExchangeCalcSecret
calculated the shared secret key for the key exchange and store it as key element in
cryptoKeyId.
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CryptoDriver.pdf |
|---|---|
| Dokumentseite | Seite 84 |
| Ziel-Modul | crypto (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |