50std::pair<EC_Group, EC_AffinePoint> ecc_pubkey_from_tss2_public(
const TPM2B_PUBLIC* public_blob);
70 static std::unique_ptr<PublicKey> load_persistent(
const std::shared_ptr<Context>& ctx,
85 static std::unique_ptr<PublicKey> load_transient(
const std::shared_ptr<Context>& ctx,
86 std::span<const uint8_t> public_blob,
91 throw Not_Implemented(
"Cannot generate a new TPM-based keypair from this asymmetric key");
97 std::vector<uint8_t> raw_public_key_bits()
const override;
149 static std::unique_ptr<PrivateKey> load_persistent(
const std::shared_ptr<Context>& ctx,
151 std::span<const uint8_t> auth_value,
169 static std::unique_ptr<PrivateKey> load_transient(
const std::shared_ptr<Context>& ctx,
170 std::span<const uint8_t> auth_value,
172 std::span<const uint8_t> public_blob,
173 std::span<const uint8_t> private_blob,
197 static std::unique_ptr<PrivateKey> create_transient_from_template(
const std::shared_ptr<Context>& ctx,
200 const TPMT_PUBLIC& key_template,
201 const TPM2B_SENSITIVE_CREATE& sensitive_data);
206 throw Not_Implemented(
"cannot export private key bits from a TPM2 key, maybe use raw_private_key_bits()?");
218 std::vector<uint8_t> raw_public_key_bits()
const override;
226 bool is_parent()
const;
230 m_handle(std::move(handle)),
231 m_sessions(std::move(sessions)),
232 m_private_blob(private_blob.begin(), private_blob.end()) {}
234 static std::unique_ptr<PrivateKey> create(Object handles,
235 const SessionBundle& sessions,
236 const TPM2B_PUBLIC* public_info,
237 std::span<const uint8_t> private_blob);
241 SessionBundle m_sessions;
245 std::vector<uint8_t> m_private_blob;
uint32_t ESYS_TR
Forward declaration of TSS2 type for convenience.
uint32_t TPM2_HANDLE
Forward declaration of TSS2 type for convenience.