Skip to main content

SecurityLocalDeriveConcatKdf

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Description

Derive a key using the Concatenation KDF (NIST SP 800-56A). This is the Concatenation Key Derivation Function as defined in section 5.8.1 of NIST SP 800-56A Rev. 1. It is the same as the One-step Key Derivation as defined in section 5.8.2.1 of NIST SP 800-56A Rev. 3 with the Concatenation Format for FixedInfo (section 5.8.2.1.1), if the one-step key-derivation method specified in SP 800-56C is used with H = hash. Note that it is upon the user to ensure that the provided label satisfies the requirements from NIST SP 800-56A.

Parameters

  • dword hashAlgorithm
    ID of the hash algorithm to use.
    Available hash algorithm:
    • SHA-256 = 1
    • SHA-384 = 2
    • SHA-512 = 3
    • SHA-224 = 4
    • SM3 = 5
  • byte secret[]
    The secret to derive the key from.
  • dword secretLength
    The length of the secret.
  • byte label[]
    A string identifying the purpose of the derived key (also called OtherInfo or FixedInfo).
  • dword labelLength
    The length of the label.
  • dword keyLength
    The length of the key to derive.
  • byte outputKey[] [OUT]
    Output buffer for the derived key.

Return Values

  • 1
    Success. A value of 1 means that the action was successful.
  • <= 0
    Error. A value less than or equal to 0 means error.

Example

SecurityLocalSignRsaSecurityLocalEncryptRsaSecurityLocalVerifyRsa