Skip to content
Permalink
Browse files

Add files via upload

  • Loading branch information...
cyberphone committed May 10, 2019
1 parent c3c7895 commit 6f15bf9c24ae5b1cb0857fcd4201ae412b101d7e
Showing with 110 additions and 2 deletions.
  1. +110 −2 ietf-104-report.html
@@ -1,3 +1,4 @@
<!DOCTYPE html><html><head><title>JCS - IETF-104 Report</title><meta http-equiv=Content-Type content="text/html; charset=utf-8"><style type="text/css">
body {font-size:10pt;color:#000000;font-family:verdana,arial;background-color:white;margin:10pt}
a {font-size:10pt;color:blue;text-decoration:none}
div.json {margin-top:8pt;margin-bottom:15pt;word-break:break-all;width:800pt;background:#F8F8F8;border-width:1px;border-style:solid;border-color:grey;padding:10pt;box-shadow:3pt 3pt 3pt #D0D0D0}
@@ -13,11 +14,19 @@
Here is a list of issues raised during these meetings.
I have taken the liberty commenting them here.</i>
<p>
For those who are not familiar with JCS
<a href="https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05"
target="_blank">(https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05)</a>,
the core rationale is simply "keeping JSON as JSON even when signed".
</p>


<div class="claim" id="1">
1. The need for clear text messages is a weak argument
</div>
<div class="response">
The current IETF solution
<a href="https://tools.ietf.org/html/rfc7515"
target="_blank">(JWS)</a> requires you to:
<ul>
<li>
Encode JSON data to be signed in Base64Url
@@ -27,7 +36,106 @@
signed message data in specific signature containers
</li>
</ul>
None of the Open Banking systems out there have to date chosen
this route, <u>they all build on variants using detached clear text JSON data</u>.
That none of them utilize JCS is quite logical since
JCS is (correctly) not perceived as a standard.
</div>
<<<<<< dev</body></html>

<div class="claim" id="2">
2. Canonicalization introduces security vulnerabilities
</div>
<div class="response">
<p>
If a canonicalization scheme is incorrectly implemented
(irrespective in which end), the likely result is that signatures will not validate.
Broken signatures in similarity to any other input error, including missing or
incorrectly formatted data should in a properly designed application lead to a
rejected message/application failure. The core of a JCS implementation is
typically only <u>a couple of kilobytes of executable code</u>
making it reasonably easy to verify for correctness.
</p>
<p>
It has been mentioned that clear text data will tempt developers into trusting
(=using) data without first verifying signatures. JCS obviously does not
come with a cure for naïve developers.
</p>
<p>
In fact, the absence of clear text signatures creates issues even
for true security experts like the TEEP folks:
</p><div style="margin-left:30pt">
<a href="https://tools.ietf.org/html/draft-ietf-teep-opentrustprotocol-02"
target="_blank">https://tools.ietf.org/html/draft-ietf-teep-opentrustprotocol-02</a>
<p>
<i>
"The top element "<name>
[Signed][Request|Response]" cannot be fully
trusted to match the content because it doesn't participate in the
signature generation. However, a recipient can always match it with
the value associated with the property "payload". It purely serves
to provide a quick reference for reading and method invocation"
</i>
</p>
</div>
Using JCS with JWS the need for artificial holder objects and associated matching requirements disappear, while message content is provided in clear.
</div>

<div class="claim" id="3">
3. Number serialization is major problem
</div>
<div class="response">
I clearly underestimated this part when I started with JCS back in 2015, but
recently fast and quite simple algorithms have been developed, making number
serialization according to JCS/ES6 in scope for any platform.
Extensive test data is also publicly available.
</div>

<div class="claim" id="4">
4. You should have stayed with the ES6 predictive parsing/serialization scheme
</div>
<div class="response">
That had been cool but the sentiment among other JSON tool vendors was
that "ECMA got it all wrong" so
<u>I was forced to select another and more conventional route</u>.
Fortunately, the revised scheme turned out to be very simple to get running
in other platforms including Go, Python, C# and Java/Android, while leaving
parsers and serializers unchanged.
The <a href="https://tools.ietf.org/html/draft-erdtman-jose-cleartext-jws-01"
target="_blank">original concept</a> would OTOH
require a total rewrite of the entire JSON landscape.
Sometimes "pushback" is just good 😀
</div>

<div class="claim" id="5">
5. You need a data model
</div>
<div class="response">
JCS builds on the same a bare-bones data model for primitives as JSON
(null, true, false, numbers, strings), albeit with a couple of constraints:
<ul>
<li>
JSON Numbers MUST conceptually be treated as IEEE-754 double precision data
</li>
<li>
JSON Strings MUST (modulo escaping) be treated as immutable during parsing/serialization
</li>
</ul>
This is all what is needed with respect to data models for creating reliable and interoperable "hashable" JSON.
Existing JSON-based systems use external mappings to emulate
missing data types like "DateTime", "Money", "Binary" and similar.
That not all JSON applications not use the same conventions
<u>do not seem to have hampered the popularity and ubiquity of JSON</u>.
Standardizing external mappings is another [possible] IETF activity, not related to JCS.
</div>

<div class="claim" id="6">
6. I-JSON (JCS builds on that) only says SHOULD for IEEE-754 while JCS says MUST
</div>
<div class="response">
That is correct but if you for example send 64-bit integers expressed as
JSON Numbers to JavaScript based systems, applications will typically break
every now and then since the inherent precision is only 53 bits.
JCS was designed to also be fully JavaScript compatible.
</div>
<div style="margin-top:30pt">Version 1.02, Anders Rundgren 2019-05-10</div>
</body></html>

0 comments on commit 6f15bf9

Please sign in to comment.
You can’t perform that action at this time.