All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jnfs.security.DSAChallenge

java.lang.Object
   |
   +----jnfs.security.DSAChallenge

public class DSAChallenge
extends Object
implements Challenge
A Challenge implemented using DSA signatures.

Version:
$Id: DSAChallenge.java,v 1.18 1997/05/20 19:16:20 mjr Exp $
Author:
Michael John Radwin

Constructor Index

 o DSAChallenge(String, SecureRandom)
Creates a challenge with a default number of random bytes.
 o DSAChallenge(String, SecureRandom, int)
Creates a challenge with length random bytes.

Method Index

 o bytes()
Returns a copy of the random bytes associated with this challenge.
 o equals(Object)
Tests for equality of Challenges.
 o issueResponse(PrivateKey)
Uses the PrivateKey to sign this challenge and returns a new Response which contains the signed version of this challenge.
 o user()
Returns the name of the user associated with this challenge.
 o verifyResponse(Response, PublicKey)
Uses the PublicKey to verify that the Response is a signed version of this challenge.

Constructors

 o DSAChallenge
 public DSAChallenge(String user,
                     SecureRandom rand)
Creates a challenge with a default number of random bytes.

See Also:
generateChallenge
 o DSAChallenge
 public DSAChallenge(String user,
                     SecureRandom rand,
                     int length)
Creates a challenge with length random bytes.

See Also:
generateChallenge

Methods

 o user
 public String user()
Returns the name of the user associated with this challenge.

 o bytes
 public byte[] bytes()
Returns a copy of the random bytes associated with this challenge.

 o equals
 public boolean equals(Object other)
Tests for equality of Challenges.

Overrides:
equals in class Object
 o issueResponse
 public synchronized Response issueResponse(PrivateKey privkey) throws InvalidKeyException
Uses the PrivateKey to sign this challenge and returns a new Response which contains the signed version of this challenge. Typically called from the client.

Throws: InvalidKeyException
if the key is invalid.
 o verifyResponse
 public synchronized boolean verifyResponse(Response credentials,
                                            PublicKey pubkey) throws InvalidKeyException
Uses the PublicKey to verify that the Response is a signed version of this challenge. Typically called from the server.

Throws: InvalidKeyException
if the key is invalid.

All Packages  Class Hierarchy  This Package  Previous  Next  Index