Lines Matching refs:td
466 struct tpm_digests *td; in tpm_seal() local
478 td = kmalloc(sizeof *td, GFP_KERNEL); in tpm_seal()
479 if (!td) in tpm_seal()
489 memcpy(td->xorwork, sess.secret, SHA1_DIGEST_SIZE); in tpm_seal()
490 memcpy(td->xorwork + SHA1_DIGEST_SIZE, sess.enonce, SHA1_DIGEST_SIZE); in tpm_seal()
491 ret = TSS_sha1(td->xorwork, SHA1_DIGEST_SIZE * 2, td->xorhash); in tpm_seal()
495 ret = tpm_get_random(TPM_ANY_NUM, td->nonceodd, TPM_NONCE_SIZE); in tpm_seal()
505 td->encauth[i] = td->xorhash[i] ^ blobauth[i]; in tpm_seal()
510 ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE, in tpm_seal()
511 sess.enonce, td->nonceodd, cont, in tpm_seal()
513 td->encauth, sizeof(uint32_t), &pcrsize, in tpm_seal()
518 ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE, in tpm_seal()
519 sess.enonce, td->nonceodd, cont, in tpm_seal()
521 td->encauth, sizeof(uint32_t), &pcrsize, in tpm_seal()
534 storebytes(tb, td->encauth, SHA1_DIGEST_SIZE); in tpm_seal()
540 storebytes(tb, td->nonceodd, TPM_NONCE_SIZE); in tpm_seal()
542 storebytes(tb, td->pubauth, SHA1_DIGEST_SIZE); in tpm_seal()
556 ret = TSS_checkhmac1(tb->data, ordinal, td->nonceodd, sess.secret, in tpm_seal()
566 kfree(td); in tpm_seal()