### Question:
OneRttAEAD { public static AEAD create( final byte[] handshakeSecret, final byte[] handshakeHash, final boolean isClient) { final byte[] derivedSecret = HKDF.expandLabel(handshakeSecret, DERIVED, HKDF.EMPTY_HASH, 32); final byte[] masterSecret = HKDF.hkdf.extract(derivedSecret, ZEROS); final byte[] clientApplicationTrafficSecret = HKDF.expandLabel(masterSecret, CLIENT_APPLICATION_TRAFFIC_SECRET, handshakeHash, 32); final byte[] serverApplicationTrafficSecret = HKDF.expandLabel(masterSecret, SERVER_APPLICATION_TRAFFIC_SECRET, handshakeHash, 32); final byte[] clientApplicationKey = HKDF.expandLabel(clientApplicationTrafficSecret, KEY, EMPTY, 16); final byte[] serverApplicationKey = HKDF.expandLabel(serverApplicationTrafficSecret, KEY, EMPTY, 16); final byte[] clientApplicationIV = HKDF.expandLabel(clientApplicationTrafficSecret, IV, EMPTY, 12); final byte[] serverApplicationIV = HKDF.expandLabel(serverApplicationTrafficSecret, IV, EMPTY, 12); final byte[] clientPnKey = HKDF.expandLabel(clientApplicationTrafficSecret, HP_KEY, EMPTY, 16); final byte[] serverPnKey = HKDF.expandLabel(serverApplicationTrafficSecret, HP_KEY, EMPTY, 16); if (isClient) { return new AEAD( clientApplicationKey, serverApplicationKey, clientApplicationIV, serverApplicationIV, clientPnKey, serverPnKey); } else { return new AEAD( serverApplicationKey, clientApplicationKey, serverApplicationIV, clientApplicationIV, serverPnKey, clientPnKey); } }  static AEAD create(
      final byte[] handshakeSecret, final byte[] handshakeHash, final boolean isClient);  }### Answer:
@Test public void knownTls() { final byte[] handshakeSecret = Hex.dehex("fb9fc80689b3a5d02c33243bf69a1b1b20705588a794304a6e7120155edf149a"); final byte[] handshakeHash = Hex.dehex("22844b930e5e0a59a09d5ac35fc032fc91163b193874a265236e568077378d8b"); final AEAD aead = OneRttAEAD.create(handshakeSecret, handshakeHash, true); assertEquals("3eb3fe82f5ac8e55458068f6f09a0e07", hex(aead.getMyKey())); assertEquals("e285f91ba60eae359d767af707710e45", hex(aead.getOtherKey())); assertEquals("fb51b454f6e2d176ae835d77", hex(aead.getMyIV())); assertEquals("1f3f0add9b67d2c388143e44", hex(aead.getOtherIV())); }