cert.n3
4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix wot: <http://xmlns.com/wot/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <cert#> .
<cert> a owl:Ontology ;
rdfs:comment """
Ontology for Certificates and crypto stuff.
This is in development.
Some other ontologies to look at:
* http://www.w3.org/2000/10/swap/crypto
+ has cwm builtins: http://www.w3.org/2000/10/swap/doc/Trust
- a bit old perhaps. It imports daml+oil
- would help to be more completely specified
- uses literals as subjects a little liberally, which makes this a
bit difficult to work with frameworks that don't permit this
* http://xmlns.com/wot/0.1/
- limited very much to PGP (though on can map PGP to X509)
- a little coarse grained, mixes up the PGP certificate with the PGP
public key
*
""".
:Integer a owl:Class;
rdfs:comment """
The class of all integers, however large they be.
This should be defined in another ontology.
Different representations for each can be defined via relations to string
literals.
This is the class of xsd:integer literals.
""" .
:Certificate a owl:Class;
rdfs:subClassOf foaf:Document;
rdfs:comment """A certificate is a Document that is signed.
As explained here http://www.pgpi.org/doc/pgpintro/#p16
'A digital certificate consists of three things:
* A public key.
* Certificate information. ('Identity' information about the
user, such as name, user ID, and so on.)
* One or more digital signatures.'
""" .
:X509Certificate a owl:Class;
rdfs:subClassOf :Certificate;
rdfs:comment "the class of X509 Certificates".
:PGPCertificate a owl:Class;
rdfs:subClassOf :Certificate;
owl:equivalentClass wot:PubKey;
rdfs:comment "the class of PGP Certificates".
:Signature a owl:Class;
rdfs:comment "the class of signtatures" .
:Key a owl:Class;
rdfs:comment "the class of keys" .
:PublicKey a owl:Class;
rdfs:comment "Public Key";
rdfs:subClassOf :Key .
:PrivateKey a owl:Class;
rdfs:comment "Private Key" ;
rdfs:subClassOf :Key .
:public_key a rdf:Property;
rdfs:comment """
relates the private key to the public key component, in a public/private
key pair.
""";
rdfs:domain :PrivateKey;
rdfs:range :PrivateKey .
:RSAKey rdfs:subClassOf :Key;
rdfs:comment """
The union of the public and private components of an RSAKey.
Usually those pieces are not kept together
""".
:RSAPublicKey rdfs:subClassOf :PublicKey, :RSAKey;
rdfs:seeAlso <http://en.wikipedia.org/wiki/RSA>;
rdfs:comment """
The RSA public key. Padded message m are encrypted by applying the function
modulus(power(m,exponent),modulus)
""" .
:modulus a rdf:Property;
rdfs:comment """
The modulus of an RSA public and private key.
This is defined as n = p*q
""";
rdfs:domain :RSAKey;
rdfs:range :Integer .
:public_exponent a rdf:Property;
rdfs:comment """
The exponent used to encrypt the message. Number chosen between
1 and the totient(p*q). Often named 'e' .
""";
rdfs:domain :RSAPublicKey;
rdfs:range :Integer .
:RSAPrivateKey rdfs:subClassOf :PrivateKey, :RSAKey;
rdfs:seeAlso <http://en.wikipedia.org/wiki/RSA>;
rdfs:comment """
A Private Key in the RSA framework
""".
:private_exponent a rdf:Property;
rdfs:comment """
The exponent used to decrypt the message
calculated as
public_exponent*private_exponent ≡ 1 modulo totient(p*q)
The private exponent is often named 'd'
""";
rdfs:domain :RSAPrivateKey;
rdfs:range :Integer .
:octetEncoding a owl:DatatypeProperty;
rdfs:seeAlso <http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules>;
rdfs:comment """
The encoding of an integer as an octet string, as defined in section 8.3 of International Telecommunications Unions (ITU) X.690 spec.
""";
rdfs:domain :Integer;
rdfs:range xsd:String .
:identity a rdf:Property;
rdfs:comment """
the identity of the public key. These is the entity that knows the private key and so can decrypt messages encrypted with the public key, or encrypt messages that can be decrypted with the public key.
""";
rdfs:domain :PublicKey;
rdfs:range foaf:Agent .
#ends