You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2011/08/15 23:32:18 UTC

[Couchdb Wiki] Update of "SignedDocuments" by JensAlfke

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "SignedDocuments" page has been changed by JensAlfke:
http://wiki.apache.org/couchdb/SignedDocuments?action=diff&rev1=7&rev2=8

Comment:
Fixed link to OLPC's canonical JSON spec (which had always been incorrect in every revision so far)

  
  The signature has to be generated from a ''repeatable representation'' of the JSON. The important aspect is that the algorithm which generates the signing artifact can be generated reliably and repeatedly from the transferred text. It may be best to link to the algorithm which generates the signing artifact, or otherwise include the algorithm in the signature itself, so that the signature can be verified across time and space.
  
- There is no standard for this yet, but [[http://www.unicode.org/reports/tr15/|the OLPC group has documented one]] that's pretty reasonable:
+ There is no standard for this yet, but [[http://wiki.laptop.org/go/Canonical_JSON|the OLPC group has documented one]] that's pretty reasonable:
  
   * No whitespace.
   * No escape sequences in strings other than `\"` and `\\`. All other characters must be represented literally, including control characters.
   * No trailing commas.
   * Object keys sorted by Unicode character values (code points). The sorting occurs ''before'' escape sequences are added.
   * No decimal points in numbers (i.e. only integers allowed) or leading zeros. "-0" is not allowed.
-  * UTF-8 encoding of Unicode Normalization Form C
+  * UTF-8 encoding of [[http://www.unicode.org/reports/tr15/|Unicode Normalization Form C]].
  
  Note: The OLPC spec allows arbitrary byte sequences in strings, for easy storage of binary data. But this contradicts the [[http://www.ietf.org/rfc/rfc4627.txt|JSON specification]], which clearly states that "a string is a  sequence of zero or more Unicode characters".