Skip to content

TPM code is using trivially breakable session cryptography #57

Description

@jejb

The security in TPM session cryptography depends on starting the session with a shared initial value that the attacker can't guess. This can be done either by binding (using the authority value of a TPM object the user knows, effectively a shared secret) or salting (encrypting an initial value to a TPM public key so the attacker can't observe it) or both. This code does neither here (in tss.rs):

    let maybe_auth_session = tpm_ctx
        .start_auth_session(
            None, // should be salt key for session encryption
            None, // should be bind key for shared secret
            None,
            SessionType::Hmac,
            SymmetricDefinition::AES_128_CFB,
            HashingAlgorithm::Sha256,
        )

So the initial value for session key derivation ends up as zero and any attacker would know it and could trivially derive the HMAC and encryption keys simply by observing the TPM transactions on the bus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions