code: protected int getDHOffset1(byte[] handshake, int bufferOffset) {
          bufferOffset += 1532;
          int offset = handshake[bufferOffset] & 0xff; // & 0x0ff;
          bufferOffset++;
          offset += handshake[bufferOffset] & 0xff;
          bufferOffset++;
          offset += handshake[bufferOffset] & 0xff;
          bufferOffset++;
          offset += handshake[bufferOffset] & 0xff;
          int res = (offset % 632) + 772;
          if (res + KEY_LENGTH > 1531) {
              log.error("Invalid DH offset");
          }
          return res;
      }
docs: Returns the DH byte offset.
  
  @param handshake handshake sequence
  @param bufferOffset buffer offset
  @return dh offset