diff --git a/app/src/main/java/com/beemdevelopment/aegis/crypto/CryptoUtils.java b/app/src/main/java/com/beemdevelopment/aegis/crypto/CryptoUtils.java index 6ca2dc7e..20621e56 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/crypto/CryptoUtils.java +++ b/app/src/main/java/com/beemdevelopment/aegis/crypto/CryptoUtils.java @@ -3,7 +3,6 @@ package com.beemdevelopment.aegis.crypto; import android.os.Build; import org.bouncycastle.crypto.generators.SCrypt; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -13,9 +12,7 @@ import java.nio.charset.StandardCharsets; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; -import java.security.Provider; import java.security.SecureRandom; -import java.security.Security; import java.security.spec.AlgorithmParameterSpec; import java.util.Arrays; @@ -39,15 +36,6 @@ public class CryptoUtils { public static final int CRYPTO_SCRYPT_r = 8; public static final int CRYPTO_SCRYPT_p = 1; - // replace the BC provider from Android with the one bundled with the app - static { - final Provider provider = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME); - if (provider != null && !provider.getClass().equals(BouncyCastleProvider.class)) { - Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); - Security.addProvider(new BouncyCastleProvider()); - } - } - public static SecretKey deriveKey(byte[] input, SCryptParameters params) { byte[] keyBytes = SCrypt.generate(input, params.getSalt(), params.getN(), params.getR(), params.getP(), CRYPTO_AEAD_KEY_SIZE); return new SecretKeySpec(keyBytes, 0, keyBytes.length, "AES"); diff --git a/app/src/main/res/raw/notices.xml b/app/src/main/res/raw/notices.xml index 2ea9edaa..d6172340 100644 --- a/app/src/main/res/raw/notices.xml +++ b/app/src/main/res/raw/notices.xml @@ -31,10 +31,10 @@ MIT License - Spongycastle - https://github.com/rtyley/spongycastle/ - Copyright (c) 2000-2017 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) - Apache Software License 2.0 + Bouncy Castle + https://www.bouncycastle.org/ + Copyright (c) 2000-2019 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) + MIT License CircleImageView