code: private HBCIMsgStatus doDialogInit() {
          HBCIMsgStatus msgStatus = new HBCIMsgStatus();
  
          try {
              log.debug(HBCIUtils.getLocMsg("STATUS_DIALOG_INIT"));
              passport.getCallback().status(HBCICallback.STATUS_DIALOG_INIT, null);
  
              Message message = MessageFactory.createDialogInit("DialogInit", null, passport);
              msgStatus = kernel.rawDoIt(message, HBCIKernel.SIGNIT, HBCIKernel.CRYPTIT);
  
              passport.postInitResponseHook(msgStatus);
  
              HashMap<String, String> result = msgStatus.getData();
              if (msgStatus.isOK()) {
                  HBCIInstitute inst = new HBCIInstitute(kernel, passport);
                  inst.updateBPD(result);
                  inst.extractKeys(result);
  
                  HBCIUser user = new HBCIUser(kernel, passport);
                  user.updateUPD(result);
  
                  msgnum = 2;
                  dialogid = result.get("MsgHead.dialogid");
                  log.debug("dialog-id set to " + dialogid);
  
                  HBCIInstMessage msg;
                  for (int i = 0; true; i++) {
                      try {
                          String header = HBCIUtils.withCounter("KIMsg", i);
                          msg = new HBCIInstMessage(result, header);
                      } catch (Exception e) {
                          break;
                      }
                      passport.getCallback().callback(
                          HBCICallback.HAVE_INST_MSG,
                          msg.toString(),
                          HBCICallback.TYPE_NONE,
                          new StringBuilder());
                  }
              }
  
              passport.getCallback().status(HBCICallback.STATUS_DIALOG_INIT_DONE, new Object[]{msgStatus, dialogid});
          } catch (Exception e) {
              msgStatus.addException(e);
          }
  
          return msgStatus;
      }
docs: Processing the DialogInit stage and updating institute and user data from the server
  (mid-level API).
  <p>
  This method processes the dialog initialization stage of an HBCIDialog. It creates
  a new rawMsg in the kernel and processes it. The return values will be
  passed to appropriate methods in the @c institute and @c user objects to
  update their internal state with the data received from the institute.