PPPv3 Java Implementation
UPDATED: See jPPPv3.0.1
I have updated my earlier implementation for PPPv3. In addition, I modified the PPPEngine object to behave in an easier to manage way. Here is my new java doc, along with an example driver.
1: Scanner in = new Scanner(System.in);
2: System.out.print("Password: ");
3: String password = in.next();
4: String sequencekey = PPPengine.findSequenceKey(password);
5: PPPengine card1 = new PPPengine(sequencekey);
6: System.out.println("Code 1: "+card1.makePasscode ());
7: card1.advanceToNextPasscode();
8: System.out.println("Code 2: "+card1.makePasscode ());
Class PPPengine
java.lang.Object PPPengine
-
public class PPPengine
- extends java.lang.Object
Main class for PPP password calculations.
| Constructor Summary | |
|---|---|
PPPengine(java.lang.String sequenceKeyIn)
Initiates the PPP card object. |
|
PPPengine(java.lang.String sequenceKeyIn, int cardNumberIn, int columnIn, int rowIn)
|
|
| Method Summary | |
|---|---|
void |
advanceToNextPasscode()
Advances the current object to the next passcode. |
static java.lang.String |
findSequenceKey(java.lang.String passphrase)
Creates 64-bit sequence key from passphrase using SHA-256. |
java.lang.String |
makePasscode()
Generates the passcode for the current object’s state. |
static void |
setAlphabet(java.lang.String alphabetIn)
Sets the character set used by the engine. |
static void |
setLength(int lengthIn)
Sets the passcode length used by the system. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
PPPengine
public PPPengine(java.lang.String sequenceKeyIn)
- Initiates the PPP card object. Use this to create a virtual replacement for a set printed PPP cards.
- Parameters:
sequenceKeyIn– 64 Character key used to generate card
PPPengine
public PPPengine(java.lang.String sequenceKeyIn, int cardNumberIn, int columnIn, int rowIn)
- Parameters:
sequenceKeyIn– 64 Character key used to generate cardcardNumberIn– Starting PPP cardcolumnIn– Starting columnrowIn– Starting row
| Method Detail |
|---|
findSequenceKey
public static java.lang.String findSequenceKey(java.lang.String passphrase)
- Creates 64-bit sequence key from passphrase using SHA-256.
-
- Parameters:
passphrase– String passphrase to be converted- Returns:
- String 64-bit sequence key
setAlphabet
public static void setAlphabet(java.lang.String alphabetIn)
- Sets the character set used by the engine.
-
- Parameters:
alphabetIn– String of characters
setLength
public static void setLength(int lengthIn)
- Sets the passcode length used by the system.
-
- Parameters:
lengthIn– Number of characters in final passcode
advanceToNextPasscode
public void advanceToNextPasscode()
- Advances the current object to the next passcode.
-
makePasscode
public java.lang.String makePasscode()
- Generates the passcode for the current object’s state.
-
- Returns:
- String of length characters that is the passcode.
- Throws:
java.lang.IllegalArgumentException
Hello Kurt,
I stumbled onto perfect paper password algorithm while I was searching for project topics for my course. From the GRC site, I came to know about your implementation of PPP system in Java.
I want to set up a server secured with PPP. A user may log on to the server after providing windows credentials and as second layer of security, a PPP application would prompt the user to provide the passcodes generated from the PPP Engine.
How do I integrate such a solution in Windows log on process, such that no user could access the system in any way without providing the correct passcodes?
I would be indebted to you if you could mentor me and provide me any pointers to achieve this?
Also I need to enforce a SSL connection to connect to the remote server.
Hope to hear from you soon,
thanks a lot,
Vinaya
Unfortunately there is not a good way to implement this on windows machines. It is very doable on Unix machines with the PPP-PAM module. My code is only the java engine, you must wrap your own code around it to actually use it.