Commit Graph

2 Commits

Author SHA1 Message Date
Dhanuka Warusadura
ebb18f7885 TPM2: Fix primary key generation in decrypting
These changes fix TPM2 primary key generation in decrypting
when there is no primary key is present.

Also, fixes a memory issue.
2021-08-12 20:24:40 +05:30
Dhanuka Warusadura
63907d907e Add TPM2 API and its implementations to egg
These changes define the TPM2 API and add its implementations
to the incubation area (egg/).

Summary of the public API:
`egg_tpm2_initialize`: Start a TPM context.
`egg_tpm2_finalize`: End a TPM context.
`egg_tpm2_generate_master_password`: Generate and returns an
encrypted master password in `GBytes` format. TSS Marshaling,
GVariant serialization is used.
`egg_tpm2_decrypt_master_password`: Decrypts a master password
generated from `egg_tpm2_generate_master_password`. TSS
Unmarshaling, GVariant deserialization is used.

TPM2 API: TSS Enhanced System API (ESAPI)

Proposal: [extend file backend to use TPM2 derived encryption keys](https://gitlab.gnome.org/Teams/Engagement/gsoc-2021/-/issues/13)

Related MRs: [#86](https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/86)

Related Issues: [#63](https://gitlab.gnome.org/GNOME/libsecret/-/issues/63)
2021-08-04 14:42:55 +05:30