jPPPv3.0.1 Released

[NEW VERSION - jPPP on Google Code]

Updated version of my java implementation of PPP.

  • Fixed output to match Steve Gibson’s PPP.exe Version 3.0
  • Changed internal workings to base calculation upon the total offset
  • Allow operations by offset or card, column, row
  • Cleaned up in general

Download

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)
          
PPPengine(java.lang.String sequenceKeyIn, long offsetIn)
          

 

Method Summary
void advanceOffset()
          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.
int[] getAddress()
          Returns current card, column, and row in an array
long getOffset()
          Returns the passcode offset
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.
void setOffset(int cardIn, int columnIn, int rowIn)
          Set the offset for the current instance using the code address
void setOffset(long offsetIn)
          Set the offset

 

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 card

cardNumberIn – Starting PPP card

columnIn – Starting column

rowIn – Starting row



PPPengine

public PPPengine(java.lang.String sequenceKeyIn,
                 long offsetIn)
Parameters:

offsetIn – Long passcode offset

sequenceKeyIn – 64 Character key used to generate card

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



advanceOffset

public void advanceOffset()
Advances the current object to the next passcode.



getOffset

public long getOffset()
Returns the passcode offset

Returns:

passcode offset



setOffset

public void setOffset(int cardIn,
                      int columnIn,
                      int rowIn)
Set the offset for the current instance using the code address

Parameters:

cardIn

columnIn

rowIn



setOffset

public void setOffset(long offsetIn)
Set the offset

Parameters:

offsetIn – Long



getAddress

public int[] getAddress()
Returns current card, column, and row in an array

Returns:

address int[3]



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
  1. Kurt,

    I’m testing your 3.0.1 version. I find that I’m getting different results from your code and grc’s page, even though I’m using the same sequence key. Could that have to do with the passcode character set? Do the default alphabets not match?

    Example using Groovy with your latest code:

    groovy:000> skey = PPPengine.findSequenceKey(‘nowisthetime’)
    ===> 77f39930b9efa833c7e8e42f32f0daf73e8db1bf9cec387699b155ee5675ad4c
    groovy:000> e = new PPPengine(skey)
    ===> PPPengine@1b03c1a
    groovy:000> e.makePasscode()
    ===> 5e3m
    groovy:000> e.advanceOffset()
    ===> null
    groovy:000> e.getOffset()
    ===> 1
    groovy:000> e.makePasscode()
    ===> anbo
    groovy:000> e.advanceOffset()
    ===> null
    groovy:000> e.makePasscode()
    ===> B9Uv

    Using the same sequence key at https://www.grc.com/ppp.htm yields the first three passcodes of:
    +E#M jqt5 4HZx

    Why the difference? It seems critical that the passcodes match from both sources.

    Thanks for the code!

  1. December 21st, 2007