-
Notifications
You must be signed in to change notification settings - Fork 0
/
crypto.rdf
executable file
·87 lines (73 loc) · 4.12 KB
/
crypto.rdf
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
<rdf:RDF xmlns="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://www.w3.org/2000/01/rdf-schema#">
<rdf:Description rdf:about="http://www.w3.org/2000/10/swap/crypto#CanEncrypt">
<comment>PublicKeyObjects which are capable of encrypting things</comment>
<isSubClassOf rdf:resource="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.w3.org/2000/10/swap/crypto#CanSign">
<comment>PublicKeyObjects which are capable of signing things.
True if the algorithm is capable of signing data; false otherwise. To
test if a given key object can sign data, use CanSign and HasPrivate.</comment>
<isSubClassOf rdf:resource="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.w3.org/2000/10/swap/crypto#HasPrivate">
<comment>
Some keys have private parts, some don't. This is the class of those which do.
</comment>
<isSubClassOf rdf:resource="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject"/>
</rdf:Description>
<Class rdf:about="http://www.w3.org/2000/10/swap/crypto#HashFunction">
<comment>
The crypographic hash functions are (being functions) unique and are,
when secure, assumed unambiguous (the whole point of being hash
functions). That is, when you have the right hash, you have the right
document. Currently (2001/9) only SHA is given that property.
</comment>
<label>Any crypographic hash function</label>
</Class>
<Class rdf:about="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject">
<comment>An object corresponding to a key for some algorithm.
The object can hold a public and optionally a private key.</comment>
</Class>
<rdf:Property rdf:about="http://www.w3.org/2000/10/swap/crypto#md5">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<comment>The object is a MD5 hash of the subject.</comment>
<domain rdf:resource="http://www.w3.org/2000/10/swap/string#String"/>
<label>MD5 hash</label>
<range rdf:resource="http://www.w3.org/2000/10/swap/string#String"/>
</rdf:Property>
<Property rdf:about="http://www.w3.org/2000/10/swap/crypto#publicKey">
<comment>The object is a public key object that doesn't
contain the private key data in the subject.
This function extracts the public part.</comment>
<domain rdf:resource="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject"/>
<range rdf:resource="http://www.w3.org/2000/10/swap/crypto#PublicKeyObject"/>
</Property>
<rdf:Property rdf:about="http://www.w3.org/2000/10/swap/crypto#sha">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
<comment>The object is a SHA-1 hash of the subject.</comment>
<domain rdf:resource="http://www.w3.org/2000/10/swap/string#String"/>
<label>SHA hash</label>
<range rdf:resource="http://www.w3.org/2000/10/swap/string#String"/>
</rdf:Property>
<rdf:Property rdf:about="http://www.w3.org/2000/10/swap/crypto#sign">
<comment>The subject should be a list of two things, a hash
string and a key (containing private and public parts). The object is
calculated as a signature string by signing the hash with the key's
private part.</comment>
<label>sign</label>
</rdf:Property>
<rdf:Property rdf:about="http://www.w3.org/2000/10/swap/crypto#verify">
<comment>If the subject is a key object containing private and
public parts and the obejct is a list of a hash and a signature, then
this is true if and only if the signature is a valid signature of the
hash with the key.</comment>
</rdf:Property>
<rdf:Property rdf:about="http://www.w3.org/2000/10/swap/crypto#verifyBoolean">
<comment>If the subject is a list containg a keypair, a hash,
and a signature, then the object is either "1" if the signature
validates or "0" if it does not.</comment>
</rdf:Property>
</rdf:RDF>