CLASSIC
Modul: csm
Rolle: heuristic
Konfidenz: 70%
SNIP_CLASSIC_CSM_SECTION_8_3_8_5_Key_Generation_Interface
Wortlaut
8.3.8.5 Key Generation Interface
The key generation interface is used to generate a key into the key element CRYPTO_
KE_KEYGENERATE_KEY according to the algorithm defined in the key element
CRYPTO_KE_KEYGENERATE_ALGORITHM.
The key will be generated from the random value that is located in the key element
CRYPTO_KE_KEYGENERATE_SEED.
The random value can be generated, for example, with the function Csm_RandomGenerate and must be stored in CRYPTO_KE_KEYGENERATE_SEED before the key
generation is triggered.
It is important to check the quality of the randomness and its entropy of the seed, which
depends on the used hardware, and software of a stack. The randomness has a major
impact on the quality of the generated key material.
The key element with the id=CRYPTO_KE_KEYGENERATE_ALGORITHM contains a type
from Crypto_AlgorithmFamilyType, e.g.
CRYPTO_ALGOFAM_AES, CRYPTO_ALGOFAM_RSA or CRYPTO_ALGOFAM_ED25519, that allows to generate an adequate
key.
As a counter example, the algorithm family type CRYPTO_ALGOFAM_SHA2_256 is not
adequate because it provides no hint what key shall be generated.
For the key element CRYPTO_KE_KEYGENERATE_KEY the key element configuration
item CryptoKeyElement/CryptoKeyElementFormat indicates the format of the
generated key.
[SWS_Csm_01051] Definition of API function Csm_RandomSeed ⌈
Service Name
Csm_RandomSeed
Syntax
Std_ReturnType Csm_RandomSeed (
uint32 keyId,
const uint8* seedPtr,
uint32 seedLength
)
Service ID [hex]
0x69
Sync/Async
Synchronous
Reentrancy
Reentrant but not for same keyId
keyId
Holds the identifier of the key for which a new seed shall be
generated.
seedPtr
Holds a pointer to the memory location which contains the data to
feed the seed.
Parameters (in)
seedLength
Contains the length of the seed 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_NOT_VALID: Request failed, the key’s state is
"invalid"
CRYPTO_E_KEY_EMPTY: Request failed because of uninitialized
source key element
Description
Feeds the key element CRYPTO_KE_RANDOM_SEED with a random seed.
Available via
Csm.h
⌋
[SWS_Csm_01052]
Upstream requirements: SRS_CryptoStack_00019
⌈If no errors are detected by Csm, the service Csm_RandomSeed shall call CryIf_
RandomSeed.⌋
[SWS_Csm_00955] Definition of API function Csm_KeyGenerate
Upstream requirements: SRS_CryptoStack_00026, SRS_CryptoStack_00027
⌈
Service Name
Csm_KeyGenerate
Syntax
Std_ReturnType Csm_KeyGenerate (
uint32 keyId
)
Service ID [hex]
0x6a
Sync/Async
Synchronous
Reentrancy
Reentrant but not for same keyId
Parameters (in)
keyId
Holds the identifier of the key for which a new material shall be
generated.
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_NOT_VALID: Request failed, the key’s state is
"invalid"
CRYPTO_E_KEY_EMPTY: Request failed because of uninitialized
source key element
Description
Generates new key material and store it in the key identified by keyId.
Available via
Csm.h
⌋
[SWS_Csm_01005] ⌈If no errors are detected by Csm, the service Csm_KeyGenerate shall call CryIf_KeyGenerate.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Algorithm family values used for key generation
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CryptoServiceManager.pdf |
|---|---|
| Dokumentseite | Seite 67 |
| Ziel-Modul | csm (classic) |
| Ziel-Anforderung | TPS_SYST_05025 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.70 |