[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 19/58] qom: implement property helper for sha384
From: |
Isaku Yamahata |
Subject: |
Re: [PATCH v2 19/58] qom: implement property helper for sha384 |
Date: |
Mon, 21 Aug 2023 16:28:52 -0700 |
On Mon, Aug 21, 2023 at 10:25:35AM +0100,
"Daniel P. Berrangé" <berrange@redhat.com> wrote:
> On Fri, Aug 18, 2023 at 05:50:02AM -0400, Xiaoyao Li wrote:
> > From: Isaku Yamahata <isaku.yamahata@intel.com>
> >
> > Implement property_add_sha384() which converts hex string <-> uint8_t[48]
> > It will be used for TDX which uses sha384 for measurement.
>
> I think it is likely a better idea to use base64 for the encoding
> the binary hash - we use base64 for all the sev-guest properties
> that were binary data.
>
> At which points the property set/get logic is much simpler as it
> is just needing a call to g_base64_encode / g_base64_decode and
> length validation for the decode case.
Hex string is poplar to show hash value, isn't it? Anyway it's easy for human
operator, shell scripts, libvirt or whatever to convert those representations
with utility commands like base64 or xxd, or library call. Either way would
work.
--
Isaku Yamahata <isaku.yamahata@linux.intel.com>
- [PATCH v2 16/58] i386/tdx: Make sept_ve_disable set by default, (continued)
[PATCH v2 19/58] qom: implement property helper for sha384, Xiaoyao Li, 2023/08/18
[PATCH v2 20/58] i386/tdx: Allows mrconfigid/mrowner/mrownerconfig for TDX_INIT_VM, Xiaoyao Li, 2023/08/18
[PATCH v2 21/58] i386/tdx: Implement user specified tsc frequency, Xiaoyao Li, 2023/08/18
[PATCH v2 25/58] kvm/tdx: Don't complain when converting vMMIO region to shared, Xiaoyao Li, 2023/08/18
[PATCH v2 28/58] i386/tdx: Parse TDVF metadata for TDX VM, Xiaoyao Li, 2023/08/18
[PATCH v2 26/58] kvm/tdx: Ignore memory conversion to shared of unassigned region, Xiaoyao Li, 2023/08/18
[PATCH v2 27/58] i386/tdvf: Introduce function to parse TDVF metadata, Xiaoyao Li, 2023/08/18