text stringlengths 0 834k |
|---|
echo ""NV Certify %%H %%A %%~S"" |
%TPM_EXE_PATH%nvcertify -ha 01000000 -pwdn nnn -hk !K! -pwdk sig -halg %%H -sz 16 %%~S -os sig.bin -oa tmp.bin -salg %%A > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Verify the %%A signature %%H"" |
%TPM_EXE_PATH%verifysignature -hk !K! -halg %%H -if tmp.bin -is sig.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Set command audit digest ${HALG}"" |
%TPM_EXE_PATH%setcommandcodeauditstatus -hi p -halg null -clr 00000144 > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Get command audit digest %%H %%A %%~S"" |
%TPM_EXE_PATH%getcommandauditdigest -hk !K! -halg %%H %%~S -pwdk sig -os sig.bin -oa tmp.bin -qd policies/aaa -salg %%A > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Verify the %%A signature"" |
%TPM_EXE_PATH%verifysignature -hk !K! -halg %%H -if tmp.bin -is sig.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
) |
) |
) |
echo ""Flush the RSA attestation key"" |
%TPM_EXE_PATH%flushcontext -ha 80000001 > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Flush the ECC attestation key"" |
%TPM_EXE_PATH%flushcontext -ha 80000002 > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Flush the auth session"" |
%TPM_EXE_PATH%flushcontext -ha 02000000 > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo """" |
echo ""Attestation with an HMAC key"" |
echo """" |
echo ""Generate an HMAC key"" |
%TPM_EXE_PATH%getrandom -by 32 -of tmphkey.bin -ns > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
for %%H in (%ITERATE_ALGS%) do ( |
echo ""Create a %%H HMAC key"" |
%TPM_EXE_PATH%create -hp 80000000 -pwdp sto -kh -halg %%H -if tmphkey.bin -opu tmppub.bin -opr tmppriv.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Load the %%H HMAC key"" |
%TPM_EXE_PATH%load -hp 80000000 -pwdp sto -ipu tmppub.bin -ipr tmppriv.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Signing Key Self Certify with an HMAC key %%H"" |
%TPM_EXE_PATH%certify -hk 80000001 -ho 80000001 -halg %%H -salg hmac -os sig.bin -oa tmp.bin -qd policies/aaa > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Verify the signature %%H using TPM"" |
%TPM_EXE_PATH%verifysignature -hk 80000001 -halg %%H -if tmp.bin -is sig.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Verify the signature %%H using OpenSSL"" |
%TPM_EXE_PATH%verifysignature -halg %%H -if tmp.bin -is sig.bin -ihmac tmphkey.bin > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
echo ""Quote with an HMAC key %%H"" |
%TPM_EXE_PATH%quote -hp 0 -hk 80000001 -halg %%H -salg hmac -os sig.bin -oa tmp.bin -qd policies/aaa > run.out |
IF !ERRORLEVEL! NEQ 0 ( |
exit /B 1 |
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.