689 lines
31 KiB
C#
689 lines
31 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Endo;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Field;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC
|
|
{
|
|
// Token: 0x02001ACD RID: 6861
|
|
[Token(Token = "0x2001ACD")]
|
|
public class ECAlgorithms
|
|
{
|
|
// Token: 0x0600A3E4 RID: 41956 RVA: 0x0022C29C File Offset: 0x0022A49C
|
|
[Token(Token = "0x600A3E4")]
|
|
[Address(RVA = "0x7D2D20", Offset = "0x7D1D20", VA = "0x1807D2D20")]
|
|
public static bool IsF2mCurve(ECCurve c)
|
|
{
|
|
ECPoint infinity = c.Infinity;
|
|
if (infinity > (ulong)1L)
|
|
{
|
|
int num = 0;
|
|
if (num < infinity)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3E5 RID: 41957 RVA: 0x0022C2D0 File Offset: 0x0022A4D0
|
|
[Token(Token = "0x600A3E5")]
|
|
[Address(RVA = "0x7D2E80", Offset = "0x7D1E80", VA = "0x1807D2E80")]
|
|
public static bool IsF2mField(IFiniteField field)
|
|
{
|
|
int num = 0;
|
|
if (num < field)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
|
|
// Token: 0x0600A3E6 RID: 41958 RVA: 0x0022C2F4 File Offset: 0x0022A4F4
|
|
[Token(Token = "0x600A3E6")]
|
|
[Address(RVA = "0x7D2FC0", Offset = "0x7D1FC0", VA = "0x1807D2FC0")]
|
|
public static bool IsFpCurve(ECCurve c)
|
|
{
|
|
return c.Infinity == (ulong)1L;
|
|
}
|
|
|
|
// Token: 0x0600A3E7 RID: 41959 RVA: 0x0022C314 File Offset: 0x0022A514
|
|
[Token(Token = "0x600A3E7")]
|
|
[Address(RVA = "0x7D3030", Offset = "0x7D2030", VA = "0x1807D3030")]
|
|
public static bool IsFpField(IFiniteField field)
|
|
{
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
|
|
// Token: 0x0600A3E8 RID: 41960 RVA: 0x0022C328 File Offset: 0x0022A528
|
|
[Token(Token = "0x600A3E8")]
|
|
[Address(RVA = "0x7D3640", Offset = "0x7D2640", VA = "0x1807D3640")]
|
|
public static ECPoint SumOfMultiplies(ECPoint[] ps, BigInteger[] ks)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A3E8)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECAlgorithms::SumOfMultiplies(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint[],BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_A6:
|
|
stloc:ArgumentException(var_13_B0, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("point and scalar arrays should be non-null, and of equal, non-zero, length")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600A3E9 RID: 41961 RVA: 0x0022C3E8 File Offset: 0x0022A5E8
|
|
[Token(Token = "0x600A3E9")]
|
|
[Address(RVA = "0x7D3960", Offset = "0x7D2960", VA = "0x1807D3960")]
|
|
public static ECPoint SumOfTwoMultiplies(ECPoint P, BigInteger a, ECPoint Q, BigInteger b)
|
|
{
|
|
bool flag = P.SatisfiesOrder();
|
|
ECPoint ecpoint3;
|
|
if (flag)
|
|
{
|
|
ECPoint ecpoint = P.Twice();
|
|
ECPoint ecpoint2 = ecpoint3.Twice();
|
|
bool compressionYTilde = ecpoint.CompressionYTilde;
|
|
ECPoint ecpoint4;
|
|
return ecpoint4;
|
|
}
|
|
ECPoint ecpoint5 = ECAlgorithms.ImplShamirsTrickWNaf(P, a, ecpoint3, b);
|
|
ECPoint[] array = new ECPoint[2];
|
|
array[0] = P;
|
|
if (ecpoint3 != 0)
|
|
{
|
|
}
|
|
array[1] = ecpoint3;
|
|
BigInteger[] array2 = new BigInteger[2];
|
|
if (a != 0)
|
|
{
|
|
}
|
|
array2[0] = a;
|
|
if (b != 0)
|
|
{
|
|
}
|
|
array2[1] = b;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3EA RID: 41962 RVA: 0x0022C46C File Offset: 0x0022A66C
|
|
[Token(Token = "0x600A3EA")]
|
|
[Address(RVA = "0x7D35B0", Offset = "0x7D25B0", VA = "0x1807D35B0")]
|
|
public static ECPoint ShamirsTrick(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
|
|
{
|
|
bool flag = P.SatisfiesOrder();
|
|
ECPoint ecpoint;
|
|
return ECAlgorithms.ImplCheckResult(ECAlgorithms.ImplShamirsTrickJsf(P, k, ecpoint, l));
|
|
}
|
|
|
|
// Token: 0x0600A3EB RID: 41963 RVA: 0x0022C494 File Offset: 0x0022A694
|
|
[Token(Token = "0x600A3EB")]
|
|
[Address(RVA = "0x7D2C60", Offset = "0x7D1C60", VA = "0x1807D2C60")]
|
|
public static ECPoint ImportPoint(ECCurve c, ECPoint p)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A3EB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECAlgorithms::ImportPoint(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_16:
|
|
stloc:ArgumentException(var_1_20, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Point must be on the same curve")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600A3EC RID: 41964 RVA: 0x0022C4C4 File Offset: 0x0022A6C4
|
|
[Token(Token = "0x600A3EC")]
|
|
[Address(RVA = "0x7D3450", Offset = "0x7D2450", VA = "0x1807D3450")]
|
|
public static void MontgomeryTrick(ECFieldElement[] zs, int off, int len)
|
|
{
|
|
int num = 0;
|
|
ECAlgorithms.MontgomeryTrick(zs, off, len, num);
|
|
}
|
|
|
|
// Token: 0x0600A3ED RID: 41965 RVA: 0x0022C4DC File Offset: 0x0022A6DC
|
|
[Token(Token = "0x600A3ED")]
|
|
[Address(RVA = "0x7D3080", Offset = "0x7D2080", VA = "0x1807D3080")]
|
|
public static void MontgomeryTrick(ECFieldElement[] zs, int off, int len, ECFieldElement scale)
|
|
{
|
|
ECFieldElement[] array = new ECFieldElement[off];
|
|
ECFieldElement ecfieldElement;
|
|
if (ecfieldElement != 0)
|
|
{
|
|
}
|
|
array[0] = ecfieldElement;
|
|
ECFieldElement ecfieldElement4;
|
|
if (len > 1)
|
|
{
|
|
ECFieldElement ecfieldElement2 = array[array];
|
|
ECFieldElement ecfieldElement3 = zs[off];
|
|
ecfieldElement4 = ecfieldElement2.Subtract(ecfieldElement3);
|
|
if (ecfieldElement4 != 0)
|
|
{
|
|
}
|
|
array[0] = ecfieldElement4;
|
|
}
|
|
ECFieldElement ecfieldElement5;
|
|
if (scale != 0)
|
|
{
|
|
ecfieldElement5 = array[ecfieldElement4].Subtract(scale);
|
|
if (ecfieldElement5 != 0)
|
|
{
|
|
}
|
|
array[0] = ecfieldElement5;
|
|
}
|
|
ECFieldElement ecfieldElement6 = array[ecfieldElement4].Square();
|
|
if (ecfieldElement4 > 0)
|
|
{
|
|
ECFieldElement ecfieldElement7 = zs[ecfieldElement5];
|
|
ECFieldElement ecfieldElement8 = array[ecfieldElement4].Subtract(ecfieldElement6);
|
|
if (ecfieldElement8 != 0)
|
|
{
|
|
}
|
|
zs[0] = ecfieldElement8;
|
|
ECFieldElement ecfieldElement9 = ecfieldElement6.Subtract(ecfieldElement7);
|
|
}
|
|
if (ecfieldElement6 != 0)
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A3EE RID: 41966 RVA: 0x0022C59C File Offset: 0x0022A79C
|
|
[Token(Token = "0x600A3EE")]
|
|
[Address(RVA = "0x7D3470", Offset = "0x7D2470", VA = "0x1807D3470")]
|
|
public static ECPoint ReferenceMultiply(ECPoint p, BigInteger k)
|
|
{
|
|
BigInteger bigInteger = k.Abs();
|
|
bool flag = p.SatisfiesOrder();
|
|
int bitLength = bigInteger.BitLength;
|
|
if (bitLength > 0)
|
|
{
|
|
int num = 0;
|
|
bool flag2 = bigInteger.TestBit(num);
|
|
if (bitLength > 1 && bigInteger.TestBit(1))
|
|
{
|
|
bool compressionYTilde = p.CompressionYTilde;
|
|
}
|
|
}
|
|
if (k.sign < 0)
|
|
{
|
|
ECPoint ecpoint;
|
|
return ecpoint;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3EF RID: 41967 RVA: 0x0022C5F8 File Offset: 0x0022A7F8
|
|
[Token(Token = "0x600A3EF")]
|
|
[Address(RVA = "0x7D3C70", Offset = "0x7D2C70", VA = "0x1807D3C70")]
|
|
public static ECPoint ValidatePoint(ECPoint p)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A3EF)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECAlgorithms::ValidatePoint(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_15:
|
|
stloc:InvalidOperationException(var_1_1F, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Invalid point")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600A3F0 RID: 41968 RVA: 0x0022C624 File Offset: 0x0022A824
|
|
[Token(Token = "0x600A3F0")]
|
|
[Address(RVA = "0x7D0B60", Offset = "0x7CFB60", VA = "0x1807D0B60")]
|
|
public static ECPoint CleanPoint(ECCurve c, ECPoint p)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A3F0)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECAlgorithms::CleanPoint(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_18:
|
|
stloc:ArgumentException(var_3_27, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Point must be on the same curve"), ldstr:string("p")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600A3F1 RID: 41969 RVA: 0x0022C658 File Offset: 0x0022A858
|
|
[Token(Token = "0x600A3F1")]
|
|
[Address(RVA = "0x7D0C40", Offset = "0x7CFC40", VA = "0x1807D0C40")]
|
|
internal static ECPoint ImplCheckResult(ECPoint p)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A3F1)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECAlgorithms::ImplCheckResult(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_17:
|
|
stloc:InvalidOperationException(var_2_21, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Invalid result")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600A3F2 RID: 41970 RVA: 0x0022C688 File Offset: 0x0022A888
|
|
[Token(Token = "0x600A3F2")]
|
|
[Address(RVA = "0x7D0CC0", Offset = "0x7CFCC0", VA = "0x1807D0CC0")]
|
|
internal static ECPoint ImplShamirsTrickJsf(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
|
|
{
|
|
bool flag = P.SatisfiesOrder();
|
|
bool compressionYTilde = P.CompressionYTilde;
|
|
ECPoint ecpoint = P.Add(Q);
|
|
ECPoint[] array = new ECPoint[4];
|
|
if (Q != 0)
|
|
{
|
|
}
|
|
array[0] = Q;
|
|
if (ecpoint != 0)
|
|
{
|
|
}
|
|
array[1] = ecpoint;
|
|
array[2] = P;
|
|
if (compressionYTilde)
|
|
{
|
|
}
|
|
array[3] = compressionYTilde;
|
|
ECPoint[] array2 = new ECPoint[9];
|
|
ECPoint ecpoint2 = array[3];
|
|
ECPoint ecpoint3;
|
|
if (ecpoint3 != 0)
|
|
{
|
|
}
|
|
array2[0] = ecpoint3;
|
|
ECPoint ecpoint4 = array[2];
|
|
ECPoint ecpoint5;
|
|
if (ecpoint5 != 0)
|
|
{
|
|
}
|
|
array2[1] = ecpoint5;
|
|
ECPoint ecpoint6 = array[1];
|
|
ECPoint ecpoint7;
|
|
if (ecpoint7 != 0)
|
|
{
|
|
}
|
|
array2[2] = ecpoint7;
|
|
ECPoint ecpoint8 = array[0];
|
|
ECPoint ecpoint9;
|
|
if (ecpoint9 != 0)
|
|
{
|
|
}
|
|
array2[3] = ecpoint9;
|
|
object obj;
|
|
if (obj != 0)
|
|
{
|
|
}
|
|
array2[4] = obj;
|
|
ECPoint ecpoint10 = array[0];
|
|
if (ecpoint10 != 0)
|
|
{
|
|
}
|
|
array2[5] = ecpoint10;
|
|
ECPoint ecpoint11 = array[1];
|
|
if (ecpoint11 != 0)
|
|
{
|
|
}
|
|
array2[6] = ecpoint11;
|
|
ECPoint ecpoint12 = array[2];
|
|
if (ecpoint12 != 0)
|
|
{
|
|
}
|
|
array2[7] = ecpoint12;
|
|
ECPoint ecpoint13 = array[3];
|
|
if (ecpoint13 != 0)
|
|
{
|
|
}
|
|
array2[8] = ecpoint13;
|
|
byte[] array3;
|
|
int length = array3.Length;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3F3 RID: 41971 RVA: 0x0022C7D4 File Offset: 0x0022A9D4
|
|
[Token(Token = "0x600A3F3")]
|
|
[Address(RVA = "0x7D19C0", Offset = "0x7D09C0", VA = "0x1807D19C0")]
|
|
internal static ECPoint ImplShamirsTrickWNaf(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
|
|
{
|
|
int sign = k.sign;
|
|
int sign2 = l.sign;
|
|
BigInteger bigInteger = k.Abs();
|
|
BigInteger bigInteger2 = l.Abs();
|
|
int num = bigInteger.BitLength;
|
|
num = WNafUtilities.GetWindowSize(num);
|
|
num = Math.Min(16, num);
|
|
int num2 = Math.Max(2, num);
|
|
num = num2;
|
|
int num3 = WNafUtilities.GetWindowSize(bigInteger2.BitLength);
|
|
num3 = Math.Min(16, num3);
|
|
int num4 = Math.Max(2, num3);
|
|
num3 = num;
|
|
WNafPreCompInfo wnafPreCompInfo = WNafUtilities.Precompute(P, num3, true);
|
|
WNafPreCompInfo wnafPreCompInfo2 = WNafUtilities.Precompute(Q, num4, true);
|
|
if (sign != 0)
|
|
{
|
|
}
|
|
string text = wnafPreCompInfo.ToString();
|
|
if (sign2 != 0)
|
|
{
|
|
}
|
|
string text2 = wnafPreCompInfo2.ToString();
|
|
if (sign != 0)
|
|
{
|
|
string text3 = wnafPreCompInfo.ToString();
|
|
}
|
|
if (sign2 != 0)
|
|
{
|
|
string text4 = wnafPreCompInfo2.ToString();
|
|
}
|
|
byte[] array = WNafUtilities.GenerateWindowNaf(num2, bigInteger);
|
|
byte[] array2 = WNafUtilities.GenerateWindowNaf(num4, bigInteger2);
|
|
ECPoint ecpoint;
|
|
return ecpoint;
|
|
}
|
|
|
|
// Token: 0x0600A3F4 RID: 41972 RVA: 0x0022C8B4 File Offset: 0x0022AAB4
|
|
[Token(Token = "0x600A3F4")]
|
|
[Address(RVA = "0x7D1710", Offset = "0x7D0710", VA = "0x1807D1710")]
|
|
internal static ECPoint ImplShamirsTrickWNaf(ECPoint P, BigInteger k, ECPointMap pointMapQ, BigInteger l)
|
|
{
|
|
int sign = k.sign;
|
|
int sign2 = l.sign;
|
|
BigInteger bigInteger = k.Abs();
|
|
BigInteger bigInteger2 = l.Abs();
|
|
int num = bigInteger.BitLength;
|
|
int bitLength = bigInteger2.BitLength;
|
|
num = Math.Max(num, bitLength);
|
|
int num2 = WNafUtilities.GetWindowSize(num);
|
|
num2 = Math.Min(16, num2);
|
|
int num3 = Math.Max(2, num2);
|
|
num2 = num3;
|
|
ECPoint ecpoint = WNafUtilities.MapPointWithPrecomp(P, num2, true, pointMapQ);
|
|
WNafPreCompInfo wnafPreCompInfo = WNafUtilities.GetWNafPreCompInfo(P);
|
|
WNafPreCompInfo wnafPreCompInfo2 = WNafUtilities.GetWNafPreCompInfo(ecpoint);
|
|
if (sign != 0)
|
|
{
|
|
}
|
|
string text = wnafPreCompInfo.ToString();
|
|
if (sign2 != 0)
|
|
{
|
|
}
|
|
string text2 = wnafPreCompInfo2.ToString();
|
|
if (sign != 0)
|
|
{
|
|
string text3 = wnafPreCompInfo.ToString();
|
|
}
|
|
if (sign2 != 0)
|
|
{
|
|
string text4 = wnafPreCompInfo2.ToString();
|
|
}
|
|
byte[] array = WNafUtilities.GenerateWindowNaf(num3, bigInteger);
|
|
byte[] array2 = WNafUtilities.GenerateWindowNaf(num3, bigInteger2);
|
|
ECPoint ecpoint2;
|
|
return ecpoint2;
|
|
}
|
|
|
|
// Token: 0x0600A3F5 RID: 41973 RVA: 0x0022C988 File Offset: 0x0022AB88
|
|
[Token(Token = "0x600A3F5")]
|
|
[Address(RVA = "0x7D13F0", Offset = "0x7D03F0", VA = "0x1807D13F0")]
|
|
private static ECPoint ImplShamirsTrickWNaf(ECPoint[] preCompP, ECPoint[] preCompNegP, byte[] wnafP, ECPoint[] preCompQ, ECPoint[] preCompNegQ, byte[] wnafQ)
|
|
{
|
|
int length = wnafP.Length;
|
|
bool flag = preCompP[0].SatisfiesOrder();
|
|
int num = 0;
|
|
int num2;
|
|
if (num2 < wnafP.Length)
|
|
{
|
|
}
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
if (num3 != 0)
|
|
{
|
|
}
|
|
if (num4 != 0)
|
|
{
|
|
}
|
|
int num5;
|
|
if (num > 0)
|
|
{
|
|
num5 = 0;
|
|
}
|
|
num5++;
|
|
if (num5 > 0)
|
|
{
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3F6 RID: 41974 RVA: 0x0022C9E0 File Offset: 0x0022ABE0
|
|
[Token(Token = "0x600A3F6")]
|
|
[Address(RVA = "0x7D29E0", Offset = "0x7D19E0", VA = "0x1807D29E0")]
|
|
internal static ECPoint ImplSumOfMultiplies(ECPoint[] ps, BigInteger[] ks)
|
|
{
|
|
int length = ps.Length;
|
|
bool[] array = new bool[length];
|
|
WNafPreCompInfo[] array2 = new WNafPreCompInfo[length];
|
|
byte[][] array3 = new byte[length][];
|
|
if (length > 0)
|
|
{
|
|
BigInteger bigInteger;
|
|
int sign = bigInteger.sign;
|
|
BigInteger bigInteger2 = bigInteger.Abs();
|
|
int num = bigInteger2.BitLength;
|
|
num = WNafUtilities.GetWindowSize(num);
|
|
num = Math.Min(16, num);
|
|
int num2 = Math.Max(2, num);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
return ECAlgorithms.ImplSumOfMultiplies(array, array2, array3);
|
|
}
|
|
|
|
// Token: 0x0600A3F7 RID: 41975 RVA: 0x0022CA88 File Offset: 0x0022AC88
|
|
[Token(Token = "0x600A3F7")]
|
|
[Address(RVA = "0x7D1C80", Offset = "0x7D0C80", VA = "0x1807D1C80")]
|
|
internal static ECPoint ImplSumOfMultipliesGlv(ECPoint[] ps, BigInteger[] ks, GlvEndomorphism glvEndomorphism)
|
|
{
|
|
bool flag = ps[0].SatisfiesOrder();
|
|
int length = ps.Length;
|
|
BigInteger[] array = new BigInteger[0];
|
|
int num = 0;
|
|
int num2 = 0;
|
|
BigInteger bigInteger = ks[num];
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
if (num4 < num3)
|
|
{
|
|
num4 += num4;
|
|
num4++;
|
|
}
|
|
num2++;
|
|
if (flag)
|
|
{
|
|
}
|
|
array[0] = flag;
|
|
num2++;
|
|
if (num4 != 0)
|
|
{
|
|
}
|
|
num++;
|
|
array[0] = num4;
|
|
num2 += 19;
|
|
int num5 = 0;
|
|
num5 += num5;
|
|
num5++;
|
|
num5 += num5;
|
|
num5++;
|
|
if (num5 == 0)
|
|
{
|
|
ECPoint[] array2 = new ECPoint[0];
|
|
ECPoint ecpoint = ps[num5];
|
|
uint num6;
|
|
if (num5 < (int)num6)
|
|
{
|
|
num5 += num5;
|
|
num5++;
|
|
}
|
|
num5++;
|
|
if (ecpoint != 0)
|
|
{
|
|
}
|
|
array2[0] = ecpoint;
|
|
num5++;
|
|
if (num5 != 0)
|
|
{
|
|
}
|
|
num5++;
|
|
array2[0] = num5;
|
|
num5 += 19;
|
|
num5++;
|
|
num5 += 19;
|
|
num5 += 19;
|
|
return ECAlgorithms.ImplSumOfMultiplies(array2, array);
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3F8 RID: 41976 RVA: 0x0022CBAC File Offset: 0x0022ADAC
|
|
[Token(Token = "0x600A3F8")]
|
|
[Address(RVA = "0x7D2600", Offset = "0x7D1600", VA = "0x1807D2600")]
|
|
internal static ECPoint ImplSumOfMultiplies(ECPoint[] ps, ECPointMap pointMap, BigInteger[] ks)
|
|
{
|
|
int length = ps.Length;
|
|
bool[] array = new bool[ps];
|
|
WNafPreCompInfo[] array2 = new WNafPreCompInfo[ps];
|
|
byte[][] array3 = new byte[ps][];
|
|
if (length > 0)
|
|
{
|
|
BigInteger bigInteger2;
|
|
BigInteger bigInteger = bigInteger2.Abs();
|
|
BigInteger bigInteger4;
|
|
BigInteger bigInteger3 = bigInteger4.Abs();
|
|
int num = bigInteger.BitLength;
|
|
int num2 = bigInteger3.BitLength;
|
|
num2 = Math.Max(num, num2);
|
|
int num3 = WNafUtilities.GetWindowSize(num2);
|
|
num3 = Math.Min(16, num3);
|
|
num = Math.Max(2, num3);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
return ECAlgorithms.ImplSumOfMultiplies(array, array2, array3);
|
|
}
|
|
|
|
// Token: 0x0600A3F9 RID: 41977 RVA: 0x0022CCA0 File Offset: 0x0022AEA0
|
|
[Token(Token = "0x600A3F9")]
|
|
[Address(RVA = "0x7D2250", Offset = "0x7D1250", VA = "0x1807D2250")]
|
|
private static ECPoint ImplSumOfMultiplies(bool[] negs, WNafPreCompInfo[] infos, byte[][] wnafs)
|
|
{
|
|
int num = 0;
|
|
int length = wnafs.Length;
|
|
int num2 = 0;
|
|
int num3;
|
|
if (length > 0)
|
|
{
|
|
int length2 = wnafs[num2].Length;
|
|
num3 = Math.Max(num, length2);
|
|
num2++;
|
|
}
|
|
string text = infos[0].ToString();
|
|
int num4 = 0;
|
|
int num5 = num3 - 1;
|
|
int num6 = 0;
|
|
int num7;
|
|
if (length > 0)
|
|
{
|
|
byte[] array = wnafs[num6];
|
|
if (num5 < array.Length && num3 != 0)
|
|
{
|
|
bool flag = negs[num6];
|
|
if (num3 == (flag ? 1 : 0))
|
|
{
|
|
}
|
|
}
|
|
num6++;
|
|
if (num4 > 0)
|
|
{
|
|
num7 = 0;
|
|
}
|
|
}
|
|
num7++;
|
|
if (num7 > 0)
|
|
{
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A3FA RID: 41978 RVA: 0x0022CD44 File Offset: 0x0022AF44
|
|
[Token(Token = "0x600A3FA")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
public ECAlgorithms()
|
|
{
|
|
}
|
|
}
|
|
}
|