Can I set the secret key value for message signing?

I am trying to use the Mavlink signing feature in Mission Planner.
Based on the MAVLink documentation, the secret key should be a 32 bytes string. I am curious about how Mission Planner uses the pass phrase given by the user. For example, I give the friendly name which I believe is the key’s name and pass phrase which I guess is the key value? If I give a 32 bytes string as the pass phrase, will mission planner use it as the secret key for signing? The key value showed in the AuthKey window seems to be encrypted already and its length is 44 not 32, which makes me confused.
Can I get the real key value used for message signing not the encrypted key value from Mission Planner? Or can I give the real key value to Mission Planner to let it use my key value for message signing? I want to connect Mission Planner with other platform, but the signing feature cannot be tested since there is no way to get the key value from Mission Planner or set my key value in Mission Planner for creating the signature.

the 44 character long string is base64 encoded.

so unbase 64 it, and that will give you the key in its raw form, which is a sha256 of the user secret

1 Like

Hi Michael,
Thanks for the information. After I unbase64 it, I get a 32 uint8 array, and it is directly used as the secret key for message signing, right? Which I mean is that it will be directly used by mavlink_sign_packet function, right?

yes it is… …