PublicKeyFile -- File which contains public keys and trusts
PublicKeyFile instances export the following attributes:
- Dictionary of PublicKey objects in this file. Each key object
is indexed by its 128-bit public key value.
- 128-bit public key value of the user who created this file.
- Dictionary of dictionaries, just like Trusted, below. Each
PublicKey in this attribute is a trust relationship we no longer
- Dictionary of dictionaries. Both the inner and outer dictionaries are
indexed with 128-bit public key values. Each
Trusted[Trustee][Truster] node contains a
TrustRelationship instance where Trustee is trusting
Truster. Each TrustRelationship instance is signed with
the Truster's private key.
PublicKeyFile instances export the following functions:
- AddTrust(PubFilename, Private[,
Creates a valid TrustRelationship object where the
PublicKeyFile's Owner is the truster and the trustee is
taken from the PublicKeyFile named by PubFilename. Call
Write() after calling AddTrust(). If the
PrivateKey in Private does not match the Owner's
public key, then AddTrust() will throw a MismatchedKeys
If Transferrable is set to "Y" (default is
"N") then the truster is not only vouching for any files created
by the trustee, but also allowing the trustee to create further trust
relationships. Use great caution before setting Transferrable to
- Merges all public keys and trust relationships in the
PublicKeyFile named by PubFile into the
PublicKeyFile object. Call Write() after calling
Merge(). If Overwrite is set to True (it defaults
to False) then any duplicate entries in PubFile will
overwrite those in the PublicKeyFile.
- Returns the owner's PublicKey instance. Shortcut for
- Reads instance from disk.
- Removes the given TrustRelationship object (if present) from
Trusted and adds it to Revoked.
- Writes instance back out to disk.