Exemplo n.º 1
0
        public void CalculateX(string accountName, string password, bool calcB)
        {
            this.I = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), accountName));
            while (true)
            {
IL_A7:
                uint arg_8F_0 = 2553222655u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_8F_0 ^ 2695648094u)) % 3u)
                    {
                    case 0u:
                        goto IL_A7;

                    case 1u:
                    {
                        byte[]     data = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), SRP6a.smethod_6(this.I.ToHexString(), Module.smethod_33 <string>(1968828782u), SRP6a.smethod_5(password))));
                        BigInteger x    = this.MakeBigInteger(SRP6a.smethod_3(this.sha256, this.S.Combine(data)));
                        this.CalculateV(x, calcB);
                        arg_8F_0 = (num * 1788205373u ^ 735249050u);
                        continue;
                    }
                    }
                    return;
                }
            }
        }
Exemplo n.º 2
0
        public SRP6a(string salt, string accountName = "", string passwordVerifier = "")
        {
            while (true)
            {
IL_11A:
                uint arg_FA_0 = 1990870343u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_FA_0 ^ 1565948384u)) % 5u)
                    {
                    case 0u:
                        this.k   = this.MakeBigInteger(SRP6a.smethod_3(this.sha256, this.N.Combine(this.g)));
                        this.v   = this.MakeBigInteger(passwordVerifier.ToByteArray());
                        arg_FA_0 = (num * 10374198u ^ 3275431934u);
                        continue;

                    case 1u:
                        this.S = salt.ToByteArray();
                        this.g = new byte[]
                        {
                            2
                        };
                        this.BN  = this.MakeBigInteger(this.N);
                        this.gBN = this.MakeBigInteger(this.g);
                        arg_FA_0 = (num * 4125876422u ^ 2637048811u);
                        continue;

                    case 2u:
                    {
                        this.sha256 = SRP6a.smethod_0();
                        this.I      = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), accountName));
                        byte[] expr_3D = new byte[128];
                        SRP6a.smethod_4(expr_3D, fieldof(Framework.< PrivateImplementationDetails >.struct15_3).FieldHandle);
                        this.N   = expr_3D;
                        arg_FA_0 = (num * 2174447120u ^ 1530330669u);
                        continue;
                    }

                    case 3u:
                        goto IL_11A;
                    }
                    return;
                }
            }
        }
Exemplo n.º 3
0
        public void CalculateU(byte[] a)
        {
            this.A = this.MakeBigInteger(a);
            while (true)
            {
IL_5C:
                uint arg_44_0 = 1038568804u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_44_0 ^ 1653931647u)) % 3u)
                    {
                    case 0u:
                        goto IL_5C;

                    case 2u:
                        this.CalculateS(this.MakeBigInteger(SRP6a.smethod_3(this.sha256, a.Combine(this.B))));
                        arg_44_0 = (num * 3059919140u ^ 4120859160u);
                        continue;
                    }
                    return;
                }
            }
        }
Exemplo n.º 4
0
        public void CalculateClientM(byte[] a)
        {
            byte[] array = SRP6a.smethod_3(this.sha256, this.N);
            while (true)
            {
IL_140:
                uint arg_113_0 = 2564275220u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_113_0 ^ 3263938703u)) % 8u)
                    {
                    case 0u:
                        goto IL_140;

                    case 1u:
                    {
                        byte[] byte_ = array.Combine(SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), this.I.ToHexString()))).Combine(this.S).Combine(a).Combine(this.B).Combine(this.SessionKey);
                        this.ClientM = SRP6a.smethod_3(this.sha256, byte_);
                        arg_113_0    = (num * 1130404651u ^ 272827307u);
                        continue;
                    }

                    case 2u:
                    {
                        int num2;
                        arg_113_0 = ((num2 < array.Length) ? 2194615946u : 2393073750u);
                        continue;
                    }

                    case 3u:
                    {
                        byte[] array2 = SRP6a.smethod_3(this.sha256, this.g);
                        arg_113_0 = (num * 3484930294u ^ 4152190963u);
                        continue;
                    }

                    case 4u:
                    {
                        int num2;
                        num2++;
                        arg_113_0 = (num * 1293311391u ^ 2582903929u);
                        continue;
                    }

                    case 5u:
                    {
                        byte[] expr_33_cp_0 = array;
                        int    num2;
                        int    expr_33_cp_1 = num2;
                        byte[] array2;
                        expr_33_cp_0[expr_33_cp_1] ^= array2[num2];
                        arg_113_0 = 3974963915u;
                        continue;
                    }

                    case 6u:
                    {
                        int num2 = 0;
                        arg_113_0 = (num * 1672443058u ^ 2395775225u);
                        continue;
                    }
                    }
                    return;
                }
            }
        }