update ontology so that modulus uses xsd:hexBinary, explain how the encoding works.
update spec so that it fits the definition in the ontology.
--- a/ontologies/cert.html Wed Nov 23 18:22:30 2011 +0100
+++ b/ontologies/cert.html Wed Nov 23 18:51:35 2011 +0100
@@ -266,8 +266,8 @@
<dt>Sub class of</dt>
- <dd><span rel="rdfs:subClassOf" href="http://www.w3.org/ns/auth/cert#PublicKey"><a href="#PublicKey">cert:PublicKey</a></span></dd>
- <dd><span rel="rdfs:subClassOf" href="http://www.w3.org/ns/auth/cert#RSAKey"><a href="#RSAKey">cert:RSAKey</a></span></dd><dt>OWL Class</dt>
+ <dd><span rel="rdfs:subClassOf" href="http://www.w3.org/ns/auth/cert#RSAKey"><a href="#RSAKey">cert:RSAKey</a></span></dd>
+ <dd><span rel="rdfs:subClassOf" href="http://www.w3.org/ns/auth/cert#PublicKey"><a href="#PublicKey">cert:PublicKey</a></span></dd><dt>OWL Class</dt>
</dl>
@@ -350,7 +350,7 @@
<p style="float: right; font-size: small;">[<a href="#exponent">#</a>] <!-- exponent --> [<a href="#glance">back to top</a>]</p>
<br/>
- </div><div class="specterm" id="key" about="http://www.w3.org/ns/auth/cert#key" typeof="rdf:Property">
+ </div><div class="specterm" id="key" about="http://www.w3.org/ns/auth/cert#key" typeof="owl:ObjectProperty">
<h4>Property: cert:key</h4>
<em property="rdfs:label" >key</em> - <span property="rdfs:comment" >relates an agent to a key - most often the public key.</span> <br />
<dl>
@@ -371,9 +371,9 @@
<dd><a href="#identity">cert:identity</a>
</dd><dt>RDF Property</dt>
- <dt>Object Property</dt>
+ <dd><span rel="rdf:type" href="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"></span></dd> <dt>Object Property</dt>
- <dd><span rel="rdf:type" href="http://www.w3.org/2002/07/owl#ObjectProperty"></span></dd>
+
</dl>
<p style="float: right; font-size: small;">[<a href="#key">#</a>] <!-- key --> [<a href="#glance">back to top</a>]</p>
@@ -381,8 +381,16 @@
</div><div class="specterm" id="modulus" about="http://www.w3.org/ns/auth/cert#modulus" typeof="owl:DatatypeProperty">
<h4>Property: cert:modulus</h4>
<em property="rdfs:label" >modulus</em> - <span property="rdfs:comment" >
- The modulus of an RSA public and private key.
+ <p>The modulus of an RSA public and private key.
Or the modulus of a DSA Key.
+ The modulus is encoded as a hex binary. The binary is the same as the one encoded in the
+ <a href="http://www.w3.org/TR/xmldsig-core/#sec-CryptoBinary">XML DSIG CryptoBinary</a>
+ </p>
+ <blockquote>
+ This specification defines the ds:CryptoBinary simple type for representing arbitrary-length integers (e.g. "bignums") in XML as octet strings. The integer value is first converted to a "big endian" bitstring. The bitstring is then padded with leading zero bits so that the total number of bits == 0 mod 8 (so that there are an integral number of octets). If the bitstring contains entire leading octets that are zero, these are removed (so the high-order octet is always non-zero).
+ </blockquote>
+ <p>The only difference is that the octet string is then encoded using either xsd:base64Binary or xsd:hexBinary. Currently for all usages of this relation, the xsd:hexBinary datatype should be used until the SPARQL working group specifies specifies in its <a href="http://www.w3.org/TR/sparql11-entailment/#DEntRegime">D-Entailment</a> that those two types are equivalent.</p>
+ <p>It would have been better had there been a hexInteger datatype that was standard and supported by all tools.</p>
</span> <br />
<dl>
<dt>Status:</dt>
@@ -394,7 +402,8 @@
</dd>
<dt>Range:</dt>
- <dd><span rel="rdfs:range" href="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"><a href="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">xsd:nonNegativeInteger</a></span>
+ <dd><span rel="rdfs:range" href="http://www.w3.org/2001/XMLSchema#base64Binary"><a href="http://www.w3.org/2001/XMLSchema#base64Binary">xsd:base64Binary</a></span>
+</dd> <dd><span rel="rdfs:range" href="http://www.w3.org/2001/XMLSchema#hexBinary"><a href="http://www.w3.org/2001/XMLSchema#hexBinary">xsd:hexBinary</a></span>
</dd><dt>Datatype Property</dt>
@@ -428,7 +437,7 @@
<p style="float: right; font-size: small;">[<a href="#privateExponent">#</a>] <!-- privateExponent --> [<a href="#glance">back to top</a>]</p>
<br/>
</div>
-<div class="specterm" id="identity" about="http://www.w3.org/ns/auth/cert#identity" typeof="rdf:Property">
+<div class="specterm" id="identity" about="http://www.w3.org/ns/auth/cert#identity" typeof="owl:ObjectProperty">
<h4>Property: cert:identity</h4>
<em property="rdfs:label" >identity</em> - <span property="rdfs:comment" >
the identity of the public key. This is the entity that knows the private key and
@@ -450,9 +459,9 @@
<dd><a href="#key">cert:key</a>
</dd><dt>RDF Property</dt>
- <dt>Object Property</dt>
+ <dd><span rel="rdf:type" href="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"></span></dd> <dt>Object Property</dt>
- <dd><span rel="rdf:type" href="http://www.w3.org/2002/07/owl#ObjectProperty"></span></dd><dt>Editorial Note</dt>
+ <dt>Editorial Note</dt>
<dd property="skos:editorialNote">
It turns out that this relation is unintuitive to write out and to name.
--- a/ontologies/cert.n3 Wed Nov 23 18:22:30 2011 +0100
+++ b/ontologies/cert.n3 Wed Nov 23 18:51:35 2011 +0100
@@ -200,11 +200,19 @@
rdfs:label "modulus"@en;
vs:term_status "unstable";
rdfs:comment """
- The modulus of an RSA public and private key.
+ <p>The modulus of an RSA public and private key.
Or the modulus of a DSA Key.
+ The modulus is encoded as a hex binary. The binary is the same as the one encoded in the
+ <a href="http://www.w3.org/TR/xmldsig-core/#sec-CryptoBinary">XML DSIG CryptoBinary</a>
+ </p>
+ <blockquote>
+ This specification defines the ds:CryptoBinary simple type for representing arbitrary-length integers (e.g. "bignums") in XML as octet strings. The integer value is first converted to a "big endian" bitstring. The bitstring is then padded with leading zero bits so that the total number of bits == 0 mod 8 (so that there are an integral number of octets). If the bitstring contains entire leading octets that are zero, these are removed (so the high-order octet is always non-zero).
+ </blockquote>
+ <p>The only difference is that the octet string is then encoded using either xsd:base64Binary or xsd:hexBinary. Currently for all usages of this relation, the xsd:hexBinary datatype should be used until the SPARQL working group specifies specifies in its <a href="http://www.w3.org/TR/sparql11-entailment/#DEntRegime">D-Entailment</a> that those two types are equivalent.</p>
+ <p>It would have been better had there been a hexInteger datatype that was standard and supported by all tools.</p>
"""@en;
rdfs:domain :RSAKey, :DSAKey;
- rdfs:range xsd:nonNegativeInteger .
+ rdfs:range xsd:hexBinary, xsd:base64Binary .
:exponent a owl:DatatypeProperty;
rdfs:label "exponent"@en;
--- a/spec/index-respec.html Wed Nov 23 18:22:30 2011 +0100
+++ b/spec/index-respec.html Wed Nov 23 18:51:35 2011 +0100
@@ -636,7 +636,7 @@
foaf:name "Bob";
:key [ a :RSAPublicKey;
rdfs:label "made on 23 November 2011 on my laptop";
- :modulus "00cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1"^^xsd:hexBinary;
+ :modulus "cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1"^^xsd:hexBinary;
:exponent 65537 ;
] .
</pre>
@@ -661,7 +661,7 @@
<dl>
<dt>Modulus (hexadecimal)</dt>
<dd property="modulus" datatype="xsd:hexBinary">
-00cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1</dd>
+cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1</dd>
<dt>Exponent (decimal)</dt>
<dd property="exponent" datatype="xsd:int">65537</dd>
</dl>
@@ -708,7 +708,7 @@
<cert:RSAPublicKey>
<rdfs:label>made on 23 November 2011 on my laptop<rdfs:label>
<cert:modulus rdf:datatype="xsd:hexBinary">
-00cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1</dd>
+cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1</dd>
</cert:modulus>
<cert:exponent rdf:datatype="xsd:int">65537</cert:exponent>
</cert:RSAPublicKey>
@@ -845,11 +845,11 @@
</p>
<p>Assuming the public key is an RSA key, and that its modulus is "9D79BFE2498..." and exponent "65537" then the following query should be used:
</p>
-<pre class='example'>
+<pre class='example' style="word-wrap: break-word; white-space: pre-wrap;">
PREFIX : <http://www.w3.org/ns/auth/cert#>
ASK {
<https://bob.example/webid#public> :key [
- :modulus "9D79BFE2498..."^^xsd:hexBinary;
+ :modulus "cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1"^^xsd:hexBinary;
:exponent 65537;
] .
}