Message Signing
Overview
This service allows end users to have their messages signed by a satellite in orbit. This is achieved using the satellite's signature key along with a current timestamp to ensure the signature cannot be backdated. The Cryptosat service manages the task of coordinating the transmission of the message to the suitable ground station when the satellite is online.
Methods
sign
This method sends a message to the satellite to be signed and returns a request object that allows the user to track the status of the request.
Parameters
message
(string): The message to be signed.
Returns
sigRequest
(object): An object that allows the user to track the status of the request. This object has two methods:status
andresult
.
status
This method allows users to check the status of their signature request.
Parameters
None.
Returns
status
(string): The status of the request. When the request has been signed by the satellite and received back, the status will beREADY
.
result
This method returns the result of the signature request. This should be used once the status
method returns Ready
.
Parameters
None.
Returns
result
(object): The result of the request, which contains the signature and timestamp.
Example Usage
To validate the signature returned by the satellite, you can use the nacl
library. Here's a short snippet to demonstrate this:
This code initiates a signature request with the sign
method, periodically checks the status of the request using the status
method, and once the status is Ready
, it retrieves the result using the result
method. Finally, it verifies the signature using the nacl.sign.detached.verify
method from the nacl
library.
Last updated