Files
Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Math/EC/ECPoint.cs
T
2026-04-10 22:50:51 +02:00

785 lines
33 KiB
C#

using System;
using System.Collections;
using System.Text;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC
{
// Token: 0x020019FC RID: 6652
[Token(Token = "0x20019FC")]
public abstract class ECPoint
{
// Token: 0x0600A0ED RID: 41197 RVA: 0x002267B8 File Offset: 0x002249B8
[Token(Token = "0x600A0ED")]
[Address(RVA = "0x209F0E0", Offset = "0x209DEE0", VA = "0x18209F0E0")]
protected static ECFieldElement[] GetInitialZCoords(ECCurve curve)
{
while (curve != 0)
{
BigInteger cofactor = curve.Cofactor;
if (cofactor == 0 || cofactor == (ulong)5L)
{
break;
}
BigInteger one = BigInteger.One;
int fieldSize = curve.FieldSize;
if (cofactor <= (ulong)5L)
{
ECFieldElement[] array = new ECFieldElement[3];
throw new ArrayTypeMismatchException();
}
}
return ECPoint.EMPTY_ZS;
}
// Token: 0x0600A0EE RID: 41198 RVA: 0x00226874 File Offset: 0x00224A74
[Token(Token = "0x600A0EE")]
[Address(RVA = "0x209FF90", Offset = "0x209ED90", VA = "0x18209FF90")]
protected ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
{
ECFieldElement[] initialZCoords = ECPoint.GetInitialZCoords(curve);
base..ctor();
this.m_curve = curve;
this.m_y = y;
this.m_zs = initialZCoords;
this.m_withCompression = false;
this.m_x = x;
}
// Token: 0x0600A0EF RID: 41199 RVA: 0x002268B4 File Offset: 0x00224AB4
[Token(Token = "0x600A0EF")]
[Address(RVA = "0x209FF30", Offset = "0x209ED30", VA = "0x18209FF30")]
internal ECPoint(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
{
this.m_zs = 0;
this.m_curve = curve;
this.m_y = y;
this.m_withCompression = false;
this.m_x = x;
}
// Token: 0x0600A0F0 RID: 41200
[Token(Token = "0x600A0F0")]
[Address(Slot = "4")]
protected abstract bool SatisfiesCurveEquation();
// Token: 0x0600A0F1 RID: 41201 RVA: 0x002268EC File Offset: 0x00224AEC
[Token(Token = "0x600A0F1")]
[Address(RVA = "0x209F8F0", Offset = "0x209E6F0", VA = "0x18209F8F0", Slot = "5")]
protected virtual bool SatisfiesOrder()
{
BigInteger one = BigInteger.One;
if (!this.SatisfiesOrder() && this.SatisfiesOrder())
{
bool flag = this.SatisfiesOrder();
BigInteger bigInteger;
int bitLength = bigInteger.BitLength;
if (bitLength > 0)
{
int num = 0;
bool flag2 = bigInteger.TestBit(num);
if (bitLength > 1 && bigInteger.TestBit(1))
{
bool compressionYTilde = this.CompressionYTilde;
}
}
ECPoint ecpoint;
if (ecpoint.m_x != (ulong)0L)
{
}
}
throw new NullReferenceException();
}
// Token: 0x0600A0F2 RID: 41202 RVA: 0x00226960 File Offset: 0x00224B60
[Token(Token = "0x600A0F2")]
[Address(RVA = "0x209EF90", Offset = "0x209DD90", VA = "0x18209EF90")]
public ECPoint GetDetachedPoint()
{
OVRMesh.JAAHPDGFADH jaahpdgfadh = ((OVRMesh.PJPHJNNOBBH)this.IsNormalized()).POCDCJMHEGL();
throw new NullReferenceException();
}
// Token: 0x17001966 RID: 6502
// (get) Token: 0x0600A0F3 RID: 41203 RVA: 0x00226980 File Offset: 0x00224B80
[Token(Token = "0x17001966")]
public virtual ECCurve Curve
{
[Token(Token = "0x600A0F3")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "6")]
get
{
return this.m_curve;
}
}
// Token: 0x0600A0F4 RID: 41204
[Token(Token = "0x600A0F4")]
[Address(Slot = "7")]
protected abstract ECPoint Detach();
// Token: 0x17001967 RID: 6503
// (get) Token: 0x0600A0F5 RID: 41205 RVA: 0x00226994 File Offset: 0x00224B94
[Token(Token = "0x17001967")]
protected virtual int CurveCoordinateSystem
{
[Token(Token = "0x600A0F5")]
[Address(RVA = "0x20A00C0", Offset = "0x209EEC0", VA = "0x1820A00C0", Slot = "8")]
get
{
ECCurve curve = this.m_curve;
if (curve == 0)
{
return 0;
}
return curve.FieldSize;
}
}
// Token: 0x17001968 RID: 6504
// (get) Token: 0x0600A0F6 RID: 41206 RVA: 0x002269B4 File Offset: 0x00224BB4
[Token(Token = "0x17001968")]
public virtual ECFieldElement AffineXCoord
{
[Token(Token = "0x600A0F6")]
[Address(RVA = "0x20A0040", Offset = "0x209EE40", VA = "0x1820A0040", Slot = "9")]
get
{
/*
An exception occurred when decompiling this method (0600A0F6)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint::get_AffineXCoord()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:class BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement[](var_0_06, callvirt:class BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement[](ECPoint::GetZCoords, ldloc:ECPoint(this)))
stloc:bool(var_1_0D, call:bool(ECPoint::SatisfiesCurveEquation, ldloc:ECPoint(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: 0x17001969 RID: 6505
// (get) Token: 0x0600A0F7 RID: 41207 RVA: 0x002269D0 File Offset: 0x00224BD0
[Token(Token = "0x17001969")]
public virtual ECFieldElement AffineYCoord
{
[Token(Token = "0x600A0F7")]
[Address(RVA = "0x20A0080", Offset = "0x209EE80", VA = "0x1820A0080", Slot = "10")]
get
{
/*
An exception occurred when decompiling this method (0600A0F7)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint::get_AffineYCoord()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:class BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement[](var_0_06, callvirt:class BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement[](ECPoint::GetZCoords, ldloc:ECPoint(this)))
stloc:bool(var_1_0D, call:bool(ECPoint::SatisfiesCurveEquation, ldloc:ECPoint(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: 0x1700196A RID: 6506
// (get) Token: 0x0600A0F8 RID: 41208 RVA: 0x002269EC File Offset: 0x00224BEC
[Token(Token = "0x1700196A")]
public virtual ECFieldElement XCoord
{
[Token(Token = "0x600A0F8")]
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "11")]
get
{
return this.m_x;
}
}
// Token: 0x1700196B RID: 6507
// (get) Token: 0x0600A0F9 RID: 41209 RVA: 0x00226A00 File Offset: 0x00224C00
[Token(Token = "0x1700196B")]
public virtual ECFieldElement YCoord
{
[Token(Token = "0x600A0F9")]
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400", Slot = "12")]
get
{
return this.m_y;
}
}
// Token: 0x0600A0FA RID: 41210 RVA: 0x00226A14 File Offset: 0x00224C14
[Token(Token = "0x600A0FA")]
[Address(RVA = "0x209F3D0", Offset = "0x209E1D0", VA = "0x18209F3D0", Slot = "13")]
public virtual ECFieldElement GetZCoord(int index)
{
ECFieldElement[] zs = this.m_zs;
int length = zs.Length;
if (index < length)
{
return zs[index];
}
throw new IndexOutOfRangeException();
}
// Token: 0x0600A0FB RID: 41211 RVA: 0x00226A44 File Offset: 0x00224C44
[Token(Token = "0x600A0FB")]
[Address(RVA = "0x209F420", Offset = "0x209E220", VA = "0x18209F420", Slot = "14")]
public virtual ECFieldElement[] GetZCoords()
{
ECFieldElement[] zs = this.m_zs;
int length = zs.Length;
if (length != 0)
{
ECFieldElement[] array = new ECFieldElement[length];
ECFieldElement[] zs2 = this.m_zs;
int num = 0;
int num2 = 0;
Array.Copy(zs2, num2, array, num, length);
}
return zs;
}
// Token: 0x1700196C RID: 6508
// (get) Token: 0x0600A0FC RID: 41212 RVA: 0x00226A8C File Offset: 0x00224C8C
[Token(Token = "0x1700196C")]
protected internal ECFieldElement RawXCoord
{
[Token(Token = "0x600A0FC")]
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
get
{
return this.m_x;
}
}
// Token: 0x1700196D RID: 6509
// (get) Token: 0x0600A0FD RID: 41213 RVA: 0x00226AA0 File Offset: 0x00224CA0
[Token(Token = "0x1700196D")]
protected internal ECFieldElement RawYCoord
{
[Token(Token = "0x600A0FD")]
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
get
{
return this.m_y;
}
}
// Token: 0x1700196E RID: 6510
// (get) Token: 0x0600A0FE RID: 41214 RVA: 0x00226AB4 File Offset: 0x00224CB4
[Token(Token = "0x1700196E")]
protected internal ECFieldElement[] RawZCoords
{
[Token(Token = "0x600A0FE")]
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
get
{
return this.m_zs;
}
}
// Token: 0x0600A0FF RID: 41215 RVA: 0x00226AC8 File Offset: 0x00224CC8
[Token(Token = "0x600A0FF")]
[Address(RVA = "0x209EAB0", Offset = "0x209D8B0", VA = "0x18209EAB0", Slot = "15")]
protected virtual void CheckNormalized()
{
this.CheckNormalized();
}
// Token: 0x0600A100 RID: 41216 RVA: 0x00226AE8 File Offset: 0x00224CE8
[Token(Token = "0x600A100")]
[Address(RVA = "0x209F650", Offset = "0x209E450", VA = "0x18209F650", Slot = "16")]
public virtual bool IsNormalized()
{
ECPoint ecpoint = this.Detach();
if (ecpoint != 0 && ecpoint != (ulong)5L && (this.m_x != (ulong)0L || this.m_y != (ulong)0L))
{
BigInteger bigInteger = this.m_zs[0].ToBigInteger();
}
return true;
}
// Token: 0x0600A101 RID: 41217 RVA: 0x00226B38 File Offset: 0x00224D38
[Token(Token = "0x600A101")]
[Address(RVA = "0x209F830", Offset = "0x209E630", VA = "0x18209F830", Slot = "17")]
public virtual ECPoint Normalize()
{
if (this.m_x != (ulong)0L || this.m_y != (ulong)0L)
{
ECPoint ecpoint = this.Detach();
if (ecpoint != 0 && ecpoint != (ulong)5L)
{
ECFieldElement ecfieldElement = this.m_zs[0];
if (ecfieldElement.BitLength == 0)
{
ECFieldElement ecfieldElement2 = ecfieldElement.Square();
bool flag = this.SatisfiesCurveEquation();
}
}
}
return this;
}
// Token: 0x0600A102 RID: 41218 RVA: 0x00226B98 File Offset: 0x00224D98
[Token(Token = "0x600A102")]
[Address(RVA = "0x209F6F0", Offset = "0x209E4F0", VA = "0x18209F6F0", Slot = "18")]
internal virtual ECPoint Normalize(ECFieldElement zInv)
{
/*
An exception occurred when decompiling this method (0600A102)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint::Normalize(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_26:
stloc:InvalidOperationException(var_3_30, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("not a projective coordinate system")))
}
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: 0x0600A103 RID: 41219 RVA: 0x00226BD8 File Offset: 0x00224DD8
[Token(Token = "0x600A103")]
[Address(RVA = "0x209EB30", Offset = "0x209D930", VA = "0x18209EB30", Slot = "19")]
protected virtual ECPoint CreateScaledPoint(ECFieldElement sx, ECFieldElement sy)
{
bool flag = this.SatisfiesOrder();
ECFieldElement ecfieldElement = this.m_x.Subtract(sx);
ECFieldElement ecfieldElement2 = this.m_y.Subtract(sy);
throw new NullReferenceException();
}
// Token: 0x1700196F RID: 6511
// (get) Token: 0x0600A104 RID: 41220 RVA: 0x00226C0C File Offset: 0x00224E0C
[Token(Token = "0x1700196F")]
public bool IsInfinity
{
[Token(Token = "0x600A104")]
[Address(RVA = "0x20A00E0", Offset = "0x209EEE0", VA = "0x1820A00E0")]
get
{
if (this.m_x != (ulong)0L)
{
}
return this.m_y == (ulong)0L;
}
}
// Token: 0x17001970 RID: 6512
// (get) Token: 0x0600A105 RID: 41221 RVA: 0x00226C34 File Offset: 0x00224E34
[Token(Token = "0x17001970")]
public bool IsCompressed
{
[Token(Token = "0x600A105")]
[Address(RVA = "0x4364F0", Offset = "0x4352F0", VA = "0x1804364F0")]
get
{
return this.m_withCompression;
}
}
// Token: 0x0600A106 RID: 41222 RVA: 0x00226C48 File Offset: 0x00224E48
[Token(Token = "0x600A106")]
[Address(RVA = "0x209F6E0", Offset = "0x209E4E0", VA = "0x18209F6E0")]
public bool IsValid()
{
int num = 0;
return this.ImplIsValid(num != 0, true);
}
// Token: 0x0600A107 RID: 41223 RVA: 0x00226C60 File Offset: 0x00224E60
[Token(Token = "0x600A107")]
[Address(RVA = "0x209F6D0", Offset = "0x209E4D0", VA = "0x18209F6D0")]
internal bool IsValidPartial()
{
int num = 0;
int num2 = 0;
return this.ImplIsValid(num2 != 0, num != 0);
}
// Token: 0x0600A108 RID: 41224 RVA: 0x00226C7C File Offset: 0x00224E7C
[Token(Token = "0x600A108")]
[Address(RVA = "0x209F4B0", Offset = "0x209E2B0", VA = "0x18209F4B0")]
internal bool ImplIsValid(bool decompressed, bool checkOrder)
{
if (this.m_x == (ulong)0L && this.m_y == (ulong)0L)
{
return true;
}
ECPoint.ValidityCallback validityCallback;
validityCallback.m_outer = this;
validityCallback.m_decompressed = decompressed;
validityCallback.m_checkOrder = checkOrder;
bool flag = this.SatisfiesOrder();
return "{il2cpp field on System.Boolean.System.IConvertible.ToDecimal, offset 0x10}" == (ulong)0L;
}
// Token: 0x0600A109 RID: 41225 RVA: 0x00226CD4 File Offset: 0x00224ED4
[Token(Token = "0x600A109")]
[Address(RVA = "0x209FB20", Offset = "0x209E920", VA = "0x18209FB20", Slot = "20")]
public virtual ECPoint ScaleX(ECFieldElement scale)
{
if (this.m_x == (ulong)0L && this.m_y == (ulong)0L)
{
return this;
}
bool flag = this.SatisfiesOrder();
ECFieldElement ecfieldElement = this.m_x.Subtract(scale);
bool withCompression = this.m_withCompression;
throw new NullReferenceException();
}
// Token: 0x0600A10A RID: 41226 RVA: 0x00226D1C File Offset: 0x00224F1C
[Token(Token = "0x600A10A")]
[Address(RVA = "0x209FBD0", Offset = "0x209E9D0", VA = "0x18209FBD0", Slot = "21")]
public virtual ECPoint ScaleY(ECFieldElement scale)
{
if (this.m_x == (ulong)0L && this.m_y == (ulong)0L)
{
return this;
}
bool flag = this.SatisfiesOrder();
ECFieldElement ecfieldElement = this.m_y.Subtract(scale);
bool withCompression = this.m_withCompression;
throw new NullReferenceException();
}
// Token: 0x0600A10B RID: 41227 RVA: 0x00226D64 File Offset: 0x00224F64
[Token(Token = "0x600A10B")]
[Address(RVA = "0x209EF00", Offset = "0x209DD00", VA = "0x18209EF00", Slot = "0")]
public override bool Equals(object obj)
{
if (obj == 0)
{
}
return this.SatisfiesCurveEquation();
}
// Token: 0x0600A10C RID: 41228 RVA: 0x00226D80 File Offset: 0x00224F80
[Token(Token = "0x600A10C")]
[Address(RVA = "0x209EBF0", Offset = "0x209D9F0", VA = "0x18209EBF0", Slot = "22")]
public virtual bool Equals(ECPoint other)
{
if (this != other && other != 0)
{
bool flag = this.SatisfiesOrder();
bool flag2 = !flag;
bool flag3 = !flag;
if (this.m_x != (ulong)0L)
{
}
if (other.m_x != (ulong)0L)
{
}
if (other.m_y == (ulong)0L)
{
if (flag2 == flag3)
{
if (!flag2)
{
if (!flag3)
{
ECPoint[] array = new ECPoint[2];
throw new ArrayTypeMismatchException();
}
ECPoint ecpoint;
bool flag4 = ecpoint.IsNormalized();
}
ECPoint ecpoint2;
bool flag5 = ecpoint2.IsNormalized();
}
short num;
short num2;
if (num.Equals(num2))
{
ushort num3;
ushort num4;
return num3.Equals(num4);
}
}
}
throw new IndexOutOfRangeException();
}
// Token: 0x0600A10D RID: 41229 RVA: 0x00226E58 File Offset: 0x00225058
[Token(Token = "0x600A10D")]
[Address(RVA = "0x209EFF0", Offset = "0x209DDF0", VA = "0x18209EFF0", Slot = "2")]
public override int GetHashCode()
{
bool flag = this.SatisfiesOrder();
if (!flag)
{
}
flag.Finalize();
if (this.m_x != (ulong)0L || this.m_y != (ulong)0L)
{
bool flag2 = this.IsNormalized();
short num;
num.Finalize();
ushort num2;
num2.Finalize();
long num3 = (long)((uint)num2 * (uint)257);
}
throw new NullReferenceException();
}
// Token: 0x0600A10E RID: 41230 RVA: 0x00226EB0 File Offset: 0x002250B0
[Token(Token = "0x600A10E")]
[Address(RVA = "0x209FD50", Offset = "0x209EB50", VA = "0x18209FD50", Slot = "3")]
public override string ToString()
{
if (this.m_x == (ulong)0L && this.m_y == (ulong)0L)
{
return "INF";
}
StringBuilder stringBuilder = new StringBuilder();
ECFieldElement x = this.m_x;
StringBuilder stringBuilder2 = stringBuilder.Append(x);
ECFieldElement y = this.m_y;
StringBuilder stringBuilder3 = stringBuilder.Append(y);
ECFieldElement[] zs = this.m_zs;
int num = 0;
if (num < zs.Length)
{
ECFieldElement ecfieldElement = this.m_zs[num];
StringBuilder stringBuilder4 = stringBuilder.Append(ecfieldElement);
ECFieldElement[] zs2 = this.m_zs;
num++;
}
throw new NullReferenceException();
}
// Token: 0x0600A10F RID: 41231 RVA: 0x00226F44 File Offset: 0x00225144
[Token(Token = "0x600A10F")]
[Address(RVA = "0x209EFD0", Offset = "0x209DDD0", VA = "0x18209EFD0", Slot = "23")]
public virtual byte[] GetEncoded()
{
/*
An exception occurred when decompiling this method (0600A10F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint::GetEncoded()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:bool(var_0_06, call:bool(ECPoint::SatisfiesCurveEquation, ldloc:ECPoint(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: 0x0600A110 RID: 41232
[Token(Token = "0x600A110")]
[Address(Slot = "24")]
public abstract byte[] GetEncoded(bool compressed);
// Token: 0x17001971 RID: 6513
// (get) Token: 0x0600A111 RID: 41233
[Token(Token = "0x17001971")]
protected internal abstract bool CompressionYTilde
{
[Token(Token = "0x600A111")]
[Address(Slot = "25")]
get;
}
// Token: 0x0600A112 RID: 41234
[Token(Token = "0x600A112")]
[Address(Slot = "26")]
public abstract ECPoint Add(ECPoint b);
// Token: 0x0600A113 RID: 41235
[Token(Token = "0x600A113")]
[Address(Slot = "27")]
public abstract ECPoint Subtract(ECPoint b);
// Token: 0x0600A114 RID: 41236
[Token(Token = "0x600A114")]
[Address(Slot = "28")]
public abstract ECPoint Negate();
// Token: 0x0600A115 RID: 41237 RVA: 0x00226F58 File Offset: 0x00225158
[Token(Token = "0x600A115")]
[Address(RVA = "0x209FCB0", Offset = "0x209EAB0", VA = "0x18209FCB0", Slot = "29")]
public virtual ECPoint TimesPow2(int e)
{
ECPoint ecpoint;
return ecpoint;
}
// Token: 0x0600A116 RID: 41238
[Token(Token = "0x600A116")]
[Address(Slot = "30")]
public abstract ECPoint Twice();
// Token: 0x0600A117 RID: 41239
[Token(Token = "0x600A117")]
[Address(Slot = "31")]
public abstract ECPoint Multiply(BigInteger b);
// Token: 0x0600A118 RID: 41240 RVA: 0x00226F78 File Offset: 0x00225178
[Token(Token = "0x600A118")]
[Address(RVA = "0x209FEA0", Offset = "0x209ECA0", VA = "0x18209FEA0", Slot = "32")]
public virtual ECPoint TwicePlus(ECPoint b)
{
ECPoint ecpoint;
bool flag = ecpoint.SatisfiesCurveEquation();
throw new NullReferenceException();
}
// Token: 0x0600A119 RID: 41241 RVA: 0x00226F94 File Offset: 0x00225194
[Token(Token = "0x600A119")]
[Address(RVA = "0x209FC90", Offset = "0x209EA90", VA = "0x18209FC90", Slot = "33")]
public virtual ECPoint ThreeTimes()
{
/*
An exception occurred when decompiling this method (0600A119)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint::ThreeTimes()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:bool(var_0_06, call:bool(ECPoint::SatisfiesCurveEquation, ldloc:ECPoint(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: 0x04006A8F RID: 27279
[Token(Token = "0x4006A8F")]
protected static ECFieldElement[] EMPTY_ZS = new ECFieldElement[0];
// Token: 0x04006A90 RID: 27280
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A90")]
protected internal readonly ECCurve m_curve;
// Token: 0x04006A91 RID: 27281
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A91")]
protected internal readonly ECFieldElement m_x;
// Token: 0x04006A92 RID: 27282
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A92")]
protected internal readonly ECFieldElement m_y;
// Token: 0x04006A93 RID: 27283
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006A93")]
protected internal readonly ECFieldElement[] m_zs;
// Token: 0x04006A94 RID: 27284
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006A94")]
protected internal readonly bool m_withCompression;
// Token: 0x04006A95 RID: 27285
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006A95")]
protected internal IDictionary m_preCompTable;
// Token: 0x020019FD RID: 6653
[Token(Token = "0x20019FD")]
private class ValidityCallback : IPreCompCallback
{
// Token: 0x0600A11B RID: 41243 RVA: 0x00226FC0 File Offset: 0x002251C0
[Token(Token = "0x600A11B")]
[Address(RVA = "0x1C74030", Offset = "0x1C72E30", VA = "0x181C74030")]
internal ValidityCallback(ECPoint outer, bool decompressed, bool checkOrder)
{
this.m_outer = outer;
this.m_decompressed = decompressed;
this.m_checkOrder = checkOrder;
}
// Token: 0x0600A11C RID: 41244 RVA: 0x00226FE8 File Offset: 0x002251E8
[Token(Token = "0x600A11C")]
[Address(RVA = "0x20AD420", Offset = "0x20AC220", VA = "0x1820AD420", Slot = "4")]
public PreCompInfo Precompute(PreCompInfo existing)
{
ValidityPreCompInfo validityPreCompInfo;
if (existing == 0 || existing == 0)
{
validityPreCompInfo = new ValidityPreCompInfo();
}
if (!validityPreCompInfo.failed)
{
if (!validityPreCompInfo.curveEquationPassed)
{
if (!this.m_decompressed && this.m_outer.ToString() == 0)
{
goto IL_65;
}
validityPreCompInfo.ReportCurveEquationPassed();
}
if (this.m_checkOrder && !validityPreCompInfo.orderPassed && this.m_outer.SatisfiesCurveEquation())
{
validityPreCompInfo.ReportOrderPassed();
}
}
IL_65:
throw new NullReferenceException();
}
// Token: 0x04006A96 RID: 27286
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A96")]
private readonly ECPoint m_outer;
// Token: 0x04006A97 RID: 27287
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A97")]
private readonly bool m_decompressed;
// Token: 0x04006A98 RID: 27288
[FieldOffset(Offset = "0x19")]
[Token(Token = "0x4006A98")]
private readonly bool m_checkOrder;
}
}
}