Files
2026-04-08 23:40:05 +02:00

691 lines
31 KiB
C#

using System;
using System.Runtime.InteropServices;
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: 0x02001410 RID: 5136
[Token(Token = "0x2001410")]
[StructLayout(3)]
public class ECAlgorithms
{
// Token: 0x0600843C RID: 33852 RVA: 0x001CBC4C File Offset: 0x001C9E4C
[Token(Token = "0x600843C")]
[Address(RVA = "0x21A0F40", Offset = "0x219F940", VA = "0x1821A0F40")]
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: 0x0600843D RID: 33853 RVA: 0x001CBC80 File Offset: 0x001C9E80
[Token(Token = "0x600843D")]
[Address(RVA = "0x21A10A0", Offset = "0x219FAA0", VA = "0x1821A10A0")]
public static bool IsF2mField(IFiniteField field)
{
int num = 0;
if (num < field)
{
num += num;
num++;
}
bool flag;
return flag;
}
// Token: 0x0600843E RID: 33854 RVA: 0x001CBCA4 File Offset: 0x001C9EA4
[Token(Token = "0x600843E")]
[Address(RVA = "0x21A11E0", Offset = "0x219FBE0", VA = "0x1821A11E0")]
public static bool IsFpCurve(ECCurve c)
{
return c.Infinity == (ulong)1L;
}
// Token: 0x0600843F RID: 33855 RVA: 0x001CBCC4 File Offset: 0x001C9EC4
[Token(Token = "0x600843F")]
[Address(RVA = "0x21A1250", Offset = "0x219FC50", VA = "0x1821A1250")]
public static bool IsFpField(IFiniteField field)
{
bool flag;
return flag;
}
// Token: 0x06008440 RID: 33856 RVA: 0x001CBCD8 File Offset: 0x001C9ED8
[Token(Token = "0x6008440")]
[Address(RVA = "0x21A1860", Offset = "0x21A0260", VA = "0x1821A1860")]
public static ECPoint SumOfMultiplies(ECPoint[] ps, BigInteger[] ks)
{
/*
An exception occurred when decompiling this method (06008440)
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: 0x06008441 RID: 33857 RVA: 0x001CBD98 File Offset: 0x001C9F98
[Token(Token = "0x6008441")]
[Address(RVA = "0x21A1B80", Offset = "0x21A0580", VA = "0x1821A1B80")]
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: 0x06008442 RID: 33858 RVA: 0x001CBE1C File Offset: 0x001CA01C
[Token(Token = "0x6008442")]
[Address(RVA = "0x21A17D0", Offset = "0x21A01D0", VA = "0x1821A17D0")]
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: 0x06008443 RID: 33859 RVA: 0x001CBE44 File Offset: 0x001CA044
[Token(Token = "0x6008443")]
[Address(RVA = "0x21A0E80", Offset = "0x219F880", VA = "0x1821A0E80")]
public static ECPoint ImportPoint(ECCurve c, ECPoint p)
{
/*
An exception occurred when decompiling this method (06008443)
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: 0x06008444 RID: 33860 RVA: 0x001CBE74 File Offset: 0x001CA074
[Token(Token = "0x6008444")]
[Address(RVA = "0x21A1670", Offset = "0x21A0070", VA = "0x1821A1670")]
public static void MontgomeryTrick(ECFieldElement[] zs, int off, int len)
{
int num = 0;
ECAlgorithms.MontgomeryTrick(zs, off, len, num);
}
// Token: 0x06008445 RID: 33861 RVA: 0x001CBE8C File Offset: 0x001CA08C
[Token(Token = "0x6008445")]
[Address(RVA = "0x21A12A0", Offset = "0x219FCA0", VA = "0x1821A12A0")]
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: 0x06008446 RID: 33862 RVA: 0x001CBF4C File Offset: 0x001CA14C
[Token(Token = "0x6008446")]
[Address(RVA = "0x21A1690", Offset = "0x21A0090", VA = "0x1821A1690")]
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: 0x06008447 RID: 33863 RVA: 0x001CBFA8 File Offset: 0x001CA1A8
[Token(Token = "0x6008447")]
[Address(RVA = "0x21A1E90", Offset = "0x21A0890", VA = "0x1821A1E90")]
public static ECPoint ValidatePoint(ECPoint p)
{
/*
An exception occurred when decompiling this method (06008447)
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: 0x06008448 RID: 33864 RVA: 0x001CBFD4 File Offset: 0x001CA1D4
[Token(Token = "0x6008448")]
[Address(RVA = "0x219ED80", Offset = "0x219D780", VA = "0x18219ED80")]
public static ECPoint CleanPoint(ECCurve c, ECPoint p)
{
/*
An exception occurred when decompiling this method (06008448)
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: 0x06008449 RID: 33865 RVA: 0x001CC008 File Offset: 0x001CA208
[Token(Token = "0x6008449")]
[Address(RVA = "0x219EE60", Offset = "0x219D860", VA = "0x18219EE60")]
internal static ECPoint ImplCheckResult(ECPoint p)
{
/*
An exception occurred when decompiling this method (06008449)
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: 0x0600844A RID: 33866 RVA: 0x001CC038 File Offset: 0x001CA238
[Token(Token = "0x600844A")]
[Address(RVA = "0x219EEE0", Offset = "0x219D8E0", VA = "0x18219EEE0")]
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: 0x0600844B RID: 33867 RVA: 0x001CC184 File Offset: 0x001CA384
[Token(Token = "0x600844B")]
[Address(RVA = "0x219FBE0", Offset = "0x219E5E0", VA = "0x18219FBE0")]
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: 0x0600844C RID: 33868 RVA: 0x001CC264 File Offset: 0x001CA464
[Token(Token = "0x600844C")]
[Address(RVA = "0x219F930", Offset = "0x219E330", VA = "0x18219F930")]
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: 0x0600844D RID: 33869 RVA: 0x001CC338 File Offset: 0x001CA538
[Token(Token = "0x600844D")]
[Address(RVA = "0x219F610", Offset = "0x219E010", VA = "0x18219F610")]
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: 0x0600844E RID: 33870 RVA: 0x001CC390 File Offset: 0x001CA590
[Token(Token = "0x600844E")]
[Address(RVA = "0x21A0C00", Offset = "0x219F600", VA = "0x1821A0C00")]
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: 0x0600844F RID: 33871 RVA: 0x001CC438 File Offset: 0x001CA638
[Token(Token = "0x600844F")]
[Address(RVA = "0x219FEA0", Offset = "0x219E8A0", VA = "0x18219FEA0")]
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: 0x06008450 RID: 33872 RVA: 0x001CC55C File Offset: 0x001CA75C
[Token(Token = "0x6008450")]
[Address(RVA = "0x21A0820", Offset = "0x219F220", VA = "0x1821A0820")]
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: 0x06008451 RID: 33873 RVA: 0x001CC650 File Offset: 0x001CA850
[Token(Token = "0x6008451")]
[Address(RVA = "0x21A0470", Offset = "0x219EE70", VA = "0x1821A0470")]
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: 0x06008452 RID: 33874 RVA: 0x001CC6F4 File Offset: 0x001CA8F4
[Token(Token = "0x6008452")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public ECAlgorithms()
{
}
}
}