Lines Matching refs:SHA1_DIGEST_SIZE

127 	unsigned char paramdigest[SHA1_DIGEST_SIZE];  in TSS_authhmac()
163 ret = TSS_rawhmac(digest, key, keylen, SHA1_DIGEST_SIZE, in TSS_authhmac()
187 unsigned char testhmac[SHA1_DIGEST_SIZE]; in TSS_checkhmac1()
188 unsigned char paramdigest[SHA1_DIGEST_SIZE]; in TSS_checkhmac1()
203 authdata = buffer + bufsize - SHA1_DIGEST_SIZE; in TSS_checkhmac1()
239 ret = TSS_rawhmac(testhmac, key, keylen, SHA1_DIGEST_SIZE, paramdigest, in TSS_checkhmac1()
245 if (memcmp(testhmac, authdata, SHA1_DIGEST_SIZE)) in TSS_checkhmac1()
273 unsigned char testhmac1[SHA1_DIGEST_SIZE]; in TSS_checkhmac2()
274 unsigned char testhmac2[SHA1_DIGEST_SIZE]; in TSS_checkhmac2()
275 unsigned char paramdigest[SHA1_DIGEST_SIZE]; in TSS_checkhmac2()
291 authdata1 = buffer + bufsize - (SHA1_DIGEST_SIZE + 1 in TSS_checkhmac2()
292 + SHA1_DIGEST_SIZE + SHA1_DIGEST_SIZE); in TSS_checkhmac2()
293 authdata2 = buffer + bufsize - (SHA1_DIGEST_SIZE); in TSS_checkhmac2()
332 ret = TSS_rawhmac(testhmac1, key1, keylen1, SHA1_DIGEST_SIZE, in TSS_checkhmac2()
337 if (memcmp(testhmac1, authdata1, SHA1_DIGEST_SIZE)) { in TSS_checkhmac2()
341 ret = TSS_rawhmac(testhmac2, key2, keylen2, SHA1_DIGEST_SIZE, in TSS_checkhmac2()
346 if (memcmp(testhmac2, authdata2, SHA1_DIGEST_SIZE)) in TSS_checkhmac2()
379 unsigned char hash[SHA1_DIGEST_SIZE]; in pcrlock()
384 ret = tpm_get_random(TPM_ANY_NUM, hash, SHA1_DIGEST_SIZE); in pcrlock()
385 if (ret != SHA1_DIGEST_SIZE) in pcrlock()
421 return TSS_rawhmac(s->secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, in osap()
447 unsigned char encauth[SHA1_DIGEST_SIZE];
448 unsigned char pubauth[SHA1_DIGEST_SIZE];
449 unsigned char xorwork[SHA1_DIGEST_SIZE * 2];
450 unsigned char xorhash[SHA1_DIGEST_SIZE];
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()
504 for (i = 0; i < SHA1_DIGEST_SIZE; ++i) in tpm_seal()
510 ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE, in tpm_seal()
512 sizeof(uint32_t), &ordinal, SHA1_DIGEST_SIZE, in tpm_seal()
518 ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE, in tpm_seal()
520 sizeof(uint32_t), &ordinal, SHA1_DIGEST_SIZE, in tpm_seal()
534 storebytes(tb, td->encauth, SHA1_DIGEST_SIZE); in tpm_seal()
542 storebytes(tb, td->pubauth, SHA1_DIGEST_SIZE); in tpm_seal()
557 SHA1_DIGEST_SIZE, storedsize, TPM_DATA_OFFSET, 0, in tpm_seal()
582 unsigned char authdata1[SHA1_DIGEST_SIZE]; in tpm_unseal()
583 unsigned char authdata2[SHA1_DIGEST_SIZE]; in tpm_unseal()
631 storebytes(tb, authdata1, SHA1_DIGEST_SIZE); in tpm_unseal()
635 storebytes(tb, authdata2, SHA1_DIGEST_SIZE); in tpm_unseal()
645 keyauth, SHA1_DIGEST_SIZE, in tpm_unseal()
646 blobauth, SHA1_DIGEST_SIZE, in tpm_unseal()
763 if (strlen(args[0].from) != 2 * SHA1_DIGEST_SIZE) in getoptions()
766 SHA1_DIGEST_SIZE); in getoptions()
771 if (strlen(args[0].from) != 2 * SHA1_DIGEST_SIZE) in getoptions()
774 SHA1_DIGEST_SIZE); in getoptions()