cert.n3 4.48 KB
@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