scripts
This commit is contained in:
+325
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x020014D8 RID: 5336
|
||||
[Token(Token = "0x20014D8")]
|
||||
[StructLayout(3)]
|
||||
internal class SM2P256V1Curve : AbstractFpCurve
|
||||
{
|
||||
// Token: 0x06008DA7 RID: 36263 RVA: 0x001F8C28 File Offset: 0x001F6E28
|
||||
[Token(Token = "0x6008DA7")]
|
||||
[Address(RVA = "0x2218C40", Offset = "0x2217640", VA = "0x182218C40")]
|
||||
public SM2P256V1Curve()
|
||||
{
|
||||
BigInteger bigInteger = SM2P256V1Curve.q;
|
||||
base..ctor(bigInteger);
|
||||
int num;
|
||||
int num2;
|
||||
ulong num3;
|
||||
SM2P256V1Point sm2P256V1Point = new SM2P256V1Point(this, num, num2, num3 != 0UL);
|
||||
num2 = 0;
|
||||
num = 0;
|
||||
this.m_infinity = sm2P256V1Point;
|
||||
byte[] array = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC");
|
||||
BigInteger bigInteger2 = new BigInteger(1, array);
|
||||
int fieldSize = this.FieldSize;
|
||||
this.m_a = fieldSize;
|
||||
byte[] array2 = Hex.Decode("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93");
|
||||
BigInteger bigInteger3 = new BigInteger(1, array2);
|
||||
int fieldSize2 = this.FieldSize;
|
||||
this.m_b = fieldSize2;
|
||||
byte[] array3 = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123");
|
||||
BigInteger bigInteger4 = new BigInteger(1, array3);
|
||||
this.m_order = bigInteger4;
|
||||
BigInteger one = BigInteger.One;
|
||||
this.m_cofactor = one;
|
||||
this.m_coord = (int)((ulong)2L);
|
||||
}
|
||||
|
||||
// Token: 0x06008DA8 RID: 36264 RVA: 0x001F8CDC File Offset: 0x001F6EDC
|
||||
[Token(Token = "0x6008DA8")]
|
||||
[Address(RVA = "0x2218750", Offset = "0x2217150", VA = "0x182218750", Slot = "12")]
|
||||
protected override ECCurve CloneCurve()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DA8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Curve::CloneCurve()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SM2P256V1Curve(var_0_05, newobj:SM2P256V1Curve(SM2P256V1Curve::.ctor))
|
||||
}
|
||||
|
||||
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: 0x06008DA9 RID: 36265 RVA: 0x001F8CF0 File Offset: 0x001F6EF0
|
||||
[Token(Token = "0x6008DA9")]
|
||||
[Address(RVA = "0x2218B90", Offset = "0x2217590", VA = "0x182218B90", Slot = "16")]
|
||||
public override bool SupportsCoordinateSystem(int coord)
|
||||
{
|
||||
return coord == 2;
|
||||
}
|
||||
|
||||
// Token: 0x170016FB RID: 5883
|
||||
// (get) Token: 0x06008DAA RID: 36266 RVA: 0x001F8D04 File Offset: 0x001F6F04
|
||||
[Token(Token = "0x170016FB")]
|
||||
public virtual BigInteger Q
|
||||
{
|
||||
[Token(Token = "0x6008DAA")]
|
||||
[Address(RVA = "0x2218E90", Offset = "0x2217890", VA = "0x182218E90", Slot = "38")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1Curve.q;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170016FC RID: 5884
|
||||
// (get) Token: 0x06008DAB RID: 36267 RVA: 0x001F8D18 File Offset: 0x001F6F18
|
||||
[Token(Token = "0x170016FC")]
|
||||
public override ECPoint Infinity
|
||||
{
|
||||
[Token(Token = "0x6008DAB")]
|
||||
[Address(RVA = "0x462740", Offset = "0x461140", VA = "0x180462740", Slot = "22")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DAB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Curve::get_Infinity()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SM2P256V1Point(var_0_06, ldfld:SM2P256V1Point(SM2P256V1Curve::m_infinity, ldloc:SM2P256V1Curve(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: 0x170016FD RID: 5885
|
||||
// (get) Token: 0x06008DAC RID: 36268 RVA: 0x001F8D2C File Offset: 0x001F6F2C
|
||||
[Token(Token = "0x170016FD")]
|
||||
public override int FieldSize
|
||||
{
|
||||
[Token(Token = "0x6008DAC")]
|
||||
[Address(RVA = "0x2218E20", Offset = "0x2217820", VA = "0x182218E20", Slot = "4")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1Curve.q.BitLength;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DAD RID: 36269 RVA: 0x001F8D4C File Offset: 0x001F6F4C
|
||||
[Token(Token = "0x6008DAD")]
|
||||
[Address(RVA = "0x2218B30", Offset = "0x2217530", VA = "0x182218B30", Slot = "5")]
|
||||
public override ECFieldElement FromBigInteger(BigInteger x)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DAD)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Curve::FromBigInteger(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SM2P256V1FieldElement(var_0_06, newobj:SM2P256V1FieldElement(SM2P256V1FieldElement::.ctor, 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: 0x06008DAE RID: 36270 RVA: 0x001F8D60 File Offset: 0x001F6F60
|
||||
[Token(Token = "0x6008DAE")]
|
||||
[Address(RVA = "0x2218AA0", Offset = "0x22174A0", VA = "0x182218AA0", Slot = "13")]
|
||||
protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, bool withCompression)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DAE)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Curve::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:SM2P256V1Point(var_0_09, newobj:SM2P256V1Point(SM2P256V1Point::.ctor, ldloc:SM2P256V1Curve[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: 0x06008DAF RID: 36271 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6008DAF")]
|
||||
[Address(RVA = "0x2218A00", Offset = "0x2217400", VA = "0x182218A00", 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: 0x06008DB0 RID: 36272 RVA: 0x001F8D78 File Offset: 0x001F6F78
|
||||
[Token(Token = "0x6008DB0")]
|
||||
[Address(RVA = "0x22187A0", Offset = "0x22171A0", VA = "0x1822187A0", Slot = "29")]
|
||||
public override ECLookupTable CreateCacheSafeLookupTable(ECPoint[] points, int off, int len)
|
||||
{
|
||||
uint[] array;
|
||||
int num;
|
||||
for (;;)
|
||||
{
|
||||
array = new uint[len];
|
||||
num = 0;
|
||||
if (len <= 0)
|
||||
{
|
||||
goto IL_4A;
|
||||
}
|
||||
ECPoint ecpoint = points[off];
|
||||
ECFieldElement x = ecpoint.m_x;
|
||||
if (x != 0 && x != 0)
|
||||
{
|
||||
ECFieldElement y = ecpoint.m_y;
|
||||
if (y != 0 && y != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
num += 16;
|
||||
IL_4A:
|
||||
SM2P256V1Curve.SM2P256V1LookupTable sm2P256V1LookupTable;
|
||||
sm2P256V1LookupTable.m_outer = 0;
|
||||
sm2P256V1LookupTable.m_table = array;
|
||||
sm2P256V1LookupTable.m_size = len;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DB1 RID: 36273 RVA: 0x001F8DEC File Offset: 0x001F6FEC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6008DB1")]
|
||||
[Address(RVA = "0x2218BA0", Offset = "0x22175A0", VA = "0x182218BA0")]
|
||||
static SM2P256V1Curve()
|
||||
{
|
||||
byte[] array = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF");
|
||||
SM2P256V1Curve.q = new BigInteger(1, array);
|
||||
}
|
||||
|
||||
// Token: 0x04005E27 RID: 24103
|
||||
[Token(Token = "0x4005E27")]
|
||||
public static readonly BigInteger q;
|
||||
|
||||
// Token: 0x04005E28 RID: 24104
|
||||
[Token(Token = "0x4005E28")]
|
||||
private const int SM2P256V1_DEFAULT_COORDS = 2;
|
||||
|
||||
// Token: 0x04005E29 RID: 24105
|
||||
[Token(Token = "0x4005E29")]
|
||||
private const int SM2P256V1_FE_INTS = 8;
|
||||
|
||||
// Token: 0x04005E2A RID: 24106
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4005E2A")]
|
||||
protected readonly SM2P256V1Point m_infinity;
|
||||
|
||||
// Token: 0x020014D9 RID: 5337
|
||||
[Token(Token = "0x20014D9")]
|
||||
private class SM2P256V1LookupTable : ECLookupTable
|
||||
{
|
||||
// Token: 0x06008DB2 RID: 36274 RVA: 0x001F8E10 File Offset: 0x001F7010
|
||||
[Token(Token = "0x6008DB2")]
|
||||
[Address(RVA = "0x602F40", Offset = "0x601940", VA = "0x180602F40")]
|
||||
internal SM2P256V1LookupTable(SM2P256V1Curve outer, uint[] table, int size)
|
||||
{
|
||||
this.m_outer = outer;
|
||||
this.m_table = table;
|
||||
this.m_size = size;
|
||||
}
|
||||
|
||||
// Token: 0x170016FE RID: 5886
|
||||
// (get) Token: 0x06008DB3 RID: 36275 RVA: 0x001F8E38 File Offset: 0x001F7038
|
||||
[Token(Token = "0x170016FE")]
|
||||
public virtual int Size
|
||||
{
|
||||
[Token(Token = "0x6008DB3")]
|
||||
[Address(RVA = "0x4FBD40", Offset = "0x4FA740", VA = "0x1804FBD40", Slot = "6")]
|
||||
get
|
||||
{
|
||||
return this.m_size;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DB4 RID: 36276 RVA: 0x001F8E4C File Offset: 0x001F704C
|
||||
[Token(Token = "0x6008DB4")]
|
||||
[Address(RVA = "0x221B3C0", Offset = "0x2219DC0", VA = "0x18221B3C0", Slot = "7")]
|
||||
public virtual ECPoint Lookup(int index)
|
||||
{
|
||||
uint[] array = Nat256.Create();
|
||||
uint[] array2 = Nat256.Create();
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
if (this.m_size > num2)
|
||||
{
|
||||
int num3 = 0;
|
||||
uint[] table = this.m_table;
|
||||
uint[] table2 = this.m_table;
|
||||
num3++;
|
||||
num += 16;
|
||||
num2++;
|
||||
}
|
||||
SM2P256V1Curve outer = this.m_outer;
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
new SM2P256V1FieldElement().x = array2;
|
||||
ECCurve eccurve = outer.CloneCurve();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005E2B RID: 24107
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005E2B")]
|
||||
private readonly SM2P256V1Curve m_outer;
|
||||
|
||||
// Token: 0x04005E2C RID: 24108
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005E2C")]
|
||||
private readonly uint[] m_table;
|
||||
|
||||
// Token: 0x04005E2D RID: 24109
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005E2D")]
|
||||
private readonly int m_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x020014DA RID: 5338
|
||||
[Token(Token = "0x20014DA")]
|
||||
[StructLayout(3)]
|
||||
internal class SM2P256V1Field
|
||||
{
|
||||
// Token: 0x06008DB5 RID: 36277 RVA: 0x001F8ECC File Offset: 0x001F70CC
|
||||
[Token(Token = "0x6008DB5")]
|
||||
[Address(RVA = "0x221A2E0", Offset = "0x2218CE0", VA = "0x18221A2E0")]
|
||||
public static void Add(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
if (Nat256.Add(x, y, z) == (uint)0)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(z, p))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
SM2P256V1Field.AddPInvTo(z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DB6 RID: 36278 RVA: 0x001F8F04 File Offset: 0x001F7104
|
||||
[Token(Token = "0x6008DB6")]
|
||||
[Address(RVA = "0x2219F60", Offset = "0x2218960", VA = "0x182219F60")]
|
||||
public static void AddExt(uint[] xx, uint[] yy, uint[] zz)
|
||||
{
|
||||
if (Nat.Add(16, xx, yy, zz) == (uint)0)
|
||||
{
|
||||
uint[] pext = SM2P256V1Field.PExt;
|
||||
if (!Nat.Gte(16, zz, pext))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
uint[] pext2 = SM2P256V1Field.PExt;
|
||||
int num = Nat.SubFrom(16, pext2, zz);
|
||||
}
|
||||
|
||||
// Token: 0x06008DB7 RID: 36279 RVA: 0x001F8F48 File Offset: 0x001F7148
|
||||
[Token(Token = "0x6008DB7")]
|
||||
[Address(RVA = "0x221A080", Offset = "0x2218A80", VA = "0x18221A080")]
|
||||
public static void AddOne(uint[] x, uint[] z)
|
||||
{
|
||||
if (Nat.Inc(8, x, z) == (uint)0)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(z, p))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
SM2P256V1Field.AddPInvTo(z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DB8 RID: 36280 RVA: 0x001F8F80 File Offset: 0x001F7180
|
||||
[Token(Token = "0x6008DB8")]
|
||||
[Address(RVA = "0x221A3D0", Offset = "0x2218DD0", VA = "0x18221A3D0")]
|
||||
public static uint[] FromBigInteger(BigInteger x)
|
||||
{
|
||||
uint[] array = Nat256.FromBigInteger(x);
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (Nat256.Gte(array, p))
|
||||
{
|
||||
int num = Nat256.SubFrom(SM2P256V1Field.P, array);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06008DB9 RID: 36281 RVA: 0x001F8FB8 File Offset: 0x001F71B8
|
||||
[Token(Token = "0x6008DB9")]
|
||||
[Address(RVA = "0x221A4C0", Offset = "0x2218EC0", VA = "0x18221A4C0")]
|
||||
public static void Half(uint[] x, uint[] z)
|
||||
{
|
||||
if ("{il2cpp array field x->}" != (ulong)1L)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
uint num = Nat256.Add(x, p, z);
|
||||
uint num2 = Nat.ShiftDownBit(8, z, num);
|
||||
return;
|
||||
}
|
||||
int num3 = 0;
|
||||
uint num4 = Nat.ShiftDownBit(8, x, (uint)num3, z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBA RID: 36282 RVA: 0x001F8FFC File Offset: 0x001F71FC
|
||||
[Token(Token = "0x6008DBA")]
|
||||
[Address(RVA = "0x221A6C0", Offset = "0x22190C0", VA = "0x18221A6C0")]
|
||||
public static void Multiply(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
uint[] array = Nat256.CreateExt();
|
||||
Nat256.Mul(x, y, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBB RID: 36283 RVA: 0x001F9020 File Offset: 0x001F7220
|
||||
[Token(Token = "0x6008DBB")]
|
||||
[Address(RVA = "0x221A5A0", Offset = "0x2218FA0", VA = "0x18221A5A0")]
|
||||
public static void MultiplyAddToExt(uint[] x, uint[] y, uint[] zz)
|
||||
{
|
||||
if (Nat256.MulAddTo(x, y, zz) == (uint)0)
|
||||
{
|
||||
uint[] pext = SM2P256V1Field.PExt;
|
||||
if (!Nat.Gte(16, zz, pext))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
uint[] pext2 = SM2P256V1Field.PExt;
|
||||
int num = Nat.SubFrom(16, pext2, zz);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBC RID: 36284 RVA: 0x001F9064 File Offset: 0x001F7264
|
||||
[Token(Token = "0x6008DBC")]
|
||||
[Address(RVA = "0x221A760", Offset = "0x2219160", VA = "0x18221A760")]
|
||||
public static void Negate(uint[] x, uint[] z)
|
||||
{
|
||||
if (!Nat256.IsZero(x))
|
||||
{
|
||||
int num = Nat256.Sub(SM2P256V1Field.P, x, z);
|
||||
return;
|
||||
}
|
||||
Nat256.Zero(z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBD RID: 36285 RVA: 0x001F9090 File Offset: 0x001F7290
|
||||
[Token(Token = "0x6008DBD")]
|
||||
[Address(RVA = "0x221AA30", Offset = "0x2219430", VA = "0x18221AA30")]
|
||||
public static void Reduce(uint[] xx, uint[] z)
|
||||
{
|
||||
int length = xx.Length;
|
||||
uint num = xx[4];
|
||||
uint num2 = xx[4];
|
||||
uint num3 = xx[5];
|
||||
uint num4 = xx[5];
|
||||
uint num5 = xx[6];
|
||||
uint num6 = xx[6];
|
||||
uint num7 = xx[7];
|
||||
uint num8 = xx[7];
|
||||
uint num9 = xx[0];
|
||||
num9 += z;
|
||||
num9 += num8;
|
||||
num9 += num7;
|
||||
num9 += num6;
|
||||
z[0] = num9;
|
||||
uint num10 = xx[0];
|
||||
num10 += num9;
|
||||
num10 -= num;
|
||||
num10 += z;
|
||||
num10 += num8;
|
||||
num10 += num7;
|
||||
z[0] = num10;
|
||||
uint num11 = xx[1];
|
||||
num11 += num10;
|
||||
z[1] = num11;
|
||||
uint num12 = xx[1];
|
||||
num12 += num11;
|
||||
num12 -= num3;
|
||||
num12 -= num2;
|
||||
num12 += z;
|
||||
num12 += num6;
|
||||
z[1] = num12;
|
||||
uint num13 = xx[2];
|
||||
num13 += num12;
|
||||
num13 -= num12;
|
||||
num13 -= num;
|
||||
num13 += z;
|
||||
num13 += num7;
|
||||
z[2] = num13;
|
||||
uint num14 = xx[2];
|
||||
num13 += num14;
|
||||
num13 += num3;
|
||||
z[2] = num13;
|
||||
uint num15 = xx[3];
|
||||
num15 += num8;
|
||||
num13 += num15;
|
||||
num13 += num7;
|
||||
num13 += num4;
|
||||
z[3] = num13;
|
||||
uint num16 = xx[3];
|
||||
num16 += z;
|
||||
num13 += num16;
|
||||
num13 += num5;
|
||||
z[3] = num13;
|
||||
SM2P256V1Field.Reduce32(num13, z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBE RID: 36286 RVA: 0x001F9248 File Offset: 0x001F7448
|
||||
[Token(Token = "0x6008DBE")]
|
||||
[Address(RVA = "0x221A800", Offset = "0x2219200", VA = "0x18221A800")]
|
||||
public static void Reduce32(uint x, uint[] z)
|
||||
{
|
||||
if (x != (uint)0)
|
||||
{
|
||||
uint num = z[0];
|
||||
num += x;
|
||||
z[0] = num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
uint num2 = z[0];
|
||||
num += num2;
|
||||
z[0] = num;
|
||||
}
|
||||
uint num3 = z[1];
|
||||
num3 -= x;
|
||||
num += num3;
|
||||
z[1] = num;
|
||||
uint num4 = z[1];
|
||||
num4 += num3;
|
||||
z[1] = num4;
|
||||
if (num4 != (uint)0)
|
||||
{
|
||||
uint num5 = z[2];
|
||||
num4 += num5;
|
||||
z[2] = num4;
|
||||
uint num6 = z[2];
|
||||
num4 += num6;
|
||||
z[2] = num4;
|
||||
uint num7 = z[3];
|
||||
num4 += num7;
|
||||
z[3] = num4;
|
||||
}
|
||||
uint num8 = z[3];
|
||||
num8 += x;
|
||||
num4 += num8;
|
||||
z[3] = num4;
|
||||
if (num4 != (uint)0)
|
||||
{
|
||||
goto IL_DB;
|
||||
}
|
||||
}
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(z, p))
|
||||
{
|
||||
return;
|
||||
}
|
||||
IL_DB:
|
||||
SM2P256V1Field.AddPInvTo(z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DBF RID: 36287 RVA: 0x001F933C File Offset: 0x001F753C
|
||||
[Token(Token = "0x6008DBF")]
|
||||
[Address(RVA = "0x221AF00", Offset = "0x2219900", VA = "0x18221AF00")]
|
||||
public static void Square(uint[] x, uint[] z)
|
||||
{
|
||||
uint[] array = Nat256.CreateExt();
|
||||
Nat256.Square(x, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DC0 RID: 36288 RVA: 0x001F9360 File Offset: 0x001F7560
|
||||
[Token(Token = "0x6008DC0")]
|
||||
[Address(RVA = "0x221AE20", Offset = "0x2219820", VA = "0x18221AE20")]
|
||||
public static void SquareN(uint[] x, int n, uint[] z)
|
||||
{
|
||||
uint[] array = Nat256.CreateExt();
|
||||
Nat256.Square(x, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
if (n > 0)
|
||||
{
|
||||
Nat256.Square(z, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DC1 RID: 36289 RVA: 0x001F9398 File Offset: 0x001F7598
|
||||
[Token(Token = "0x6008DC1")]
|
||||
[Address(RVA = "0x221B1B0", Offset = "0x2219BB0", VA = "0x18221B1B0")]
|
||||
public static void Subtract(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
if (Nat256.Sub(x, y, z) != 0)
|
||||
{
|
||||
SM2P256V1Field.SubPInvFrom(z);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DC2 RID: 36290 RVA: 0x001F93B8 File Offset: 0x001F75B8
|
||||
[Token(Token = "0x6008DC2")]
|
||||
[Address(RVA = "0x221B100", Offset = "0x2219B00", VA = "0x18221B100")]
|
||||
public static void SubtractExt(uint[] xx, uint[] yy, uint[] zz)
|
||||
{
|
||||
if (Nat.Sub(16, xx, yy, zz) != 0)
|
||||
{
|
||||
uint[] pext = SM2P256V1Field.PExt;
|
||||
uint num = Nat.AddTo(16, pext, zz);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DC3 RID: 36291 RVA: 0x001F93E4 File Offset: 0x001F75E4
|
||||
[Token(Token = "0x6008DC3")]
|
||||
[Address(RVA = "0x221B230", Offset = "0x2219C30", VA = "0x18221B230")]
|
||||
public static void Twice(uint[] x, uint[] z)
|
||||
{
|
||||
int num = 0;
|
||||
if (Nat.ShiftUpBit(8, x, (uint)num, z) == (uint)0)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(z, p))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
SM2P256V1Field.AddPInvTo(z);
|
||||
}
|
||||
|
||||
// Token: 0x06008DC4 RID: 36292 RVA: 0x001F941C File Offset: 0x001F761C
|
||||
[Token(Token = "0x6008DC4")]
|
||||
[Address(RVA = "0x221A170", Offset = "0x2218B70", VA = "0x18221A170")]
|
||||
private static void AddPInvTo(uint[] z)
|
||||
{
|
||||
uint num = z[0];
|
||||
num += (uint)1;
|
||||
z[0] = num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
uint num2 = z[0];
|
||||
num += num2;
|
||||
z[0] = num;
|
||||
}
|
||||
uint num3 = z[1];
|
||||
num3 += num;
|
||||
z[1] = num3;
|
||||
uint num4 = z[1];
|
||||
num4 += (uint)1;
|
||||
num4 += num3;
|
||||
z[1] = num4;
|
||||
if (num4 != (uint)0)
|
||||
{
|
||||
uint num5 = z[2];
|
||||
num4 += num5;
|
||||
z[2] = num4;
|
||||
uint num6 = z[2];
|
||||
num4 += num6;
|
||||
z[2] = num4;
|
||||
uint num7 = z[3];
|
||||
num4 += num7;
|
||||
z[3] = num4;
|
||||
}
|
||||
uint num8 = z[3];
|
||||
num8 += (uint)1;
|
||||
num4 += num8;
|
||||
z[3] = num4;
|
||||
}
|
||||
|
||||
// Token: 0x06008DC5 RID: 36293 RVA: 0x001F94F0 File Offset: 0x001F76F0
|
||||
[Token(Token = "0x6008DC5")]
|
||||
[Address(RVA = "0x221AF90", Offset = "0x2219990", VA = "0x18221AF90")]
|
||||
private static void SubPInvFrom(uint[] z)
|
||||
{
|
||||
uint num = z[0];
|
||||
z[0] = num;
|
||||
if (num != (uint)0)
|
||||
{
|
||||
uint num2 = z[0];
|
||||
num += num2;
|
||||
z[0] = num;
|
||||
}
|
||||
uint num3 = z[1];
|
||||
num3 += (uint)1;
|
||||
num3 += num;
|
||||
z[1] = num3;
|
||||
uint num4 = z[1];
|
||||
num4 += num3;
|
||||
z[1] = num4;
|
||||
if (num4 != (uint)0)
|
||||
{
|
||||
uint num5 = z[2];
|
||||
num4 += num5;
|
||||
z[2] = num4;
|
||||
uint num6 = z[2];
|
||||
num4 += num6;
|
||||
z[2] = num4;
|
||||
uint num7 = z[3];
|
||||
num4 += num7;
|
||||
z[3] = num4;
|
||||
}
|
||||
uint num8 = z[3];
|
||||
num4 += num8;
|
||||
z[3] = num4;
|
||||
}
|
||||
|
||||
// Token: 0x06008DC6 RID: 36294 RVA: 0x001F95B8 File Offset: 0x001F77B8
|
||||
[Token(Token = "0x6008DC6")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public SM2P256V1Field()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06008DC7 RID: 36295 RVA: 0x001F95CC File Offset: 0x001F77CC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6008DC7")]
|
||||
[Address(RVA = "0x221B320", Offset = "0x2219D20", VA = "0x18221B320")]
|
||||
static SM2P256V1Field()
|
||||
{
|
||||
uint[] array = new uint[8];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.B01915493E44597A78D21AC245268E65DDA920ED).FieldHandle);
|
||||
SM2P256V1Field.P = array;
|
||||
uint[] array2 = new uint[16];
|
||||
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.5AE32F75295B7AC2FB76118848B92F3987B949A0).FieldHandle);
|
||||
SM2P256V1Field.PExt = array2;
|
||||
}
|
||||
|
||||
// Token: 0x04005E2E RID: 24110
|
||||
[Token(Token = "0x4005E2E")]
|
||||
internal static readonly uint[] P;
|
||||
|
||||
// Token: 0x04005E2F RID: 24111
|
||||
[Token(Token = "0x4005E2F")]
|
||||
internal static readonly uint[] PExt;
|
||||
|
||||
// Token: 0x04005E30 RID: 24112
|
||||
[Token(Token = "0x4005E30")]
|
||||
internal const uint P7 = 4294967294U;
|
||||
|
||||
// Token: 0x04005E31 RID: 24113
|
||||
[Token(Token = "0x4005E31")]
|
||||
internal const uint PExt15 = 4294967294U;
|
||||
}
|
||||
}
|
||||
+450
@@ -0,0 +1,450 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x020014DB RID: 5339
|
||||
[Token(Token = "0x20014DB")]
|
||||
[StructLayout(3)]
|
||||
internal class SM2P256V1FieldElement : AbstractFpFieldElement
|
||||
{
|
||||
// Token: 0x06008DC8 RID: 36296 RVA: 0x001F960C File Offset: 0x001F780C
|
||||
[Token(Token = "0x6008DC8")]
|
||||
[Address(RVA = "0x2219C90", Offset = "0x2218690", VA = "0x182219C90")]
|
||||
public SM2P256V1FieldElement(BigInteger x)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DC8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_44:
|
||||
stloc:ArgumentException(var_5_53, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("value invalid for SM2P256V1FieldElement"), ldstr:string("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.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: 0x06008DC9 RID: 36297 RVA: 0x001F9670 File Offset: 0x001F7870
|
||||
[Token(Token = "0x6008DC9")]
|
||||
[Address(RVA = "0x2219E60", Offset = "0x2218860", VA = "0x182219E60")]
|
||||
public SM2P256V1FieldElement()
|
||||
{
|
||||
uint[] array = Nat256.Create();
|
||||
this.x = array;
|
||||
}
|
||||
|
||||
// Token: 0x06008DCA RID: 36298 RVA: 0x001F9694 File Offset: 0x001F7894
|
||||
[Token(Token = "0x6008DCA")]
|
||||
[Address(RVA = "0x2219E90", Offset = "0x2218890", VA = "0x182219E90")]
|
||||
protected internal SM2P256V1FieldElement(uint[] x)
|
||||
{
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
// Token: 0x170016FF RID: 5887
|
||||
// (get) Token: 0x06008DCB RID: 36299 RVA: 0x001F96B0 File Offset: 0x001F78B0
|
||||
[Token(Token = "0x170016FF")]
|
||||
public override bool IsZero
|
||||
{
|
||||
[Token(Token = "0x6008DCB")]
|
||||
[Address(RVA = "0x21D4BE0", Offset = "0x21D35E0", VA = "0x1821D4BE0", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return Nat256.IsZero(this.x);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001700 RID: 5888
|
||||
// (get) Token: 0x06008DCC RID: 36300 RVA: 0x001F96C8 File Offset: 0x001F78C8
|
||||
[Token(Token = "0x17001700")]
|
||||
public override bool IsOne
|
||||
{
|
||||
[Token(Token = "0x6008DCC")]
|
||||
[Address(RVA = "0x21D4BD0", Offset = "0x21D35D0", VA = "0x1821D4BD0", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return Nat256.IsOne(this.x);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DCD RID: 36301 RVA: 0x001F96E0 File Offset: 0x001F78E0
|
||||
[Token(Token = "0x6008DCD")]
|
||||
[Address(RVA = "0x21D4870", Offset = "0x21D3270", VA = "0x1821D4870", Slot = "24")]
|
||||
public override bool TestBitZero()
|
||||
{
|
||||
uint[] array = this.x;
|
||||
int num = 0;
|
||||
return Nat256.GetBit(array, num) == (uint)1;
|
||||
}
|
||||
|
||||
// Token: 0x06008DCE RID: 36302 RVA: 0x001F9704 File Offset: 0x001F7904
|
||||
[Token(Token = "0x6008DCE")]
|
||||
[Address(RVA = "0x21D4890", Offset = "0x21D3290", VA = "0x1821D4890", Slot = "4")]
|
||||
public override BigInteger ToBigInteger()
|
||||
{
|
||||
return Nat256.ToBigInteger(this.x);
|
||||
}
|
||||
|
||||
// Token: 0x17001701 RID: 5889
|
||||
// (get) Token: 0x06008DCF RID: 36303 RVA: 0x001F971C File Offset: 0x001F791C
|
||||
[Token(Token = "0x17001701")]
|
||||
public override string FieldName
|
||||
{
|
||||
[Token(Token = "0x6008DCF")]
|
||||
[Address(RVA = "0x2219EC0", Offset = "0x22188C0", VA = "0x182219EC0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "SM2P256V1Field";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001702 RID: 5890
|
||||
// (get) Token: 0x06008DD0 RID: 36304 RVA: 0x001F9730 File Offset: 0x001F7930
|
||||
[Token(Token = "0x17001702")]
|
||||
public override int FieldSize
|
||||
{
|
||||
[Token(Token = "0x6008DD0")]
|
||||
[Address(RVA = "0x2219EF0", Offset = "0x22188F0", VA = "0x182219EF0", Slot = "6")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1FieldElement.Q.BitLength;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DD1 RID: 36305 RVA: 0x001F9750 File Offset: 0x001F7950
|
||||
[Token(Token = "0x6008DD1")]
|
||||
[Address(RVA = "0x2219040", Offset = "0x2217A40", VA = "0x182219040", Slot = "7")]
|
||||
public override ECFieldElement Add(ECFieldElement b)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = Nat256.Create();
|
||||
uint[] array2 = this.x;
|
||||
if ("{il2cpp array field local3->}" == typeof(SM2P256V1FieldElement).TypeHandle)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (b == 0 || b == 0);
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DD2 RID: 36306 RVA: 0x001F9798 File Offset: 0x001F7998
|
||||
[Token(Token = "0x6008DD2")]
|
||||
[Address(RVA = "0x2218EF0", Offset = "0x22178F0", VA = "0x182218EF0", Slot = "8")]
|
||||
public override ECFieldElement AddOne()
|
||||
{
|
||||
uint[] array = Nat256.Create();
|
||||
uint[] array2 = this.x;
|
||||
if (Nat.Inc(8, array2, array) == (uint)0)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(array, p))
|
||||
{
|
||||
goto IL_31;
|
||||
}
|
||||
}
|
||||
SM2P256V1Field.AddPInvTo(array);
|
||||
IL_31:
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DD3 RID: 36307 RVA: 0x001F97E8 File Offset: 0x001F79E8
|
||||
[Token(Token = "0x6008DD3")]
|
||||
[Address(RVA = "0x2219AE0", Offset = "0x22184E0", VA = "0x182219AE0", Slot = "9")]
|
||||
public override ECFieldElement Subtract(ECFieldElement b)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = Nat256.Create();
|
||||
uint[] array2 = this.x;
|
||||
if ("{il2cpp array field local3->}" == typeof(SM2P256V1FieldElement).TypeHandle)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (b == 0 || b == 0);
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DD4 RID: 36308 RVA: 0x001F9830 File Offset: 0x001F7A30
|
||||
[Token(Token = "0x6008DD4")]
|
||||
[Address(RVA = "0x22195B0", Offset = "0x2217FB0", VA = "0x1822195B0", Slot = "10")]
|
||||
public override ECFieldElement Multiply(ECFieldElement b)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = Nat256.Create();
|
||||
uint[] array2 = this.x;
|
||||
if ("{il2cpp array field local3->}" == typeof(SM2P256V1FieldElement).TypeHandle)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (b == 0 || b == 0);
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DD5 RID: 36309 RVA: 0x001F9878 File Offset: 0x001F7A78
|
||||
[Token(Token = "0x6008DD5")]
|
||||
[Address(RVA = "0x2219180", Offset = "0x2217B80", VA = "0x182219180", Slot = "11")]
|
||||
public override ECFieldElement Divide(ECFieldElement b)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = Nat256.Create();
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if ("{il2cpp array field local3->}" == typeof(SM2P256V1FieldElement).TypeHandle)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (b == 0 || b == 0);
|
||||
uint[] array2 = this.x;
|
||||
SM2P256V1Field.Multiply(array, array2, array);
|
||||
new SM2P256V1FieldElement().x = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DD6 RID: 36310 RVA: 0x001F98D0 File Offset: 0x001F7AD0
|
||||
[Token(Token = "0x6008DD6")]
|
||||
[Address(RVA = "0x22196F0", Offset = "0x22180F0", VA = "0x1822196F0", Slot = "12")]
|
||||
public override ECFieldElement Negate()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DD6)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::Negate()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:uint32[](var_1_07, call:uint32[](Nat256::Create))
|
||||
call:void(SM2P256V1Field::Negate, ldfld:uint32[](SM2P256V1FieldElement::x, ldloc:SM2P256V1FieldElement(this)), ldloc:uint32[](var_1_07))
|
||||
stfld:uint32[](SM2P256V1FieldElement::x, newobj:SM2P256V1FieldElement(SM2P256V1FieldElement::.ctor), ldloc:uint32[](var_1_07))
|
||||
}
|
||||
|
||||
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: 0x06008DD7 RID: 36311 RVA: 0x001F98FC File Offset: 0x001F7AFC
|
||||
[Token(Token = "0x6008DD7")]
|
||||
[Address(RVA = "0x2219A50", Offset = "0x2218450", VA = "0x182219A50", Slot = "13")]
|
||||
public override ECFieldElement Square()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DD7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::Square()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:uint32[](var_1_07, call:uint32[](Nat256::Create))
|
||||
call:void(SM2P256V1Field::Square, ldfld:uint32[](SM2P256V1FieldElement::x, ldloc:SM2P256V1FieldElement(this)), ldloc:uint32[](var_1_07))
|
||||
stfld:uint32[](SM2P256V1FieldElement::x, newobj:SM2P256V1FieldElement(SM2P256V1FieldElement::.ctor), ldloc:uint32[](var_1_07))
|
||||
}
|
||||
|
||||
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: 0x06008DD8 RID: 36312 RVA: 0x001F9928 File Offset: 0x001F7B28
|
||||
[Token(Token = "0x6008DD8")]
|
||||
[Address(RVA = "0x22194E0", Offset = "0x2217EE0", VA = "0x1822194E0", Slot = "14")]
|
||||
public override ECFieldElement Invert()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DD8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::Invert()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:uint32[](var_1_07, call:uint32[](Nat256::Create))
|
||||
stloc:uint32[](var_2_0E, ldfld:uint32[](SM2P256V1FieldElement::x, ldloc:SM2P256V1FieldElement(this)))
|
||||
call:void(Mod::Invert, ldsfld:uint32[](SM2P256V1Field::P), ldloc:uint32[](var_2_0E), ldloc:uint32[](var_1_07))
|
||||
stfld:uint32[](SM2P256V1FieldElement::x, newobj:SM2P256V1FieldElement(SM2P256V1FieldElement::.ctor), ldloc:uint32[](var_1_07))
|
||||
}
|
||||
|
||||
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: 0x06008DD9 RID: 36313 RVA: 0x001F995C File Offset: 0x001F7B5C
|
||||
[Token(Token = "0x6008DD9")]
|
||||
[Address(RVA = "0x2219780", Offset = "0x2218180", VA = "0x182219780", Slot = "15")]
|
||||
public override ECFieldElement Sqrt()
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = this.x;
|
||||
}
|
||||
while (Nat256.IsZero(array) || Nat256.IsOne(array));
|
||||
uint[] array2 = Nat256.Create();
|
||||
SM2P256V1Field.Square(array, array2);
|
||||
SM2P256V1Field.Multiply(array2, array, array2);
|
||||
uint[] array3 = Nat256.Create();
|
||||
SM2P256V1Field.SquareN(array2, 2, array3);
|
||||
SM2P256V1Field.Multiply(array3, array2, array3);
|
||||
uint[] array4 = Nat256.Create();
|
||||
SM2P256V1Field.SquareN(array3, 2, array4);
|
||||
SM2P256V1Field.Multiply(array4, array2, array4);
|
||||
SM2P256V1Field.SquareN(array4, 6, array2);
|
||||
SM2P256V1Field.Multiply(array2, array4, array2);
|
||||
uint[] array5 = Nat256.Create();
|
||||
SM2P256V1Field.SquareN(array2, 12, array5);
|
||||
SM2P256V1Field.Multiply(array5, array2, array5);
|
||||
SM2P256V1Field.SquareN(array5, 6, array2);
|
||||
SM2P256V1Field.Multiply(array2, array4, array2);
|
||||
SM2P256V1Field.Square(array2, array4);
|
||||
SM2P256V1Field.Multiply(array4, array, array4);
|
||||
SM2P256V1Field.SquareN(array4, 31, array5);
|
||||
SM2P256V1Field.Multiply(array5, array4, array2);
|
||||
SM2P256V1Field.SquareN(array5, 32, array5);
|
||||
SM2P256V1Field.Multiply(array5, array2, array5);
|
||||
SM2P256V1Field.SquareN(array5, 62, array5);
|
||||
SM2P256V1Field.Multiply(array5, array2, array5);
|
||||
SM2P256V1Field.SquareN(array5, 4, array5);
|
||||
SM2P256V1Field.Multiply(array5, array3, array5);
|
||||
SM2P256V1Field.SquareN(array5, 32, array5);
|
||||
SM2P256V1Field.Multiply(array5, array, array5);
|
||||
SM2P256V1Field.SquareN(array5, 62, array5);
|
||||
SM2P256V1Field.Square(array5, array3);
|
||||
if (Nat256.Eq(array, array3))
|
||||
{
|
||||
new SM2P256V1FieldElement().x = array5;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06008DDA RID: 36314 RVA: 0x001F9AC0 File Offset: 0x001F7CC0
|
||||
[Token(Token = "0x6008DDA")]
|
||||
[Address(RVA = "0x2219390", Offset = "0x2217D90", VA = "0x182219390", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DDA)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::Equals(System.Object)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_04:
|
||||
stloc:BigInteger(var_1_0C, call:BigInteger(ECFieldElement::ToBigInteger, ldloc:SM2P256V1FieldElement[exp:ECFieldElement](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: 0x06008DDB RID: 36315 RVA: 0x001F9ADC File Offset: 0x001F7CDC
|
||||
[Token(Token = "0x6008DDB")]
|
||||
[Address(RVA = "0x2219300", Offset = "0x2217D00", VA = "0x182219300", Slot = "25")]
|
||||
public override bool Equals(ECFieldElement other)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DDB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1FieldElement::Equals(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECFieldElement)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_04:
|
||||
stloc:BigInteger(var_1_0C, call:BigInteger(ECFieldElement::ToBigInteger, ldloc:SM2P256V1FieldElement[exp:ECFieldElement](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: 0x06008DDC RID: 36316 RVA: 0x001F9AF8 File Offset: 0x001F7CF8
|
||||
[Token(Token = "0x6008DDC")]
|
||||
[Address(RVA = "0x21D3EF0", Offset = "0x21D28F0", VA = "0x1821D3EF0", Slot = "27")]
|
||||
public virtual bool Equals(SM2P256V1FieldElement other)
|
||||
{
|
||||
if (this != other)
|
||||
{
|
||||
if (other != 0)
|
||||
{
|
||||
uint[] array = other.x;
|
||||
return Nat256.Eq(this.x, array);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06008DDD RID: 36317 RVA: 0x001F9B24 File Offset: 0x001F7D24
|
||||
[Token(Token = "0x6008DDD")]
|
||||
[Address(RVA = "0x2219420", Offset = "0x2217E20", VA = "0x182219420", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
SM2P256V1FieldElement.Q.Finalize();
|
||||
uint[] array = this.x;
|
||||
int num = 0;
|
||||
return Arrays.GetHashCode(array, num, 8);
|
||||
}
|
||||
|
||||
// Token: 0x04005E32 RID: 24114
|
||||
[Token(Token = "0x4005E32")]
|
||||
public static readonly BigInteger Q = SM2P256V1Curve.q;
|
||||
|
||||
// Token: 0x04005E33 RID: 24115
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005E33")]
|
||||
protected internal readonly uint[] x;
|
||||
}
|
||||
}
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x020014DC RID: 5340
|
||||
[Token(Token = "0x20014DC")]
|
||||
[StructLayout(3)]
|
||||
internal class SM2P256V1Point : AbstractFpPoint
|
||||
{
|
||||
// Token: 0x06008DDF RID: 36319 RVA: 0x001F9B6C File Offset: 0x001F7D6C
|
||||
[Token(Token = "0x6008DDF")]
|
||||
[Address(RVA = "0x221C7B0", Offset = "0x221B1B0", VA = "0x18221C7B0")]
|
||||
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06008DE0 RID: 36320 RVA: 0x001F9B7C File Offset: 0x001F7D7C
|
||||
[Token(Token = "0x6008DE0")]
|
||||
[Address(RVA = "0x221C6F0", Offset = "0x221B0F0", VA = "0x18221C6F0")]
|
||||
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DE0)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Point::.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_11:
|
||||
stloc:ArgumentException(var_3_1B, 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: 0x06008DE1 RID: 36321 RVA: 0x001F9BA4 File Offset: 0x001F7DA4
|
||||
[Token(Token = "0x6008DE1")]
|
||||
[Address(RVA = "0x21A9D90", Offset = "0x21A8790", VA = "0x1821A9D90")]
|
||||
internal SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06008DE2 RID: 36322 RVA: 0x001F9BB4 File Offset: 0x001F7DB4
|
||||
[Token(Token = "0x6008DE2")]
|
||||
[Address(RVA = "0x221BD50", Offset = "0x221A750", VA = "0x18221BD50", Slot = "7")]
|
||||
protected override ECPoint Detach()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06008DE2)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM.SM2P256V1Point::Detach()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:int32(var_0_06, callvirtgetter:int32(ECPoint::get_CurveCoordinateSystem, ldloc:SM2P256V1Point[exp:ECPoint](this)))
|
||||
stloc:ECFieldElement(var_1_0D, callvirtgetter:ECFieldElement(ECPoint::get_AffineXCoord, ldloc:SM2P256V1Point[exp: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: 0x06008DE3 RID: 36323 RVA: 0x001F9BD0 File Offset: 0x001F7DD0
|
||||
[Token(Token = "0x6008DE3")]
|
||||
[Address(RVA = "0x221B590", Offset = "0x2219F90", VA = "0x18221B590", Slot = "26")]
|
||||
public override ECPoint Add(ECPoint b)
|
||||
{
|
||||
if (!base.IsInfinity)
|
||||
{
|
||||
if (!b.IsInfinity)
|
||||
{
|
||||
if (this == b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
bool flag = this.SatisfiesOrder();
|
||||
ECFieldElement[] zs = this.m_zs;
|
||||
ECFieldElement[] zs2 = b.m_zs;
|
||||
uint[] array = Nat256.CreateExt();
|
||||
uint[] array2 = Nat256.Create();
|
||||
uint[] array3 = Nat256.Create();
|
||||
uint[] array4 = Nat256.Create();
|
||||
if (array4 == 0)
|
||||
{
|
||||
SM2P256V1Field.Square(array4, array3);
|
||||
SM2P256V1Field.Multiply(array3, array3, array2);
|
||||
SM2P256V1Field.Multiply(array3, array3, array3);
|
||||
SM2P256V1Field.Multiply(array3, array3, array3);
|
||||
}
|
||||
SM2P256V1Field.Multiply(array4, array4, array);
|
||||
SM2P256V1Field.Multiply(array4, array4, array4);
|
||||
SM2P256V1Field.Multiply(array4, array4, array4);
|
||||
uint[] array5 = Nat256.Create();
|
||||
if (!Nat256.IsZero(array5))
|
||||
{
|
||||
SM2P256V1Field.Square(array5, array3);
|
||||
uint[] array6 = Nat256.Create();
|
||||
SM2P256V1Field.Multiply(array3, array5, array6);
|
||||
SM2P256V1Field.Negate(array6, array6);
|
||||
SM2P256V1Field.Reduce32(Nat256.AddBothTo(array3, array3, array6), array6);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement.x = array4;
|
||||
SM2P256V1Field.Square(array2, array4);
|
||||
uint[] x = sm2P256V1FieldElement.x;
|
||||
SM2P256V1Field.Subtract(x, array6, x);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement2 = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement2.x = array6;
|
||||
uint[] x2 = sm2P256V1FieldElement.x;
|
||||
SM2P256V1Field.Subtract(array3, x2, array6);
|
||||
if (Nat256.MulAddTo(sm2P256V1FieldElement2.x, array2, array) == (uint)0)
|
||||
{
|
||||
uint[] pext = SM2P256V1Field.PExt;
|
||||
if (!Nat.Gte(16, array, pext))
|
||||
{
|
||||
goto IL_189;
|
||||
}
|
||||
}
|
||||
uint[] pext2 = SM2P256V1Field.PExt;
|
||||
int num = Nat.SubFrom(16, pext2, array);
|
||||
IL_189:
|
||||
uint[] x3 = sm2P256V1FieldElement2.x;
|
||||
SM2P256V1Field.Reduce(array, x3);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement3 = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement3.x = array5;
|
||||
SM2P256V1Field.Multiply(array5, array, array5);
|
||||
uint[] x4 = sm2P256V1FieldElement3.x;
|
||||
ECFieldElement[] array7 = new ECFieldElement[1];
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
}
|
||||
bool flag2;
|
||||
if (!flag2)
|
||||
{
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
// Token: 0x06008DE4 RID: 36324 RVA: 0x001F9DC8 File Offset: 0x001F7FC8
|
||||
[Token(Token = "0x6008DE4")]
|
||||
[Address(RVA = "0x221C060", Offset = "0x221AA60", VA = "0x18221C060", Slot = "30")]
|
||||
public override ECPoint Twice()
|
||||
{
|
||||
while (!base.IsInfinity)
|
||||
{
|
||||
bool flag = this.SatisfiesOrder();
|
||||
ECFieldElement y = this.m_y;
|
||||
if (y != 0)
|
||||
{
|
||||
if (y.IsOne)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ECFieldElement x = this.m_x;
|
||||
if (x == 0)
|
||||
{
|
||||
}
|
||||
if (x != 0)
|
||||
{
|
||||
ECFieldElement ecfieldElement = this.m_zs[0];
|
||||
if (ecfieldElement == 0)
|
||||
{
|
||||
}
|
||||
if (ecfieldElement != 0)
|
||||
{
|
||||
uint[] array = Nat256.Create();
|
||||
uint[] array2 = Nat256.Create();
|
||||
uint[] array3 = Nat256.Create();
|
||||
uint[] array4 = Nat256.Create();
|
||||
SM2P256V1Field.Square(array3, array4);
|
||||
if (ecfieldElement.BitLength == 0)
|
||||
{
|
||||
}
|
||||
SM2P256V1Field.Multiply(array2, array, array2);
|
||||
SM2P256V1Field.Reduce32(Nat256.AddBothTo(array2, array2, array2), array2);
|
||||
SM2P256V1Field.Multiply(array3, array2, array3);
|
||||
int num = 0;
|
||||
SM2P256V1Field.Reduce32(Nat.ShiftUpBits(8, array3, 2, (uint)num), array3);
|
||||
int num2 = 0;
|
||||
SM2P256V1Field.Reduce32(Nat.ShiftUpBits(8, array4, 3, (uint)num2, array), array);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement.x = array4;
|
||||
SM2P256V1Field.Square(array2, array4);
|
||||
uint[] x2 = sm2P256V1FieldElement.x;
|
||||
SM2P256V1Field.Subtract(x2, array3, x2);
|
||||
uint[] x3 = sm2P256V1FieldElement.x;
|
||||
SM2P256V1Field.Subtract(x3, array3, x3);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement2 = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement2.x = array3;
|
||||
uint[] x4 = sm2P256V1FieldElement.x;
|
||||
SM2P256V1Field.Subtract(array3, x4, array3);
|
||||
uint[] x5 = sm2P256V1FieldElement2.x;
|
||||
SM2P256V1Field.Multiply(x5, array2, x5);
|
||||
uint[] x6 = sm2P256V1FieldElement2.x;
|
||||
SM2P256V1Field.Subtract(x6, array, x6);
|
||||
SM2P256V1FieldElement sm2P256V1FieldElement3 = new SM2P256V1FieldElement();
|
||||
sm2P256V1FieldElement3.x = array2;
|
||||
uint num3;
|
||||
if (num3 == (uint)0)
|
||||
{
|
||||
uint[] p = SM2P256V1Field.P;
|
||||
if (!Nat256.Gte(array2, p))
|
||||
{
|
||||
goto IL_1AB;
|
||||
}
|
||||
}
|
||||
SM2P256V1Field.AddPInvTo(array2);
|
||||
IL_1AB:
|
||||
uint[] x7 = sm2P256V1FieldElement3.x;
|
||||
(new ECFieldElement[1])[0] = sm2P256V1FieldElement3;
|
||||
bool withCompression = this.m_withCompression;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DE5 RID: 36325 RVA: 0x001F9FA4 File Offset: 0x001F81A4
|
||||
[Token(Token = "0x6008DE5")]
|
||||
[Address(RVA = "0x221BF70", Offset = "0x221A970", VA = "0x18221BF70", Slot = "32")]
|
||||
public override ECPoint TwicePlus(ECPoint b)
|
||||
{
|
||||
if (this != b)
|
||||
{
|
||||
if (!base.IsInfinity)
|
||||
{
|
||||
if (!b.IsInfinity)
|
||||
{
|
||||
if (this.m_y.IsOne)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
ECPoint ecpoint;
|
||||
bool flag = ecpoint.SatisfiesCurveEquation();
|
||||
}
|
||||
bool flag2 = base.SatisfiesCurveEquation();
|
||||
}
|
||||
return b;
|
||||
}
|
||||
bool flag3 = base.SatisfiesCurveEquation();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DE6 RID: 36326 RVA: 0x001F9FF4 File Offset: 0x001F81F4
|
||||
[Token(Token = "0x6008DE6")]
|
||||
[Address(RVA = "0x221BEF0", Offset = "0x221A8F0", VA = "0x18221BEF0", Slot = "33")]
|
||||
public override ECPoint ThreeTimes()
|
||||
{
|
||||
if (!base.IsInfinity && !this.m_y.IsOne)
|
||||
{
|
||||
ECPoint ecpoint;
|
||||
bool flag = ecpoint.SatisfiesCurveEquation();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06008DE7 RID: 36327 RVA: 0x001FA024 File Offset: 0x001F8224
|
||||
[Token(Token = "0x6008DE7")]
|
||||
[Address(RVA = "0x221BDF0", Offset = "0x221A7F0", VA = "0x18221BDF0", Slot = "28")]
|
||||
public override ECPoint Negate()
|
||||
{
|
||||
if (!base.IsInfinity)
|
||||
{
|
||||
bool flag = this.SatisfiesOrder();
|
||||
ECFieldElement y = this.m_y;
|
||||
ECFieldElement[] zs = this.m_zs;
|
||||
bool withCompression = this.m_withCompression;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user