External Signing
Last updated
Last updated
How to perform deploy and run scenarios without disclosing the private key
Sometimes there is no access to the private key - for instance if an application signs data using HSM module or NFC card that does not disclose the private key but provides some API for signing.
There are 2 patterns to implement such scenario:
use signingBox
interface to sign message. It will allow you to invoke an API of your signing device during message creation.
sign message separately - this approach will allow you to separate message creation into 3 steps: create unsigned message, sign it, and attach signature.
Read below for more details.
Developer needs to create an implementation of this interface in their project and pass it to SDK.
The implementation may incapsulate invoking of some external API, such as HSM of NFC Card.
where
Core sample
AppKit sample
All the methods that create messages - encode_message
, process_message
can take , implementing this interface, instead of a key pair.
In this case you may create an unsigned message with encode_message
function, specifying Signer of type External
. After that you sign it somewhere outside and attach signature with function.
We will upload a sample with it later. If you need it in your work, please write in .