[Python] How should I quote using tpm2-pytss?

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to create a quote on my server for remote attestation. I don't want to sign it, but pytss doesn't give me that choice. Thus, after creating a storage root key, I'm trying to create an application key so I can sign the quote with it, and use that key for encryption and decryption as well later on. The issue is that the quote function crashes the server with the error: "unsupported or incompatible scheme" and I have no idea how to fix it, I've tried many different keys or schemes but nothing works.

    ESAPIObject = tpm2_pytss.ESAPI()

    in_sensitive = TPM2B_SENSITIVE_CREATE(
    sensitive=TPMS_SENSITIVE_CREATE(
    userAuth=TPM2B_AUTH(),
    data=TPM2B_SENSITIVE_DATA()
    ))

    SRK = ESAPIObject.create_primary(in_sensitive)
    CreatedAppKey = ESAPIObject.create(SRK[0], in_sensitive)
    LoadedAppKey = ESAPIObject.load(SRK[0], CreatedAppKey[0], CreatedAppKey[1])
    Quote = ESAPIObject.quote(LoadedAppKey, "sha256:0,1,2,3,4,5,6,7", TPM2B_DATA(b""))

    Continue reading...

Compartilhe esta Página