comment on JSON canonicalization

This commit is contained in:
Christian Grothoff 2020-01-19 21:18:03 +01:00
parent 84fd301313
commit c48e4a8a06
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 13 additions and 1 deletions

View File

@ -107,6 +107,12 @@ TALER_JSON_spec_denomination_signature (const char *field,
/**
* Hash a JSON for binary signing.
*
* See https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-15
* for fun JSON canonicalization problems. Callers must ensure that
* those are avoided in the input. We will use libjanson's "JSON_COMPACT"
* encoding for whitespace and "JSON_SORT_KEYS" to canonicalize as best
* as we can.
*
* @param[in] json some JSON value to hash
* @param[out] hc resulting hash code
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error

View File

@ -25,7 +25,13 @@
/**
* Hash a JSON for binary signing.
* Hash a JSON object for binary signing.
*
* See https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-15
* for fun JSON canonicalization problems. Callers must ensure that
* those are avoided in the input. We will use libjanson's "JSON_COMPACT"
* encoding for whitespace and "JSON_SORT_KEYS" to canonicalize as best
* as we can.
*
* @param[in] json some JSON value
* @param[out] hc resulting hash code