All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class IS.hi.logir.cryptonite.Signature

java.lang.Object
   |
   +----IS.hi.logir.cryptonite.Signature

public class Signature
extends Object
implements Serializable
This class stores an rsa signature. A signature of a chunk of data is an MD5 fingerprint of that data encrypted with a private key. This signature can be verified with the corresponding public key. Faking a signature is exactly as difficult as decrypting a message that uses the same key pair.

In particular, if Alice signs a key which claims to belong to Bob, she's confirming that it does indeed belong to Bob. Thus if Carl recieves it and trusts Alice, he can safely use Bob's key.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
Fingerprint, RsaKey

Variable Index

 o keyPrint
 o s

Constructor Index

 o Signature(byte[], Key)
Create a new signature for the byte array, using the specified private key.
 o Signature(Fingerprintable, Key)
Create a new signature for obj, using the specified private key.

Method Index

 o check(byte[], Key)
Check if this is a signature for buf created with the private counterpart to the specified trusted public key.
 o check(byte[], KeyRing)
Check if this is a signature for buf created with the private counterpart to a trusted public key from the specified key-ring.
 o check(Fingerprintable, Key)
Check if this is a signature for obj created with the private counterpart to the specified trusted public key.
 o check(Fingerprintable, KeyRing)
Check if this is a signature for obj created with the private counterpart to a trusted public key from the specified key-ring.
 o getKeyFingerprint()
Return the fingerprint of the key used to create this signature.

Variables

 o s
 private byte s[]
 o keyPrint
 private Fingerprint keyPrint

Constructors

 o Signature
 public Signature(Fingerprintable obj,
                  Key key)
Create a new signature for obj, using the specified private key.

 o Signature
 public Signature(byte buf[],
                  Key key)
Create a new signature for the byte array, using the specified private key.

Methods

 o getKeyFingerprint
 public Fingerprint getKeyFingerprint()
Return the fingerprint of the key used to create this signature.

 o check
 public SignatureMatch check(Fingerprintable obj,
                             Key key)
Check if this is a signature for obj created with the private counterpart to the specified trusted public key.

 o check
 public SignatureMatch check(byte buf[],
                             Key key)
Check if this is a signature for buf created with the private counterpart to the specified trusted public key.

 o check
 public SignatureMatch check(Fingerprintable obj,
                             KeyRing keyRing) throws KeyRingCorruptException
Check if this is a signature for obj created with the private counterpart to a trusted public key from the specified key-ring.

 o check
 public SignatureMatch check(byte buf[],
                             KeyRing keyRing) throws KeyRingCorruptException
Check if this is a signature for buf created with the private counterpart to a trusted public key from the specified key-ring.


All Packages  Class Hierarchy  This Package  Previous  Next  Index