Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Math/EC/F2mPoint.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

278 lines
13 KiB
C#

using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC
{
// Token: 0x02001AE2 RID: 6882
[Token(Token = "0x2001AE2")]
public class F2mPoint : AbstractF2mPoint
{
// Token: 0x0600A510 RID: 42256 RVA: 0x00231368 File Offset: 0x0022F568
[Token(Token = "0x600A510")]
[Address(RVA = "0x7DBA50", Offset = "0x7DAA50", VA = "0x1807DBA50")]
[Obsolete]
public F2mPoint(ECCurve curve, ECFieldElement x, ECFieldElement y)
{
}
// Token: 0x0600A511 RID: 42257 RVA: 0x00231378 File Offset: 0x0022F578
[Token(Token = "0x600A511")]
[Address(RVA = "0x7DBA70", Offset = "0x7DAA70", VA = "0x1807DBA70")]
[Obsolete]
public F2mPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
{
/*
An exception occurred when decompiling this method (0600A511)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.F2mPoint::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve,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.
{
IL_27:
stloc:ArgumentException(var_4_31, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Exactly one of the field elements is null")))
}
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: 0x0600A512 RID: 42258 RVA: 0x002313B8 File Offset: 0x0022F5B8
[Token(Token = "0x600A512")]
[Address(RVA = "0x6FE5B0", Offset = "0x6FD5B0", VA = "0x1806FE5B0")]
internal F2mPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
{
}
// Token: 0x0600A513 RID: 42259 RVA: 0x002313C8 File Offset: 0x0022F5C8
[Token(Token = "0x600A513")]
[Address(RVA = "0x7DA4D0", Offset = "0x7D94D0", VA = "0x1807DA4D0", Slot = "7")]
protected override ECPoint Detach()
{
/*
An exception occurred when decompiling this method (0600A513)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.F2mPoint::Detach()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_22:
stloc:ArgumentException(var_5_2C, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Exactly one of the field elements is null")))
}
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: 0x17001A10 RID: 6672
// (get) Token: 0x0600A514 RID: 42260 RVA: 0x00231404 File Offset: 0x0022F604
[Token(Token = "0x17001A10")]
public override ECFieldElement YCoord
{
[Token(Token = "0x600A514")]
[Address(RVA = "0x7DBC70", Offset = "0x7DAC70", VA = "0x1807DBC70", Slot = "12")]
get
{
ECPoint ecpoint = this.Detach();
if (0UL > (ulong)1L)
{
return this.m_y;
}
ECFieldElement y = this.m_y;
ECFieldElement x = this.m_x;
if ((x != 0 || y != 0) && !x.IsOne)
{
int fieldSize = y.FieldSize;
if (ecpoint != (ulong)6L || this.m_zs[0].BitLength == 0)
{
}
}
throw new NullReferenceException();
}
}
// Token: 0x17001A11 RID: 6673
// (get) Token: 0x0600A515 RID: 42261 RVA: 0x0023146C File Offset: 0x0022F66C
[Token(Token = "0x17001A11")]
protected internal override bool CompressionYTilde
{
[Token(Token = "0x600A515")]
[Address(RVA = "0x7DBB70", Offset = "0x7DAB70", VA = "0x1807DBB70", Slot = "25")]
get
{
ECFieldElement x = this.m_x;
if (!x.IsOne)
{
ECFieldElement y = this.m_y;
if (this.Detach() > (ulong)1L)
{
BigInteger bigInteger = y.Multiply(x).ToBigInteger();
}
ECFieldElement ecfieldElement;
ECFieldElement ecfieldElement2;
return ecfieldElement != ecfieldElement2;
}
throw new NullReferenceException();
}
}
// Token: 0x0600A516 RID: 42262 RVA: 0x002314BC File Offset: 0x0022F6BC
[Token(Token = "0x600A516")]
[Address(RVA = "0x7D9630", Offset = "0x7D8630", VA = "0x1807D9630", Slot = "26")]
public override ECPoint Add(ECPoint b)
{
return b;
}
// Token: 0x0600A517 RID: 42263 RVA: 0x002316E0 File Offset: 0x0022F8E0
[Token(Token = "0x600A517")]
[Address(RVA = "0x7DAF80", Offset = "0x7D9F80", VA = "0x1807DAF80", Slot = "30")]
public override ECPoint Twice()
{
F2mPoint f2mPoint;
ECFieldElement ecfieldElement5;
for (;;)
{
bool flag = this.SatisfiesOrder();
ECFieldElement x = this.m_x;
if (x.IsOne)
{
goto IL_1F2;
}
int fieldSize = this.m_y.Multiply(x).FieldSize;
ushort num;
TypeCode typeCode = num.GetTypeCode();
bool flag2 = flag.Equals(fieldSize != 0);
TypeCode typeCode2 = typeCode.GetTypeCode();
bool withCompression = this.m_withCompression;
if (f2mPoint == (ulong)1L)
{
break;
}
F2mPoint f2mPoint2;
if (f2mPoint2 == (ulong)6L)
{
ECFieldElement[] zs = f2mPoint.m_zs;
ECFieldElement y = f2mPoint.m_y;
ECFieldElement ecfieldElement = zs[0];
int bitLength = ecfieldElement.BitLength;
if (bitLength != 0)
{
}
ECFieldElement ecfieldElement2 = y.Subtract(ecfieldElement);
ECFieldElement ecfieldElement3 = ecfieldElement.Negate();
if (bitLength != 0)
{
}
ECFieldElement ecfieldElement4 = ecfieldElement5.Subtract(ecfieldElement5);
if (y.Negate().FieldSize.GetTypeCode() != TypeCode.Empty)
{
goto IL_1E0;
}
ECFieldElement affineXCoord = f2mPoint2.AffineXCoord;
ECFieldElement ecfieldElement6;
TypeCode typeCode3 = ecfieldElement6.FieldSize.GetTypeCode();
ushort num2;
TypeCode typeCode4 = num2.GetTypeCode();
ushort num3;
num2 = num3;
ulong num4;
if (num4 == (ulong)0L)
{
ECFieldElement ecfieldElement7 = ecfieldElement3.Negate();
}
int fieldSize2 = ecfieldElement4.FieldSize;
TypeCode typeCode5 = num2.GetTypeCode().GetTypeCode();
ushort num5;
num2 = num5;
sbyte b;
TypeCode typeCode6 = b.GetTypeCode().GetTypeCode();
if (!ecfieldElement5.IsOne)
{
goto Block_5;
}
}
}
ECFieldElement[] zs2 = f2mPoint.m_zs;
ECFieldElement y2 = f2mPoint.m_y;
ECFieldElement ecfieldElement8 = zs2[0];
int num6 = ecfieldElement8.BitLength;
if (num6 != 0)
{
}
ECFieldElement ecfieldElement9 = y2.Subtract(ecfieldElement8);
ECFieldElement ecfieldElement10;
int fieldSize3 = ecfieldElement10.FieldSize;
num6 = fieldSize3;
TypeCode typeCode7 = num6.GetTypeCode();
ECFieldElement ecfieldElement11 = ecfieldElement10.Negate();
ECFieldElement[] array = new ECFieldElement[1];
throw new ArrayTypeMismatchException();
Block_5:
if (ecfieldElement5.BitLength == 0)
{
TypeCode typeCode6;
TypeCode typeCode8 = typeCode6.GetTypeCode().GetTypeCode();
}
ECFieldElement[] array2 = new ECFieldElement[1];
throw new ArrayTypeMismatchException();
IL_1E0:
F2mPoint f2mPoint3;
ECFieldElement[] zcoords = f2mPoint3.GetZCoords();
bool withCompression2 = f2mPoint.m_withCompression;
IL_1F2:
throw new NullReferenceException();
}
// Token: 0x0600A518 RID: 42264 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600A518")]
[Address(RVA = "0x7DA900", Offset = "0x7D9900", VA = "0x1807DA900", Slot = "32")]
public override ECPoint TwicePlus(ECPoint b)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600A519 RID: 42265 RVA: 0x002318E4 File Offset: 0x0022FAE4
[Token(Token = "0x600A519")]
[Address(RVA = "0x7DA5F0", Offset = "0x7D95F0", VA = "0x1807DA5F0", Slot = "28")]
public override ECPoint Negate()
{
do
{
ECFieldElement x = this.m_x;
if (x == 0)
{
}
if (x.IsOne)
{
goto IL_6F;
}
}
while (this.SatisfiesOrder() > true);
int fieldSize = this.m_y.FieldSize;
bool withCompression = this.m_withCompression;
F2mPoint f2mPoint;
ECFieldElement y = f2mPoint.m_y;
ECCurve curve = f2mPoint.Curve;
ECFieldElement[] array = new ECFieldElement[1];
throw new ArrayTypeMismatchException();
IL_6F:
throw new NullReferenceException();
}
}
}