Class: RDF::Vocab::CERT

Inherits:
StrictVocabulary
  • Object
show all
Defined in:
lib/rdf/vocab/cert.rb

Overview

Vocabulary for <www.w3.org/ns/auth/cert#>

Ontology for Certificates and crypto stuff.

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      *    Todo:       - add some classes and relations for DSA      - should this all be in one file? Or should this be cut up a little? Say one file for the general CERT ontology, and then files for RSA, DSA, PGP, etc... Or perhaps it does not really matter?      - expand more on the certification side of things      - verify this by security experts      - owl2 has some constructs for combined inverse functional properties.         This may be useful to use in defining an RSA key which is identified        by two numbers.      - also create html version of the spec by using this as a template.      - should comments such as this be in html?

Instance Attribute Summary collapse

Instance Attribute Details

#CertificateRDF::Vocabulary::Term (readonly)

A certificate is a Document that is signed. As explained here 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.‘

Returns:

  • (RDF::Vocabulary::Term)


12
13
14
# File 'lib/rdf/vocab/cert.rb', line 12

def Certificate
  @Certificate
end

#exponentRDF::Vocabulary::Term (readonly)

The exponent used to encrypt the message. Number chosen between 1 and the totient(p*q). Often named ‘e’ .

Returns:

  • (RDF::Vocabulary::Term)


48
49
50
# File 'lib/rdf/vocab/cert.rb', line 48

def exponent
  @exponent
end

#hexRDF::Vocabulary::Term (readonly)

<span xmlns=“www.w3.org/1999/xhtml” xmlns:dc=“purl.org/dc/terms/” xmlns:foaf=“xmlns.com/foaf/0.1/” xmlns:owl=“www.w3.org/2002/07/owl#” xmlns:rdf=“www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:rdfs=“www.w3.org/2000/01/rdf-schema#” xmlns:skos=“www.w3.org/2004/02/skos/core#” xmlns:vs=“www.w3.org/2003/06/sw-vocab-status/ns#”><p> An encoding of a positive integer (from 0 to infinity) as a hexadecimal string that makes it easy to read and/or fun to present on the web.</p> <p>The purpose of this way of representing hexadecimals is to enable users to copy and paste hexadecimal notations as shown by most browsers, keychains or tools such as opensso, into their rdf representation of choice. There are a wide variety of ways in which such strings can be presented. One finds the following:</p> <pre> e1 dc d5 e1 00 8f 21 5e d5 cc 7c 7e c4 9c ad 86 64 aa dc 29 f2 8d d9 56 7f 31 b6 bd 1b fd b8 ee 51 0d 3c 84 59 a2 45 d2 13 59 2a 14 82 1a 0f 6e d3 d1 4a 2d a9 4c 7e db 90 07 fc f1 8d a3 8e 38 25 21 0a 32 c1 95 31 3c ba 56 cc 17 45 87 e1 eb fd 9f 0f 82 16 67 9f 67 fa 91 e4 0d 55 4e 52 c0 66 64 2f fe 98 8f ae f8 96 21 5e ea 38 9e 5c 4f 27 e2 48 ca ca f2 90 23 ad 99 4b cc 38 32 6d bf </pre> <p> Or the same as the above, with ‘:’ instead of spaces. We can’t guarantee that these are the only ways such tools will present hexadecimals, so we are very lax.</p> <p>The letters can be uppercase or lowercase, or mixed. </p> <p>Some strings may start with initial 00’s, and can be stripped in this notation as they often are. Doing this could, in complement of 2 notation turn a positive number into a negative one, if the first hexadecimal character happens to be one of the set ‘9’, ‘a’, ‘A’, ‘b’, ‘B’, ‘c’, ‘C’, ‘d’, ‘D’, ‘e’, ‘E’, ‘f’, ‘F’ . As we interpret this string as a hexadecimal number leading 00s are not important (Complement of 2 notation and hexadecimal overlap for positive numbers)</p> <p> In order to make this fun, we allow any unicode characters in the string. A parser should </p> <ol> <li>remove all non hexadecimal characters</li> <li>treat the resulting as a hexadecimal representation of a number</li> </ol> <p> This will allow people to make an ascii - better yet a UTF-8 - picture of their public key when publishing it on the web. </p> <p> Cert hex is also a datatype property because we used to write it out like this </p> <pre> [] a rsa:RSAPublicKey; rsa:public_exponent [ cert:hex “e1 dc d5 …”] </pre> <p> The above notation is now deprecated. Now we prefer the literal format below.</p> <pre> [] a rsa:RSAPublicKey; rsa:public_exponent “e1 dc d5 …”^^cert:hex . </pre> </span>

Returns:

  • (RDF::Vocabulary::Term)


68
69
70
# File 'lib/rdf/vocab/cert.rb', line 68

def hex
  @hex
end

#identityRDF::Vocabulary::Term (readonly)

the identity of the public key. This 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.

Returns:

  • (RDF::Vocabulary::Term)


52
53
54
# File 'lib/rdf/vocab/cert.rb', line 52

def identity
  @identity
end

#keyRDF::Vocabulary::Term (readonly)

relates an agent to a key - most often the public key.

Returns:

  • (RDF::Vocabulary::Term)


56
57
58
# File 'lib/rdf/vocab/cert.rb', line 56

def key
  @key
end

#KeyRDF::Vocabulary::Term (readonly)

the class of keys

Returns:

  • (RDF::Vocabulary::Term)


16
17
18
# File 'lib/rdf/vocab/cert.rb', line 16

def Key
  @Key
end

#modulusRDF::Vocabulary::Term (readonly)

<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=“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=“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>

Returns:

  • (RDF::Vocabulary::Term)


60
61
62
# File 'lib/rdf/vocab/cert.rb', line 60

def modulus
  @modulus
end

#PGPCertificateRDF::Vocabulary::Term (readonly)

the class of PGP Certificates

Returns:

  • (RDF::Vocabulary::Term)


20
21
22
# File 'lib/rdf/vocab/cert.rb', line 20

def PGPCertificate
  @PGPCertificate
end

#privateExponentRDF::Vocabulary::Term (readonly)

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’

Returns:

  • (RDF::Vocabulary::Term)


64
65
66
# File 'lib/rdf/vocab/cert.rb', line 64

def privateExponent
  @privateExponent
end

#PrivateKeyRDF::Vocabulary::Term (readonly)

Private Key

Returns:

  • (RDF::Vocabulary::Term)


24
25
26
# File 'lib/rdf/vocab/cert.rb', line 24

def PrivateKey
  @PrivateKey
end

#PublicKeyRDF::Vocabulary::Term (readonly)

Public Key

Returns:

  • (RDF::Vocabulary::Term)


28
29
30
# File 'lib/rdf/vocab/cert.rb', line 28

def PublicKey
  @PublicKey
end

#RSAKeyRDF::Vocabulary::Term (readonly)

The union of the public and private components of an RSAKey. Usually those pieces are not kept together

Returns:

  • (RDF::Vocabulary::Term)


32
33
34
# File 'lib/rdf/vocab/cert.rb', line 32

def RSAKey
  @RSAKey
end

#RSAPublicKeyRDF::Vocabulary::Term (readonly)

The RSA public key. Padded message m are encrypted by applying the function modulus(power(m,exponent),modulus)

Returns:

  • (RDF::Vocabulary::Term)


36
37
38
# File 'lib/rdf/vocab/cert.rb', line 36

def RSAPublicKey
  @RSAPublicKey
end

#SignatureRDF::Vocabulary::Term (readonly)

the class of signtatures

Returns:

  • (RDF::Vocabulary::Term)


40
41
42
# File 'lib/rdf/vocab/cert.rb', line 40

def Signature
  @Signature
end

#X509CertificateRDF::Vocabulary::Term (readonly)

the class of X509 Certificates

Returns:

  • (RDF::Vocabulary::Term)


44
45
46
# File 'lib/rdf/vocab/cert.rb', line 44

def X509Certificate
  @X509Certificate
end