 (defn build-initiate-interior
   "This is the 368+M cryptographic box that's the real payload/Vouch+message portion of the Initiate pack"
   [{log-state ::log/state
+    inner-nonce-suffix ::specs/inner-i-nonce
+    :keys [::shared/work-area]
     :as this} msg outer-nonce-suffix]
   ;; Important detail: we can use up to 640 bytes that we've
   ;; received from the client/child.
   (let [msg-length (count msg)
         _ (assert (< 0 msg-length))
         tmplt (assoc-in K/vouch-wrapper [::K/child-message ::K/length] msg-length)
-        srvr-name (get-in this [::shared/my-keys ::specs/srvr-name])
-        _ (assert srvr-name)
-        inner-nonce-suffix (::state/inner-i-nonce this)
-        ^TweetNaclFast$Box$KeyPair long-pair (get-in this [::shared/my-keys ::shared/long-pair])
-        src {::K/client-long-term-key (.getPublicKey long-pair)
-             ::K/inner-i-nonce inner-nonce-suffix
-             ::K/inner-vouch (::state/vouch this)
-             ::specs/srvr-name srvr-name
-             ::K/child-message msg}
-        work-area (::shared/work-area this)
-        secret (get-in this [::state/shared-secrets ::state/client-short<->server-short])
-        log-state (log/info log-state
-                            ::build-initiate-interior
-                            "Encrypting\nFIXME: Do not log the shared secret!"
-                            {::source src
-                             ::inner-nonce-suffix (b-t/->string inner-nonce-suffix)
-                             ::shared-secret (b-t/->string secret)})]
-    {::crypto-box (crypto/build-crypto-box tmplt
-                                           src
-                                           (::shared/text work-area)
-                                           secret
-                                           K/initiate-nonce-prefix
-                                           outer-nonce-suffix)
-     ::log/state log-state}))
+        ;; This is actually ::K/server-name.
+        ;; Which doesn't make any sense, since it isn't a constant.
+        ;; FIXME: Make it sensible.
+        srvr-name (get-in this [::shared/my-keys ::specs/srvr-name])]
+    (if srvr-name
+      (let [^TweetNaclFast$Box$KeyPair long-pair (get-in this [::shared/my-keys ::shared/long-pair])
+            src {::K/client-long-term-key (.getPublicKey long-pair)
+                 ::specs/inner-i-nonce inner-nonce-suffix
+                 ::K/inner-vouch (::specs/vouch this)
+                 ::specs/srvr-name srvr-name
+                 ::K/child-message msg}
+            secret (get-in this [::state/shared-secrets ::state/client-short<->server-short])
+            log-state (log/info log-state
+                                ::build-initiate-interior
+                                "Encrypting\nFIXME: Do not log the shared secret!"
+                                {::source src
+                                 ::inner-nonce-suffix (b-t/->string inner-nonce-suffix)
+                                 ::shared-secret (b-t/->string secret)})]
+        {::crypto-box (crypto/build-crypto-box tmplt
+                                               src
+                                               (::shared/text work-area)
+                                               secret
+                                               K/initiate-nonce-prefix
+                                               outer-nonce-suffix)
+         ::log/state log-state})
+      {::log/state (log/warn log-state
+                             ::build-initiate-interior
+                             "Missing server name"
+                             (select-keys this [::shared/my-keys]))})))
 
 (s/fdef build-initiate-packet!
         :args (s/cat :this ::state/state
-                     :msg-bytes (s/and bytes?
+                     :msg-bytes (s/and ::specs/msg-bytes
                                        ;; Just be explicit about the
                                        ;; the legal incoming length.
                                        ;; This is mostly for the sake of

  ;; It would be very easy to just wait
  ;; for its minute key to definitely time out, though that seems
  ;; like a naive approach with a terrible user experience.
  [this]
  (let [{log-state ::log/state
         :keys [::log/logger]
         packet ::state/vouch} this
        log-state (log/flush-logs! logger log-state)
        this (assoc this ::log/state log-state)
        {log-state ::log/state
         deferred ::specs/deferred}
        ;; FIXME: Instead of this, have HELLO set up a partial or lexical closure
        ;; that we can use to send packets.
        ;; Honestly, most of what I'm passing along in here is overkill that
        ;; I set up for debugging.
        (state/do-send-packet this
                              (fn [success]
                                (log/flush-logs! logger
                                                 (log/info log-state
                                                           ::do-send-vouch
                                                           "Initiate packet sent.\nWaiting for 1st message"
                                                           {::success success}))
                                (state/final-wait this success))
                              (fn [failure]
                                ;; Extremely unlikely, but
                                ;; just for the sake of paranoia
                                (log/flush-logs! logger
                                                 (log/exception log-state
                                                                ;; Q: Am I absolutely positive that this will
                                                                ;; always be an exception?
                                                                ;; A: Even if it isn't the logger needs to be
                                                                ;; able to cope with other problems
                                                                failure
                                                                ::do-send-vouch
                                                                "Sending Initiate packet failed!"
                                                                {::problem failure}))
                                (throw (ex-info "Failed to send cookie->vouch response"
                                                (assoc this
                                                       :problem failure))))
                              (state/current-timeout this)
                              ::sending-vouch-timed-out
                              packet)]
    (assoc this
           ::log/state log-state
           ::specs/deferred deferred)))

(s/fdef build-inner-vouch
  :args (s/cat :this ::vouch-building-params)

            nonce-suffix (b-t/sub-byte-array working-nonce
                                             K/client-nonce-prefix-length)
            {:keys [::crypto-box]
             log-state ::log/state
             :as initiate-interior} (build-initiate-interior this msg nonce-suffix)]
        (if crypto-box
          (let [log-state (log/info log-state
                                    ::build-initiate-packet!
                                    "Stuffing crypto-box into Initiate packet"
                                    {::crypto-box (when crypto-box
                                                    (b-t/->string crypto-box))
                                     ::message-length (count crypto-box)})
                dscr (update-in K/initiate-packet-dscr
                                [::K/vouch-wrapper ::K/length]
                                +
                                (count msg))
                ^TweetNaclFast$Box$KeyPair short-pair (get-in this [::shared/my-keys ::shared/short-pair])
                fields #:frereth-cp.shared.constants{:prefix K/initiate-header
                                                     :srvr-xtn (::state/server-extension this)
                                                     :clnt-xtn (::shared/extension this)
                                                     :clnt-short-pk (.getPublicKey short-pair)
                                                     :cookie (get-in this [::state/server-security ::state/server-cookie])
                                                     :outer-i-nonce nonce-suffix
                                                     :vouch-wrapper crypto-box}]
            {::specs/byte-buf
             (serial/compose dscr
                             fields)
             ::log/state log-state})
          {::log/state (log/warn log-state
                                 ::build-initiate-packet!
                                 "Building initiate-interior failed to generate a crypto-box"
                                 {::problem (dissoc initiate-interior
                                                    ::log/state)})}))
      {::log/state log-state})))

(s/fdef do-send-vouch
        :args (s/cat :this ::state/state
                     :message ::specs/msg-bytes)
        :ret (s/merge ::state/state
                      (s/keys :req [::specs/deferred])))
(defn do-send-vouch
