Skip to content

Commit

Permalink
[FAB-16885] Doc usage of salt for private data
Browse files Browse the repository at this point in the history
Document the usage of salt for protecting private data.

Change-Id: I004d83f451a2d468f0b43aaf6ffaf61f56fd56b9
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
(cherry picked from commit c0fa06d)
  • Loading branch information
denyeart committed Oct 22, 2019
1 parent 3d49575 commit d0eecba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/source/private-data-arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,19 @@ data), to chaincode invocation on the peer. The chaincode can retrieve the
``transient`` field by calling the `GetTransient() API <https://github.com/hyperledger/fabric/blob/8b3cbda97e58d1a4ff664219244ffd1d89d7fba8/core/chaincode/shim/interfaces.go#L315-L321>`_.
This ``transient`` field gets excluded from the channel transaction.

Protecting private data content
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the private data is relatively simple and predictable (e.g. transaction dollar
amount), channel members who are not authorized to the private data collection
could try to guess the content of the private data via brute force hashing of
the domain space, in hopes of finding a match with the private data hash on the
chain. Private data that is predictable should therefore include a random "salt"
that is concatenated with the private data key and included in the private data
value, so that a matching hash cannot realistically be found via brute force.
The random "salt" can be generated at the client side (e.g. by sampling a secure
psuedo-random source) and then passed along with the private data in the transient
field at the time of chaincode invocation.

Access control for private data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit d0eecba

Please sign in to comment.