java/remoteprovisioning/CryptoUtil.java [147:170]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      return computeHkdf("HmacSha256", keyMaterial, null /* salt */, context, 32 /* size */);
    } catch (NoSuchAlgorithmException e) {
      throw new CryptoException(
          "Missing ECDH algorithm provider", e, CryptoException.NO_SUCH_ALGORITHM);
    } catch (InvalidKeyException e) {
      throw new CryptoException("Derived ECDH key is malformed", e, CryptoException.MALFORMED_KEY);
    }
  }

  /*
   * Derives the receiver key for an ECDH key agreement. The receiver key is generated by
   * including the hash of the other party's public key first, followed by the caller's public
   * key. This is done so that the two sides don't have to agree to partition the
   * nonce space as they would have to do with only a single AES key derived from the ECDH key
   * exchange. It also has the added benefit of not allowing the messages to be replayed to the
   * party that sent them.
   *
   * @param keyPair the caller's X25519 public/private key pair
   *
   * @param otherPub the public key of the other party's X25519 key pair
   *
   * @return byte[] the AES-256 receiver key
   */
  public static byte[] deriveSharedKeyReceive(
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/remoteprovisioning/CryptoUtil.java [180:189]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      return computeHkdf("HmacSha256", keyMaterial, null /* salt */, context, 32 /* size */);
    } catch (NoSuchAlgorithmException e) {
      throw new CryptoException(
          "Missing ECDH algorithm provider", e, CryptoException.NO_SUCH_ALGORITHM);
    } catch (InvalidKeyException e) {
      throw new CryptoException("Derived ECDH key is malformed", e, CryptoException.MALFORMED_KEY);
    }
  }

  public static byte[] deriveSharedKeyReceive(
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



