mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-14 22:06:46 +00:00
This commit introduces the Initdata Spec and the logic for calculating its digest. It includes: (1) Define a `ProtectedPlatform` enum to represent major TEE platform types. (2) Create an `InitData` struct to support building and serializing initialization data in TOML format. (3) Implement adaptation for SHA-256, SHA-384, and SHA-512 digest algorithms. (4) Provide a platform-specific mechanism for adjusting digest lengths (zero-padding). (5) Supporting the decoding and verification of base64+gzip encoded Initdata. The core functionality ensures the integrity of data injected by the host through trusted algorithms, while also accommodating the measurement requirements of different TEE platforms. Signed-off-by: alex.lyn <alex.lyn@antgroup.com>