Commit Graph

4 Commits

Author SHA1 Message Date
Stefan Berger
1375b8a53b tpm2: Use MUST_BE in BackwardsCompatibilityObject.c
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-01-10 16:28:09 -05:00
Stefan Berger
d0501e06d8 rev180: Replace bn_primt_t with ci_prime_t
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-01-03 20:23:19 -05:00
Stefan Berger
8f284d3594 tpm2: Add define for static_assert in case it doesn't exist in assert.h
Some older systems do not define static_assert, so we have to provide
our own static_assert that does 'nothing'.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-02-22 12:10:54 -05:00
Stefan Berger
1e1648fec3 tpm2: Save key and hash contexts using ANY_OBJECT_Marshal
Save key and hash contexts using the ANY_OBJECT_Marshal function and try
to load it using ANY_OBJECT_Unmarshal(). Unfortunately older contexts were
written out as plain OBJECTs, so we have to accomodate this case as well
so that we can restore key contexts from libtpms-0.7.x. We do not support
resuming HASH contexts from libtpms-0.7.x.

Before this modification context files written out by the IBM TSS stack
were 2692 bytes independent of content. Now an RSA 2048 key is 1222 bytes
and a NIST p384 key is 982 bytes.

Several of the original TPM 2 function exporting Sequence state and
importing it can now be disabled.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-02-20 15:08:46 -05:00