89 lines
4.1 KiB
Java
89 lines
4.1 KiB
Java
|
package com.google.android.gms.internal.p002firebaseauthapi;
|
||
|
|
||
|
import java.security.GeneralSecurityException;
|
||
|
import java.security.KeyPair;
|
||
|
import java.security.interfaces.ECPrivateKey;
|
||
|
import java.security.interfaces.ECPublicKey;
|
||
|
import java.util.Collections;
|
||
|
import java.util.HashMap;
|
||
|
import java.util.Map;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class zzfb extends zzgb {
|
||
|
final zzfc zza;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
public zzfb(zzfc zzfcVar, Class cls) {
|
||
|
super(cls);
|
||
|
this.zza = zzfcVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzgb
|
||
|
public final /* synthetic */ zzaek zza(zzaek zzaekVar) throws GeneralSecurityException {
|
||
|
byte[] zza;
|
||
|
byte[] zzb;
|
||
|
zzne zzneVar = (zzne) zzaekVar;
|
||
|
int zzf = zzneVar.zzd().zzf() - 2;
|
||
|
if (zzf == 1) {
|
||
|
zza = zzqq.zza(32);
|
||
|
zza[0] = (byte) (zza[0] | 7);
|
||
|
int i = zza[31] & 63;
|
||
|
zza[31] = (byte) i;
|
||
|
zza[31] = (byte) (i | 128);
|
||
|
zzb = zzqt.zzb(zza);
|
||
|
} else if (zzf == 2 || zzf == 3 || zzf == 4) {
|
||
|
int zzg = zzff.zzg(zzneVar.zzd().zzf());
|
||
|
KeyPair zzd = zzpx.zzd(zzpx.zzl(zzg));
|
||
|
zzb = zzpx.zzm(zzg, 1, ((ECPublicKey) zzd.getPublic()).getW());
|
||
|
zza = ((ECPrivateKey) zzd.getPrivate()).getS().toByteArray();
|
||
|
} else {
|
||
|
throw new GeneralSecurityException("Invalid KEM");
|
||
|
}
|
||
|
zznm zzc = zznn.zzc();
|
||
|
zzc.zzc(0);
|
||
|
zzc.zza(zzneVar.zzd());
|
||
|
zzc.zzb(zzacc.zzn(zzb));
|
||
|
zznn zznnVar = (zznn) zzc.zzi();
|
||
|
zznj zzb2 = zznk.zzb();
|
||
|
zzb2.zzc(0);
|
||
|
zzb2.zzb(zznnVar);
|
||
|
zzb2.zza(zzacc.zzn(zza));
|
||
|
return (zznk) zzb2.zzi();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzgb
|
||
|
public final /* synthetic */ zzaek zzb(zzacc zzaccVar) throws zzadn {
|
||
|
return zzne.zzc(zzaccVar, zzacs.zza());
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzgb
|
||
|
public final Map zzc() {
|
||
|
HashMap hashMap = new HashMap();
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM", zzfc.zzh(3, 3, 3, 1));
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_128_GCM_RAW", zzfc.zzh(3, 3, 3, 3));
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM", zzfc.zzh(3, 3, 4, 1));
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_AES_256_GCM_RAW", zzfc.zzh(3, 3, 4, 3));
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305", zzfc.zzh(3, 3, 5, 1));
|
||
|
hashMap.put("DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305_RAW", zzfc.zzh(3, 3, 5, 3));
|
||
|
hashMap.put("DHKEM_P256_HKDF_SHA256_HKDF_SHA256_AES_128_GCM", zzfc.zzh(4, 3, 3, 1));
|
||
|
hashMap.put("DHKEM_P256_HKDF_SHA256_HKDF_SHA256_AES_128_GCM_RAW", zzfc.zzh(4, 3, 3, 3));
|
||
|
hashMap.put("DHKEM_P256_HKDF_SHA256_HKDF_SHA256_AES_256_GCM", zzfc.zzh(4, 3, 4, 1));
|
||
|
hashMap.put("DHKEM_P256_HKDF_SHA256_HKDF_SHA256_AES_256_GCM_RAW", zzfc.zzh(4, 3, 4, 3));
|
||
|
hashMap.put("DHKEM_P384_HKDF_SHA384_HKDF_SHA384_AES_128_GCM", zzfc.zzh(5, 4, 3, 1));
|
||
|
hashMap.put("DHKEM_P384_HKDF_SHA384_HKDF_SHA384_AES_128_GCM_RAW", zzfc.zzh(5, 4, 3, 3));
|
||
|
hashMap.put("DHKEM_P384_HKDF_SHA384_HKDF_SHA384_AES_256_GCM", zzfc.zzh(5, 4, 4, 1));
|
||
|
hashMap.put("DHKEM_P384_HKDF_SHA384_HKDF_SHA384_AES_256_GCM_RAW", zzfc.zzh(5, 4, 4, 3));
|
||
|
hashMap.put("DHKEM_P521_HKDF_SHA512_HKDF_SHA512_AES_128_GCM", zzfc.zzh(6, 5, 3, 1));
|
||
|
hashMap.put("DHKEM_P521_HKDF_SHA512_HKDF_SHA512_AES_128_GCM_RAW", zzfc.zzh(6, 5, 3, 3));
|
||
|
hashMap.put("DHKEM_P521_HKDF_SHA512_HKDF_SHA512_AES_256_GCM", zzfc.zzh(6, 5, 4, 1));
|
||
|
hashMap.put("DHKEM_P521_HKDF_SHA512_HKDF_SHA512_AES_256_GCM_RAW", zzfc.zzh(6, 5, 4, 3));
|
||
|
return Collections.unmodifiableMap(hashMap);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzgb
|
||
|
public final /* synthetic */ void zzd(zzaek zzaekVar) throws GeneralSecurityException {
|
||
|
zzff.zza(((zzne) zzaekVar).zzd());
|
||
|
}
|
||
|
}
|