PsaSignMessage

Sign a message with a private key. Opcode: 24 (0x0018)

Parameters

NameTypeDescription
key_nameStringName of the key to use for the operation
algAsymmetricSignatureAn asymmetric signature algorithm that separates the message and sign operations that is compatible with the type of key
messageVector of bytesThe message to sign
  • key_name must be the name of an asymmetric key pair. The key must allow the usage flag sign_message.

Results

NameTypeDescription
signatureVector of bytesBuffer containing the signature

Specific response status codes

  • PsaErrorNotPermitted: The key does not have the sign_message flag, or it does not permit the requested algorithm.

Description

This function will sign a message with a private key. For hash-and-sign algorithms, this includes the hashing step.

Contract

Protobuf

Copyright 2020 Contributors to the Parsec project.