public class Handshake
{
    public static final long MAGIC_NUMBER = 20201227;
    public static final int SUBJECT_NUMBER = 7;
    public static final int START_NUMBER = 1;

    public Handshake (boolean debug)
    {
        _debug = debug;
    }
    
    public boolean encryptionKey (int cardPublicKey, int doorPublicKey)
    {
        // fill in the blanks...

        return false;
    }

    private boolean _debug;
}
@@ -70,16 +70,17 @@
 20201227
+L
 ;%0A    pu
@@ -97,19 +97,20 @@
 c final 
-int
+long
  SUBJECT
@@ -120,16 +120,17 @@
 MBER = 7
+L
 ;%0A    pu
@@ -147,19 +147,20 @@
 c final 
-int
+long
  START_N
@@ -168,16 +168,17 @@
 MBER = 1
+L
 ;%0A%0A    p
@@ -261,23 +261,20 @@
  public 
-boolean
+long
  encrypt
@@ -281,19 +281,20 @@
 ionKey (
-int
+long
  cardPub
@@ -305,65 +305,525 @@
 ey, 
-int doorPublicKey)%0A    %7B%0A        // fill in the blanks...
+long doorPublicKey)%0A    %7B%0A        long count = loopSize(doorPublicKey);%0A        long curr = START_NUMBER;%0A%0A        for (int i = 0; i %3C count; i++)%0A        %7B%0A            curr *= cardPublicKey;%0A            curr %25= MAGIC_NUMBER;%0A        %7D%0A%0A        return curr;%0A    %7D%0A%0A    private long loopSize (long publicKey)%0A    %7B%0A        long curr = START_NUMBER;%0A        long iter = 0;%0A%0A        while (value != publicKey)%0A        %7B%0A            curr *= SUBJECT_NUMBER;%0A            curr %25= MAGIC_NUMBER;%0A%0A            iter++;%0A        %7D
 %0A%0A  
@@ -839,13 +839,12 @@
 urn 
-false
+iter
 ;%0A  

Update Handshake.java