Info Call to Crypto API

Description

List of all calls to cryptographic methods.

Recommendation

Do not use insecure or weak cryptographic algorithms. For example, the Data Encryption Standard (DES) encryption algorithm is considered highly insecure

Do not use Object.equals() to compare cryptographic keys

Cryptographic keys should never be serialized

Technical details

Method com.google.android.gms.internal.zzdfo.zza() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected final varargs com.google.android.gms.internal.zzdij zza(com.google.android.gms.internal.zzczu p8, com.google.android.gms.internal.zzdij[] p9)
    {
        String v0_12;
        com.google.android.gms.common.internal.zzbq.checkArgument(1);
        if (p9.length < 3) {
            v0_12 = 0;
        } else {
            v0_12 = 1;
        }
        String v0_5;
        com.google.android.gms.common.internal.zzbq.checkArgument(v0_12);
        String v2_1 = com.google.android.gms.internal.zzdbj.zzd(p9[0]);
        int v3_0 = com.google.android.gms.internal.zzdbj.zzd(p9[1]);
        String v4 = com.google.android.gms.internal.zzdbj.zzd(p9[2]);
        if (p9.length >= 4) {
            v0_5 = com.google.android.gms.internal.zzdbj.zzd(p9[3]);
        } else {
            v0_5 = "AES/CBC/NoPadding";
        }
        javax.crypto.spec.SecretKeySpec v5_2 = com.google.android.gms.internal.zzdfo.zzkql.matcher(v0_5);
        if (v5_2.matches()) {
            try {
                String v0_8 = com.google.android.gms.internal.zzdfo.zza(javax.crypto.Cipher.getInstance(v0_5), v2_1, new javax.crypto.spec.SecretKeySpec(v3_0.getBytes(), v5_2.group(1)), new javax.crypto.spec.IvParameterSpec(v4.getBytes()));
                return new com.google.android.gms.internal.zzdiv(v0_8);
            } catch (RuntimeException v1) {
                String v0_9 = String.valueOf(v0_8);
                if (v0_9.length() == 0) {
                    String v0_11 = new String("Encrypt: invalid transformation:");
                } else {
                    v0_11 = "Encrypt: invalid transformation:".concat(v0_9);
                }
                throw new RuntimeException(v0_11);
            } catch (RuntimeException v1) {
            }
        } else {
            String v0_15;
            String v0_13 = String.valueOf(v0_5);
            if (v0_13.length() == 0) {
                v0_15 = new String("Encrypt: invalid transformation:");
            } else {
                v0_15 = "Encrypt: invalid transformation:".concat(v0_13);
            }
            throw new RuntimeException(v0_15);
        }
    }

Method com.google.android.gms.internal.zzdfo.zza() calling method javax.crypto.Cipher.getInstance()


    protected final varargs com.google.android.gms.internal.zzdij zza(com.google.android.gms.internal.zzczu p8, com.google.android.gms.internal.zzdij[] p9)
    {
        String v0_12;
        com.google.android.gms.common.internal.zzbq.checkArgument(1);
        if (p9.length < 3) {
            v0_12 = 0;
        } else {
            v0_12 = 1;
        }
        String v0_5;
        com.google.android.gms.common.internal.zzbq.checkArgument(v0_12);
        String v2_1 = com.google.android.gms.internal.zzdbj.zzd(p9[0]);
        int v3_0 = com.google.android.gms.internal.zzdbj.zzd(p9[1]);
        String v4 = com.google.android.gms.internal.zzdbj.zzd(p9[2]);
        if (p9.length >= 4) {
            v0_5 = com.google.android.gms.internal.zzdbj.zzd(p9[3]);
        } else {
            v0_5 = "AES/CBC/NoPadding";
        }
        javax.crypto.spec.SecretKeySpec v5_2 = com.google.android.gms.internal.zzdfo.zzkql.matcher(v0_5);
        if (v5_2.matches()) {
            try {
                String v0_8 = com.google.android.gms.internal.zzdfo.zza(javax.crypto.Cipher.getInstance(v0_5), v2_1, new javax.crypto.spec.SecretKeySpec(v3_0.getBytes(), v5_2.group(1)), new javax.crypto.spec.IvParameterSpec(v4.getBytes()));
                return new com.google.android.gms.internal.zzdiv(v0_8);
            } catch (RuntimeException v1) {
                String v0_9 = String.valueOf(v0_8);
                if (v0_9.length() == 0) {
                    String v0_11 = new String("Encrypt: invalid transformation:");
                } else {
                    v0_11 = "Encrypt: invalid transformation:".concat(v0_9);
                }
                throw new RuntimeException(v0_11);
            } catch (RuntimeException v1) {
            }
        } else {
            String v0_15;
            String v0_13 = String.valueOf(v0_5);
            if (v0_13.length() == 0) {
                v0_15 = new String("Encrypt: invalid transformation:");
            } else {
                v0_15 = "Encrypt: invalid transformation:".concat(v0_13);
            }
            throw new RuntimeException(v0_15);
        }
    }

Method com.google.android.gms.internal.zzdfo.zza() calling method javax.crypto.Cipher.doFinal()


    private static String zza(javax.crypto.Cipher p4, String p5, javax.crypto.spec.SecretKeySpec p6, javax.crypto.spec.IvParameterSpec p7)
    {
        if ((p5 != null) && (p5.length() != 0)) {
            try {
                p4.init(1, p6, p7);
                return com.google.android.gms.internal.zzcxy.zzk(p4.doFinal(p5.getBytes()));
            } catch (String v0_1) {
                String v0_3 = String.valueOf(v0_1.getMessage());
                if (v0_3.length() == 0) {
                    String v0_6 = new String("Encrypt: ");
                } else {
                    v0_6 = "Encrypt: ".concat(v0_3);
                }
                throw new RuntimeException(v0_6);
            }
        } else {
            throw new RuntimeException("Encrypt: empty input string");
        }
    }

Method okio.HashingSource.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private HashingSource(okio.Source p5, okio.ByteString p6, String p7)
    {
        super(p5);
        try {
            super.mac = javax.crypto.Mac.getInstance(p7);
            super.mac.init(new javax.crypto.spec.SecretKeySpec(p6.toByteArray(), p7));
            super.messageDigest = 0;
            return;
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0) {
            throw new IllegalArgumentException(v0);
        }
    }

Method okio.HashingSink.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private HashingSink(okio.Sink p5, okio.ByteString p6, String p7)
    {
        super(p5);
        try {
            super.mac = javax.crypto.Mac.getInstance(p7);
            super.mac.init(new javax.crypto.spec.SecretKeySpec(p6.toByteArray(), p7));
            super.messageDigest = 0;
            return;
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0) {
            throw new IllegalArgumentException(v0);
        }
    }

Method okio.Buffer.hmac() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private okio.ByteString hmac(String p8, okio.ByteString p9)
    {
        try {
            javax.crypto.Mac v1 = javax.crypto.Mac.getInstance(p8);
            v1.init(new javax.crypto.spec.SecretKeySpec(p9.toByteArray(), p8));
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0) {
            throw new IllegalArgumentException(v0);
        }
        if (this.head != null) {
            v1.update(this.head.data, this.head.pos, (this.head.limit - this.head.pos));
            okio.Segment v2 = this.head.next;
            while (v2 != this.head) {
                v1.update(v2.data, v2.pos, (v2.limit - v2.pos));
                v2 = v2.next;
            }
        }
        return okio.ByteString.of(v1.doFinal());
    }

Method com.google.android.gms.internal.zzdfo.zza() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected final varargs com.google.android.gms.internal.zzdij zza(com.google.android.gms.internal.zzczu p8, com.google.android.gms.internal.zzdij[] p9)
    {
        String v0_12;
        com.google.android.gms.common.internal.zzbq.checkArgument(1);
        if (p9.length < 3) {
            v0_12 = 0;
        } else {
            v0_12 = 1;
        }
        String v0_5;
        com.google.android.gms.common.internal.zzbq.checkArgument(v0_12);
        String v2_1 = com.google.android.gms.internal.zzdbj.zzd(p9[0]);
        int v3_0 = com.google.android.gms.internal.zzdbj.zzd(p9[1]);
        String v4 = com.google.android.gms.internal.zzdbj.zzd(p9[2]);
        if (p9.length >= 4) {
            v0_5 = com.google.android.gms.internal.zzdbj.zzd(p9[3]);
        } else {
            v0_5 = "AES/CBC/NoPadding";
        }
        javax.crypto.spec.SecretKeySpec v5_2 = com.google.android.gms.internal.zzdfo.zzkql.matcher(v0_5);
        if (v5_2.matches()) {
            try {
                String v0_8 = com.google.android.gms.internal.zzdfo.zza(javax.crypto.Cipher.getInstance(v0_5), v2_1, new javax.crypto.spec.SecretKeySpec(v3_0.getBytes(), v5_2.group(1)), new javax.crypto.spec.IvParameterSpec(v4.getBytes()));
                return new com.google.android.gms.internal.zzdiv(v0_8);
            } catch (RuntimeException v1) {
                String v0_9 = String.valueOf(v0_8);
                if (v0_9.length() == 0) {
                    String v0_11 = new String("Encrypt: invalid transformation:");
                } else {
                    v0_11 = "Encrypt: invalid transformation:".concat(v0_9);
                }
                throw new RuntimeException(v0_11);
            } catch (RuntimeException v1) {
            }
        } else {
            String v0_15;
            String v0_13 = String.valueOf(v0_5);
            if (v0_13.length() == 0) {
                v0_15 = new String("Encrypt: invalid transformation:");
            } else {
                v0_15 = "Encrypt: invalid transformation:".concat(v0_13);
            }
            throw new RuntimeException(v0_15);
        }
    }

Method okio.ByteString.hmac() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private okio.ByteString hmac(String p5, okio.ByteString p6)
    {
        try {
            javax.crypto.Mac v1 = javax.crypto.Mac.getInstance(p5);
            v1.init(new javax.crypto.spec.SecretKeySpec(p6.toByteArray(), p5));
            return okio.ByteString.of(v1.doFinal(this.data));
        } catch (java.security.InvalidKeyException v0_1) {
            throw new AssertionError(v0_1);
        } catch (java.security.InvalidKeyException v0_0) {
            throw new IllegalArgumentException(v0_0);
        }
    }