Crypto Requirements#

Crypto Requirements
status: draft
security: YES
safety: ASIL_B
tags: crypto
version: 1

Hash Functionality#

The requirements in this section specify the current cryptographic hash API. They describe QM functionality and do not constitute an ISO 26262 qualification claim for the complete client, IPC, daemon, and provider execution path. Feature-level requirements and their derived_from links remain owned by the S-CORE feature repository and will be linked when the cross-repository migration tracked by issue #125 is integrated. These component requirements cover only the implementation in inc_security_crypto.

Provide migration-target hash algorithms
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

The Crypto component shall provide SHA-256, SHA-384, and SHA-512 hash operations through the canonical algorithm identifiers SHA256, SHA384, and SHA512 respectively.

Provide streaming hash operation
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

The Crypto component shall support incremental hashing through the ordered Init(), zero or more Update(), and Finalize() operations.

Provide single-shot hash operation
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

The Crypto component shall support hashing an input buffer through SingleShot() and shall produce the same digest as the corresponding streaming operation.

Report hash digest size
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Interface
version: 1
satisfied by: comp__crypto

The Crypto component shall report digest sizes of 32, 48, and 64 bytes for SHA256, SHA384, and SHA512 respectively.

Reject undersized hash output buffers
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Interface
version: 1
satisfied by: comp__crypto

The Crypto component shall reject a hash operation when the caller-provided output buffer is smaller than the digest size of the configured algorithm. For a streaming operation, this validation error shall not consume the active digest state, allowing Finalize() to be retried with a sufficient output buffer.

Reject unsupported hash algorithms
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

The Crypto component shall report an unsupported-algorithm error when a hash algorithm cannot be resolved by the selected provider and shall not substitute a digest size or another algorithm.

Maintain provider-equivalent hash results
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

For a migration-target algorithm supported by both providers, the OpenSSL and PKCS#11 providers shall produce identical digests for identical input bytes.

Reset reusable hash contexts
status: valid
security: YES
safety: QM
tags: crypto
reqtype: Functional
version: 1
satisfied by: comp__crypto

The Crypto component shall allow an initialized or completed hash context to be reset to the idle state without changing its algorithm or provider binding.