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

306 lines
18 KiB
C#

using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC
{
// Token: 0x02001415 RID: 5141
[Token(Token = "0x2001415")]
[StructLayout(3)]
public class FpCurve : AbstractFpCurve
{
// Token: 0x06008484 RID: 33924 RVA: 0x001CD030 File Offset: 0x001CB230
[Token(Token = "0x6008484")]
[Address(RVA = "0x21AA8A0", Offset = "0x21A92A0", VA = "0x1821AA8A0")]
[Obsolete]
public FpCurve(BigInteger q, BigInteger a, BigInteger b)
: base(q)
{
this.m_q = q;
BigInteger bigInteger = FpFieldElement.CalculateResidue(q);
this.m_r = bigInteger;
int num;
int num2;
ulong num3;
FpPoint fpPoint = new FpPoint(this, num, num2, num3 != 0UL);
num2 = 0;
num = 0;
this.m_infinity = fpPoint;
int fieldSize = this.FieldSize;
this.m_a = fieldSize;
int fieldSize2 = this.FieldSize;
this.m_b = fieldSize2;
this.m_order = (ulong)0L;
this.m_cofactor = (ulong)0L;
this.m_coord = (int)((ulong)4L);
}
// Token: 0x06008485 RID: 33925 RVA: 0x001CD0AC File Offset: 0x001CB2AC
[Token(Token = "0x6008485")]
[Address(RVA = "0x21AA790", Offset = "0x21A9190", VA = "0x1821AA790")]
public FpCurve(BigInteger q, BigInteger a, BigInteger b, BigInteger order, BigInteger cofactor)
: base(q)
{
this.m_q = q;
BigInteger bigInteger = FpFieldElement.CalculateResidue(q);
this.m_r = bigInteger;
int num;
int num2;
ulong num3;
FpPoint fpPoint = new FpPoint(this, num, num2, num3 != 0UL);
num2 = 0;
num = 0;
this.m_infinity = fpPoint;
int fieldSize = this.FieldSize;
this.m_a = fieldSize;
int fieldSize2 = this.FieldSize;
this.m_b = fieldSize2;
this.m_order = 0;
this.m_cofactor = 0;
this.m_coord = (int)((ulong)4L);
}
// Token: 0x06008486 RID: 33926 RVA: 0x001CD124 File Offset: 0x001CB324
[Token(Token = "0x6008486")]
[Address(RVA = "0x21AA680", Offset = "0x21A9080", VA = "0x1821AA680")]
[Obsolete]
protected FpCurve(BigInteger q, BigInteger r, ECFieldElement a, ECFieldElement b)
{
}
// Token: 0x06008487 RID: 33927 RVA: 0x001CD134 File Offset: 0x001CB334
[Token(Token = "0x6008487")]
[Address(RVA = "0x21AA6B0", Offset = "0x21A90B0", VA = "0x1821AA6B0")]
protected FpCurve(BigInteger q, BigInteger r, ECFieldElement a, ECFieldElement b, BigInteger order, BigInteger cofactor)
: base(q)
{
this.m_q = q;
this.m_r = r;
int num;
int num2;
ulong num3;
FpPoint fpPoint = new FpPoint(this, num, num2, num3 != 0UL);
num2 = 0;
num = 0;
this.m_b = 0;
this.m_order = 0;
this.m_a = a;
this.m_cofactor = 0;
this.m_infinity = fpPoint;
this.m_coord = (int)((ulong)4L);
}
// Token: 0x06008488 RID: 33928 RVA: 0x001CD194 File Offset: 0x001CB394
[Token(Token = "0x6008488")]
[Address(RVA = "0x21AA0F0", Offset = "0x21A8AF0", VA = "0x1821AA0F0", Slot = "12")]
protected override ECCurve CloneCurve()
{
/*
An exception occurred when decompiling this method (06008488)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.FpCurve::CloneCurve()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:BigInteger(var_0_06, ldfld:BigInteger(FpCurve::m_q, ldloc:FpCurve(this)))
stloc:BigInteger(var_1_0D, ldfld:BigInteger(FpCurve::m_r, ldloc:FpCurve(this)))
stloc:ECFieldElement(var_2_14, ldfld:ECFieldElement(ECCurve::m_a, ldloc:FpCurve[exp:ECCurve](this)))
stloc:ECFieldElement(var_3_1B, ldfld:ECFieldElement(ECCurve::m_b, ldloc:FpCurve[exp:ECCurve](this)))
stloc:BigInteger(var_4_22, ldfld:BigInteger(ECCurve::m_order, ldloc:FpCurve[exp:ECCurve](this)))
stloc:BigInteger(var_5_2A, ldfld:BigInteger(ECCurve::m_cofactor, ldloc:FpCurve[exp:ECCurve](this)))
stloc:FpCurve(var_6_39, newobj:FpCurve(FpCurve::.ctor, ldloc:BigInteger(var_0_06), ldloc:BigInteger(var_1_0D), ldloc:ECFieldElement(var_2_14), ldloc:ECFieldElement(var_3_1B), ldloc:BigInteger(var_4_22), ldloc:BigInteger(var_5_2A)))
}
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: 0x06008489 RID: 33929 RVA: 0x001CD1DC File Offset: 0x001CB3DC
[Token(Token = "0x6008489")]
[Address(RVA = "0x21AA670", Offset = "0x21A9070", VA = "0x1821AA670", Slot = "16")]
public override bool SupportsCoordinateSystem(int coord)
{
if (coord <= 2 || coord != 4)
{
}
return true;
}
// Token: 0x17001547 RID: 5447
// (get) Token: 0x0600848A RID: 33930 RVA: 0x001CD1F4 File Offset: 0x001CB3F4
[Token(Token = "0x17001547")]
public virtual BigInteger Q
{
[Token(Token = "0x600848A")]
[Address(RVA = "0x462740", Offset = "0x461140", VA = "0x180462740", Slot = "38")]
get
{
return this.m_q;
}
}
// Token: 0x17001548 RID: 5448
// (get) Token: 0x0600848B RID: 33931 RVA: 0x001CD208 File Offset: 0x001CB408
[Token(Token = "0x17001548")]
public override ECPoint Infinity
{
[Token(Token = "0x600848B")]
[Address(RVA = "0x3EDE90", Offset = "0x3EC890", VA = "0x1803EDE90", Slot = "22")]
get
{
/*
An exception occurred when decompiling this method (0600848B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.FpCurve::get_Infinity()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:FpPoint(var_0_06, ldfld:FpPoint(FpCurve::m_infinity, ldloc:FpCurve(this)))
}
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: 0x17001549 RID: 5449
// (get) Token: 0x0600848C RID: 33932 RVA: 0x001CD21C File Offset: 0x001CB41C
[Token(Token = "0x17001549")]
public override int FieldSize
{
[Token(Token = "0x600848C")]
[Address(RVA = "0x21AA9B0", Offset = "0x21A93B0", VA = "0x1821AA9B0", Slot = "4")]
get
{
return this.m_q.BitLength;
}
}
// Token: 0x0600848D RID: 33933 RVA: 0x001CD23C File Offset: 0x001CB43C
[Token(Token = "0x600848D")]
[Address(RVA = "0x21AA2D0", Offset = "0x21A8CD0", VA = "0x1821AA2D0", Slot = "5")]
public override ECFieldElement FromBigInteger(BigInteger x)
{
/*
An exception occurred when decompiling this method (0600848D)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.FpCurve::FromBigInteger(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:BigInteger(var_0_06, ldfld:BigInteger(FpCurve::m_q, ldloc:FpCurve(this)))
stloc:BigInteger(var_1_0D, ldfld:BigInteger(FpCurve::m_r, ldloc:FpCurve(this)))
stloc:FpFieldElement(var_2_16, newobj:FpFieldElement(FpFieldElement::.ctor, ldloc:BigInteger(var_0_06), ldloc:BigInteger(var_1_0D), ldloc:BigInteger(x)))
}
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: 0x0600848E RID: 33934 RVA: 0x001CD260 File Offset: 0x001CB460
[Token(Token = "0x600848E")]
[Address(RVA = "0x21AA1A0", Offset = "0x21A8BA0", VA = "0x1821AA1A0", Slot = "13")]
protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, bool withCompression)
{
/*
An exception occurred when decompiling this method (0600848E)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.FpCurve::CreateRawPoint(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement,System.Boolean)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:FpPoint(var_0_09, newobj:FpPoint(FpPoint::.ctor, ldloc:FpCurve[exp:ECCurve](this), ldloc:ECFieldElement(x), ldloc:ECFieldElement(y), ldloc:bool(withCompression)))
}
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: 0x0600848F RID: 33935 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600848F")]
[Address(RVA = "0x21AA230", Offset = "0x21A8C30", VA = "0x1821AA230", Slot = "14")]
protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06008490 RID: 33936 RVA: 0x001CD278 File Offset: 0x001CB478
[Token(Token = "0x6008490")]
[Address(RVA = "0x21AA350", Offset = "0x21A8D50", VA = "0x1821AA350", Slot = "19")]
public override ECPoint ImportPoint(ECPoint p)
{
bool flag = p.SatisfiesOrder();
if (this != flag && this.Cofactor == (ulong)2L && (p.m_x != (ulong)0L || p.m_y != (ulong)0L) && p.SatisfiesOrder() <= true)
{
string text = p.m_x.ToString();
int fieldSize = this.FieldSize;
string text2 = p.m_y.ToString();
int fieldSize2 = this.FieldSize;
ECFieldElement[] array = new ECFieldElement[1];
string text3 = p.YCoord.ToString();
int fieldSize3 = this.FieldSize;
throw new ArrayTypeMismatchException();
}
bool flag2 = p.SatisfiesOrder();
if (this != flag2)
{
if (p.m_x != (ulong)0L || p.m_y == (ulong)0L)
{
}
short num;
string text4 = num.ToString();
ushort num2;
string text5 = num2.ToString();
}
throw new NullReferenceException();
}
// Token: 0x04005C34 RID: 23604
[Token(Token = "0x4005C34")]
private const int FP_DEFAULT_COORDS = 4;
// Token: 0x04005C35 RID: 23605
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x4005C35")]
protected readonly BigInteger m_q;
// Token: 0x04005C36 RID: 23606
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x4005C36")]
protected readonly BigInteger m_r;
// Token: 0x04005C37 RID: 23607
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x4005C37")]
protected readonly FpPoint m_infinity;
}
}