code: func hkdf(salt, ikm, info []byte, length int) []byte {
  	// HMAC length for SHA256 is 32 bytes, so that is the maximum result length.
  	if length > 32 {
  		panic("Can only produce HKDF outputs up to 32 bytes long")
  	}
  
  	// Extract
  	mac := hmac.New(sha256.New, salt)
  	mac.Write(ikm)
  	prk := mac.Sum(nil)
  
  	// Expand
  	mac = hmac.New(sha256.New, prk)
  	mac.Write(info)
  	mac.Write([]byte{1})
  	return mac.Sum(nil)[0:length]
  }
docs: // HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
  //
  // This is used to derive a secure encryption key from a mostly-secure shared
  // secret.
  //
  // This is a partial implementation of HKDF tailored to our specific purposes.
  // In particular, for us the value of N will always be 1, and thus T always
  // equals HMAC-Hash(PRK, info | 0x01). This is true because the maximum output
  // length we need/allow is 32.
  //
  // See https://www.rfc-editor.org/rfc/rfc5869.txt