Skip to content

Commit dab6197

Browse files
committed
RatchetTest: more mods to test PQ, works
1 parent cc4a451 commit dab6197

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

java-utils/RatchetTest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,9 +604,11 @@ private void connect() throws Exception {
604604
System.out.println("Generated send state for A->B: " + sender);
605605
System.out.println("Generated rcvr state for B->A: " + rcvr);
606606

607-
System.out.println("Reading msg 2 payload, length " + (len - 56));
608-
tmp = new byte[len - 56];
609-
System.arraycopy(itmp, 56, tmp, 0, len - 56);
607+
// tmplen + 8 = 8 + 48 + hybrid + 16
608+
int p1len = tmplen + 8;
609+
System.out.println("Reading msg 2 payload, length " + (len - p1len));
610+
tmp = new byte[len - p1len];
611+
System.arraycopy(itmp, p1len, tmp, 0, len - p1len);
610612
System.out.println("Got encrypted payload from Bob:");
611613
System.out.println(HexDump.dump(tmp));
612614

@@ -1067,7 +1069,7 @@ private void runConnection(Socket socket, byte[] s, byte[] inithash, byte[] priv
10671069
}
10681070

10691071
System.out.println("msg 2 part 1 complete");
1070-
System.out.println("read msg 2, now calling split()");
1072+
System.out.println("wrote msg 2 part 1, now calling split()");
10711073

10721074

10731075
// data phase KDF

0 commit comments

Comments
 (0)