# `SSL.Crypto.TLS12KeySchedule`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v0.16.7/apps/ex_ssl/lib/ssl/crypto/tls12_key_schedule.ex#L1)

Pure TLS 1.2 PRF and Extended Master Secret derivation for the bounded ECDHE-GCM subset.

# `derive`

```elixir
@spec derive(term(), binary(), binary(), binary(), binary()) ::
  {:ok,
   %{
     master_secret: binary(),
     read_state: SSL.Protocol.TLS12Record.t(),
     write_state: SSL.Protocol.TLS12Record.t()
   }}
  | {:error, term()}
```

# `finished`

```elixir
@spec finished(term(), binary(), :client | :server, binary()) ::
  {:ok, &lt;&lt;_::96&gt;&gt;} | {:error, term()}
```

# `prf`

```elixir
@spec prf(:sha256 | :sha384, binary(), binary(), binary(), non_neg_integer()) ::
  {:ok, binary()} | {:error, term()}
```

# `suite`

```elixir
@spec suite(term()) ::
  {:error, {:unsupported_cipher_suite, term()}}
  | {:ok,
     %{
       :id =&gt; term(),
       :key_exchange =&gt; :ecdsa | :rsa,
       :version =&gt; 771,
       optional(term()) =&gt; term()
     }}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
