TSPI_HASH_VERIFYSIGNATURE(3)

πŸ’– Tspi_Hash_VerifySignature(3) πŸ’–

okay bestie so this is a page from the TCG Software Stack Developer's Reference, living in the Library Functions Manual, and it's literally the whole vibe of "did this signature actually come from who I think it did" πŸ•΅οΈβ™€οΈβœ¨


✨ NAME ✨

Tspi_Hash_VerifySignature β€” verify the hash value with a given signature πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>

TSS_RESULT Tspi_Hash_VerifySignature(TSS_HHASH hHash,             TSS_HKEY hKey,
                                     UINT32    ulSignatureLength, BYTE*    rgbSignature);

🌸 DESCRIPTION 🌸

Tspi_Hash_VerifySignature checks a hash value from a given hash object against a given signature. no cap, that's the whole job 🫢

so to actually use this command you need three things, and if you're missing any of them it's giving ✨nothing✨:

  1. a hash 🌈
  2. a signature of that hash β€” the one you're trying to verify πŸ”
  3. the public key that corresponds to the private key that was used to sign the hash πŸ”‘

that's it. that's the trio. periodt πŸ’…


πŸ¦‹ PARAMETERS πŸ¦‹

hHash

the handle to the hash object instance whose hash value should be signed πŸ“

hKey

handle to the key object that should be used for the signature verification πŸ”

ulSignatureLength

the length of the signature data you're handing over at the parameter rgbSignature πŸ“

rgbSignature

a pointer to the signature data πŸ‘‰πŸ“œ


πŸ’€ RETURN CODES πŸ’€

Tspi_Hash_VerifySignature returns TSS_SUCCESS on success 😌 otherwise one of these lil guys shows up:

  • TSS_E_INVALID_HANDLE β€” hKey is not a valid handle πŸ™ˆ
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected πŸ’₯
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad 😭
  • TSS_E_HASH_INVALID_LENGTH β€” hash length is inconsistent with hash algorithm πŸ“βŒ
  • TSS_E_HASH_NO_DATA β€” hash object has no internal hash value πŸ«₯
  • TSS_E_INVALID_SIGSCHEME β€” invalid signature scheme 🚫✍️

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Hash_VerifySignature conforms to the Trusted Computing Group Software Specification version 1.1 Golden ⭐ iconic behavior honestly


🌈 SEE ALSO 🌈


and that's the page bestie πŸŽ€ this was TSS 1.1, dated 2004-05-25 β€” yes she's an elder but she still ate πŸ’…βœ¨ mwah, go verify those signatures πŸ«ΆπŸ’–