PsaMacVerify

Calculate the MAC of a message and compare it to an expected value. Opcode: 23 (0x0017)

Parameters

NameTypeDescription
key_nameStringName of the key to use for the operation
algMacMac algorithm to compute
inputVector of bytesBuffer containing the input message
macVector of bytesBuffer containing the expected MAC value
  • key_name must allow the usage flag verify_message.

Results

No values are returned by this operation. If Success is returned the MAC is valid.

Specific response status codes

  • PsaErrorNotPermitted: The key does not have the verify_message flag, or it does not permit the requested algorithm.
  • PsaErrorInvalidSignature: The MAC of the message was calculated successfully, but it differs from the expected value.

Description

This function will calculate the message authentication code (MAC) of a message and compare it to an expected value.

Contract

Protobuf

Copyright 2020 Contributors to the Parsec project.