| java.lang.Object org.jboss.security.srp.SRPClientSession
SRPClientSession | public class SRPClientSession (Code) | | The client side logic to the SRP protocol. The class is intended to be used
with a SRPServerSession object via the SRPServerInterface. The SRP algorithm
using these classes consists of:
1. Get server, SRPServerInterface server = (SRPServerInterface) Naming.lookup(...);
2. Get SRP parameters, SRPParameters params = server.getSRPParameters(username);
3. Create a client session, SRPClientSession client = new SRPClientSession(username,
password, params);
4. Exchange public keys, byte[] A = client.exponential();
byte[] B = server.init(username, A);
5. Exchange challenges, byte[] M1 = client.response(B);
byte[] M2 = server.verify(username, M1);
6. Verify the server response, if( client.verify(M2) == false )
throw new SecurityException("Failed to validate server reply");
7. Validation complete
Note that these steps are stateful. They must be performed in order and a
step cannot be repeated to update the session state.
This product uses the 'Secure Remote Password' cryptographic
authentication system developed by Tom Wu (tjw@CS.Stanford.EDU).
author: Scott.Stark@jboss.org version: $Revision: 57210 $ |
Constructor Summary | |
public | SRPClientSession(String username, char[] password, SRPParameters params) | public | SRPClientSession(String username, char[] password, SRPParameters params, byte[] abytes) Creates a new SRP server session object from the username, password
verifier,
username, the user ID password, the user clear text password params, the SRP parameters for the session abytes, the random exponent used in the A public key. |
SRPClientSession | public SRPClientSession(String username, char[] password, SRPParameters params)(Code) | | Creates a new SRP server session object from the username, password
verifier,
username, the user ID password, the user clear text password params, the SRP parameters for the session |
SRPClientSession | public SRPClientSession(String username, char[] password, SRPParameters params, byte[] abytes)(Code) | | Creates a new SRP server session object from the username, password
verifier,
username, the user ID password, the user clear text password params, the SRP parameters for the session abytes, the random exponent used in the A public key. This must be8 bytes in length. |
exponential | public byte[] exponential()(Code) | | |
getSessionKey | public byte[] getSessionKey() throws SecurityException(Code) | | Returns the negotiated session K, K = SHA_Interleave(S)
the private session K byte[] throws: SecurityException - - if the current thread does not have angetSessionKey SRPPermission. |
verify | public boolean verify(byte[] M2)(Code) | | Parameters: M2 - The server's response to the client's challenge |
|
|