# Description of Figure The KeyAgreement Class

This figure is divided into halves by a dashed line. The top half is labeled Alice, and the bottom half is labeled Bob. The figure consists of boxes labeled as follows:

- These boxes are in Alice's half:
- Key: This box contains a box labeled Alice's Private
- Key: This box contains a box labeled Bob's Public
- Key Agreement (DH)
- Bytes: This box has another label, Bytes

- These boxes are in Bob's half:
- Key: This box contains a box labeled Bob's Private
- Key: This box contains a box labeled Alice's Public
- Key Agreement (DH)
- Bytes: This box has another label, Bytes

Labeled arrows connect these boxes:

- These arrows are in Alice's half:
`init()`

: From Alice's Private Key to Key Agreement (DH)`doPhase()`

: From Bob's Public Key to Key Agreement (DH)`generateSecret()`

: From Key Agreement (DH) to Bytes

- These arrows are in Bob's half:
`init()`

: From Bob's Private Key to Key Agreement (DH)`doPhase()`

: From Alice's Public Key to Key Agreement (DH)`generateSecret()`

: From Key Agreement (DH) to Bytes

A double-headed arrow joins the Bytes boxes in Alice's and Bob's halves. This arrow is labeled "Should be the same."

`init()`

: From key length to Key Generator (AES)`init()`

: From AlgorithmParameterSpec to Key Generator (AES)`generateKey()`

: From Key Generator (AES) to Secret Pair