package org.bouncycastle.crypto.constraints;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class ConstraintUtils {
    public static int a(java.math.BigInteger bigInteger) {
        return c(bigInteger.bitLength());
    }

    public static int b(org.bouncycastle.math.ec.ECCurve eCCurve) {
        int iW = (eCCurve.w() + 1) / 2;
        if (iW > 256) {
            return 256;
        }
        return iW;
    }

    public static int c(int i) {
        if (i < 2048) {
            return i >= 1024 ? 80 : 20;
        }
        if (i < 3072) {
            return 112;
        }
        if (i >= 7680) {
            return i >= 15360 ? 256 : 192;
        }
        return 128;
    }
}
