private List<ECKeyPair> getKeyPairs() {
    List<ECKeyPair> keyPairs = new ArrayList<ECKeyPair>();
    Cursor cursor =
        mContext
            .getContentResolver()
            .query(CMAccountProvider.ECDH_CONTENT_URI, null, null, null, null);
    while (cursor.moveToNext()) {
      String publicKeyHex =
          cursor.getString(cursor.getColumnIndex(CMAccountProvider.ECDHKeyStoreColumns.PUBLIC));
      String keyId =
          cursor.getString(cursor.getColumnIndex(CMAccountProvider.ECDHKeyStoreColumns.KEY_ID));

      ECPublicKeyParameters publicKey = EncryptionUtils.ECDH.getPublicKey(publicKeyHex);
      ECKeyPair keyPair = new ECKeyPair(publicKey, keyId);
      keyPairs.add(keyPair);
    }
    cursor.close();
    return keyPairs;
  }
 private ECKeyPair generateKeyPair() {
   ECKeyPair keyPair = EncryptionUtils.ECDH.generateKeyPair();
   return keyPair;
 }