Commit Graph

4 Commits

Author SHA1 Message Date
Stefan Berger
2a883017d6 tpm2: Remove unused function parameters or mark them as unused
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-09-24 09:32:02 -04:00
Stefan Berger
c1f7bf5509 tpm2: Activate SEED_COMPAT_LEVEL_RSA_PRIME_ADJUST_FIX
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-04-14 16:03:45 -04:00
Stefan Berger
b0ca810347 tpm2: Introduce SEED_COMPAT_LEVEL_RSA_PRIME_ADJUST_FIX but do not use yet
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-04-14 16:03:45 -04:00
Stefan Berger
eabcd048c4 tpm2: Add SEED_COMPAT_LEVEL to seeds in PERSISTENT_DATA
Add a variable seedCompatLevel to the each seed in the PERSISTENT_DATA
that allows us to track the age of the seed. Whenever a new seed
is created the seedCompatLevel is also written and set to the latest
version. This seedCompatLevel then influences the crypto algorithm that
can be used for deriving keys so that previously derived keys
are now still generated in the same way. When the seed is changed
the old keys are all useless and newly derived keys can then use
the new algorithm.

This patch only sets the variables to the current compatibility
level SEED_COMPAT_LEVEL_ORIGINAL and writes it out as part of the state
file. This makes the state file not downgradeable.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-04-14 16:03:45 -04:00