hyperledger / fabric-gateway

Go, Node and Java client API for Hyperledger Fabric v2.4+
https://hyperledger.github.io/fabric-gateway/
Apache License 2.0
150 stars 87 forks source link

Improve off-line signing documentation #638

Closed bestbeforetoday closed 4 months ago

bestbeforetoday commented 11 months ago

As an application developer I want the off-line signing documentation to highlight the relationship between Hash and signing implementation So that I can make off-line signing work without assistance when using a signing implementation that requires the full message as input

The digest provided by signable objects is generated using the Gateway's hash implementation which, by default, is SHA-256. Signing implementation used by off-line signing (such as those provided by the Node crypto package) might require the full message bytes since they also include digest generation. In these cases, the none has should be used so that the digest returned by signable objects is the complete message bytes.

Off-line signing is described in the Contract API documentation.