a
This commit is contained in:
+324
@@ -0,0 +1,324 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Field;
|
||||
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: 0x02001AB5 RID: 6837
|
||||
[Token(Token = "0x2001AB5")]
|
||||
internal class SM2P256V1Curve : AbstractFpCurve
|
||||
{
|
||||
// Token: 0x0600A981 RID: 43393 RVA: 0x002502F0 File Offset: 0x0024E4F0
|
||||
[Token(Token = "0x600A981")]
|
||||
[Address(RVA = "0x1ED2340", Offset = "0x1ED1140", VA = "0x181ED2340")]
|
||||
public SM2P256V1Curve()
|
||||
{
|
||||
IFiniteField primeField = FiniteFields.GetPrimeField(SM2P256V1Curve.q);
|
||||
base..ctor(primeField);
|
||||
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 bigInteger = new BigInteger(1, array);
|
||||
int fieldSize = this.FieldSize;
|
||||
this.m_a = fieldSize;
|
||||
byte[] array2 = Hex.Decode("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93");
|
||||
BigInteger bigInteger2 = new BigInteger(1, array2);
|
||||
int fieldSize2 = this.FieldSize;
|
||||
this.m_b = fieldSize2;
|
||||
byte[] array3 = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123");
|
||||
BigInteger bigInteger3 = new BigInteger(1, array3);
|
||||
this.m_order = bigInteger3;
|
||||
BigInteger one = BigInteger.One;
|
||||
this.m_cofactor = one;
|
||||
this.m_coord = (int)((ulong)2L);
|
||||
}
|
||||
|
||||
// Token: 0x0600A982 RID: 43394 RVA: 0x002503AC File Offset: 0x0024E5AC
|
||||
[Token(Token = "0x600A982")]
|
||||
[Address(RVA = "0x1ED1E50", Offset = "0x1ED0C50", VA = "0x181ED1E50", Slot = "12")]
|
||||
protected override ECCurve CloneCurve()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A982)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A983 RID: 43395 RVA: 0x002503C0 File Offset: 0x0024E5C0
|
||||
[Token(Token = "0x600A983")]
|
||||
[Address(RVA = "0x1ED2290", Offset = "0x1ED1090", VA = "0x181ED2290", Slot = "16")]
|
||||
public override bool SupportsCoordinateSystem(int coord)
|
||||
{
|
||||
return coord == 2;
|
||||
}
|
||||
|
||||
// Token: 0x17001AFC RID: 6908
|
||||
// (get) Token: 0x0600A984 RID: 43396 RVA: 0x002503D4 File Offset: 0x0024E5D4
|
||||
[Token(Token = "0x17001AFC")]
|
||||
public virtual BigInteger Q
|
||||
{
|
||||
[Token(Token = "0x600A984")]
|
||||
[Address(RVA = "0x1ED25D0", Offset = "0x1ED13D0", VA = "0x181ED25D0", Slot = "38")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1Curve.q;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001AFD RID: 6909
|
||||
// (get) Token: 0x0600A985 RID: 43397 RVA: 0x002503E8 File Offset: 0x0024E5E8
|
||||
[Token(Token = "0x17001AFD")]
|
||||
public override ECPoint Infinity
|
||||
{
|
||||
[Token(Token = "0x600A985")]
|
||||
[Address(RVA = "0x415290", Offset = "0x414090", VA = "0x180415290", Slot = "22")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A985)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001AFE RID: 6910
|
||||
// (get) Token: 0x0600A986 RID: 43398 RVA: 0x002503FC File Offset: 0x0024E5FC
|
||||
[Token(Token = "0x17001AFE")]
|
||||
public override int FieldSize
|
||||
{
|
||||
[Token(Token = "0x600A986")]
|
||||
[Address(RVA = "0x1ED2560", Offset = "0x1ED1360", VA = "0x181ED2560", Slot = "4")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1Curve.q.BitLength;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600A987 RID: 43399 RVA: 0x0025041C File Offset: 0x0024E61C
|
||||
[Token(Token = "0x600A987")]
|
||||
[Address(RVA = "0x1ED2230", Offset = "0x1ED1030", VA = "0x181ED2230", Slot = "5")]
|
||||
public override ECFieldElement FromBigInteger(BigInteger x)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A987)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A988 RID: 43400 RVA: 0x00250430 File Offset: 0x0024E630
|
||||
[Token(Token = "0x600A988")]
|
||||
[Address(RVA = "0x1ED21A0", Offset = "0x1ED0FA0", VA = "0x181ED21A0", Slot = "13")]
|
||||
protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, bool withCompression)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A988)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A989 RID: 43401 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600A989")]
|
||||
[Address(RVA = "0x1ED2100", Offset = "0x1ED0F00", VA = "0x181ED2100", 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: 0x0600A98A RID: 43402 RVA: 0x00250448 File Offset: 0x0024E648
|
||||
[Token(Token = "0x600A98A")]
|
||||
[Address(RVA = "0x1ED1EA0", Offset = "0x1ED0CA0", VA = "0x181ED1EA0", 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: 0x0600A98B RID: 43403 RVA: 0x002504BC File Offset: 0x0024E6BC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600A98B")]
|
||||
[Address(RVA = "0x1ED22A0", Offset = "0x1ED10A0", VA = "0x181ED22A0")]
|
||||
static SM2P256V1Curve()
|
||||
{
|
||||
byte[] array = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF");
|
||||
SM2P256V1Curve.q = new BigInteger(1, array);
|
||||
}
|
||||
|
||||
// Token: 0x04006C6A RID: 27754
|
||||
[Token(Token = "0x4006C6A")]
|
||||
public static readonly BigInteger q;
|
||||
|
||||
// Token: 0x04006C6B RID: 27755
|
||||
[Token(Token = "0x4006C6B")]
|
||||
private const int SM2P256V1_DEFAULT_COORDS = 2;
|
||||
|
||||
// Token: 0x04006C6C RID: 27756
|
||||
[Token(Token = "0x4006C6C")]
|
||||
private const int SM2P256V1_FE_INTS = 8;
|
||||
|
||||
// Token: 0x04006C6D RID: 27757
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4006C6D")]
|
||||
protected readonly SM2P256V1Point m_infinity;
|
||||
|
||||
// Token: 0x02001AB6 RID: 6838
|
||||
[Token(Token = "0x2001AB6")]
|
||||
private class SM2P256V1LookupTable : ECLookupTable
|
||||
{
|
||||
// Token: 0x0600A98C RID: 43404 RVA: 0x002504E0 File Offset: 0x0024E6E0
|
||||
[Token(Token = "0x600A98C")]
|
||||
[Address(RVA = "0x412390", Offset = "0x411190", VA = "0x180412390")]
|
||||
internal SM2P256V1LookupTable(SM2P256V1Curve outer, uint[] table, int size)
|
||||
{
|
||||
this.m_outer = outer;
|
||||
this.m_table = table;
|
||||
this.m_size = size;
|
||||
}
|
||||
|
||||
// Token: 0x17001AFF RID: 6911
|
||||
// (get) Token: 0x0600A98D RID: 43405 RVA: 0x00250508 File Offset: 0x0024E708
|
||||
[Token(Token = "0x17001AFF")]
|
||||
public virtual int Size
|
||||
{
|
||||
[Token(Token = "0x600A98D")]
|
||||
[Address(RVA = "0x3F7310", Offset = "0x3F6110", VA = "0x1803F7310", Slot = "6")]
|
||||
get
|
||||
{
|
||||
return this.m_size;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600A98E RID: 43406 RVA: 0x0025051C File Offset: 0x0024E71C
|
||||
[Token(Token = "0x600A98E")]
|
||||
[Address(RVA = "0x1ED4AA0", Offset = "0x1ED38A0", VA = "0x181ED4AA0", 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: 0x04006C6E RID: 27758
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006C6E")]
|
||||
private readonly SM2P256V1Curve m_outer;
|
||||
|
||||
// Token: 0x04006C6F RID: 27759
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006C6F")]
|
||||
private readonly uint[] m_table;
|
||||
|
||||
// Token: 0x04006C70 RID: 27760
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006C70")]
|
||||
private readonly int m_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
+424
@@ -0,0 +1,424 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x02001AB7 RID: 6839
|
||||
[Token(Token = "0x2001AB7")]
|
||||
internal class SM2P256V1Field
|
||||
{
|
||||
// Token: 0x0600A98F RID: 43407 RVA: 0x0025059C File Offset: 0x0024E79C
|
||||
[Token(Token = "0x600A98F")]
|
||||
[Address(RVA = "0x1ED39C0", Offset = "0x1ED27C0", VA = "0x181ED39C0")]
|
||||
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: 0x0600A990 RID: 43408 RVA: 0x002505D4 File Offset: 0x0024E7D4
|
||||
[Token(Token = "0x600A990")]
|
||||
[Address(RVA = "0x1ED3640", Offset = "0x1ED2440", VA = "0x181ED3640")]
|
||||
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: 0x0600A991 RID: 43409 RVA: 0x00250618 File Offset: 0x0024E818
|
||||
[Token(Token = "0x600A991")]
|
||||
[Address(RVA = "0x1ED3760", Offset = "0x1ED2560", VA = "0x181ED3760")]
|
||||
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: 0x0600A992 RID: 43410 RVA: 0x00250650 File Offset: 0x0024E850
|
||||
[Token(Token = "0x600A992")]
|
||||
[Address(RVA = "0x1ED3AB0", Offset = "0x1ED28B0", VA = "0x181ED3AB0")]
|
||||
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: 0x0600A993 RID: 43411 RVA: 0x00250688 File Offset: 0x0024E888
|
||||
[Token(Token = "0x600A993")]
|
||||
[Address(RVA = "0x1ED3BA0", Offset = "0x1ED29A0", VA = "0x181ED3BA0")]
|
||||
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: 0x0600A994 RID: 43412 RVA: 0x002506CC File Offset: 0x0024E8CC
|
||||
[Token(Token = "0x600A994")]
|
||||
[Address(RVA = "0x1ED3DA0", Offset = "0x1ED2BA0", VA = "0x181ED3DA0")]
|
||||
public static void Multiply(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
uint[] array = Nat256.CreateExt();
|
||||
Nat256.Mul(x, y, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
}
|
||||
|
||||
// Token: 0x0600A995 RID: 43413 RVA: 0x002506F0 File Offset: 0x0024E8F0
|
||||
[Token(Token = "0x600A995")]
|
||||
[Address(RVA = "0x1ED3C80", Offset = "0x1ED2A80", VA = "0x181ED3C80")]
|
||||
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: 0x0600A996 RID: 43414 RVA: 0x00250734 File Offset: 0x0024E934
|
||||
[Token(Token = "0x600A996")]
|
||||
[Address(RVA = "0x1ED3E40", Offset = "0x1ED2C40", VA = "0x181ED3E40")]
|
||||
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: 0x0600A997 RID: 43415 RVA: 0x00250760 File Offset: 0x0024E960
|
||||
[Token(Token = "0x600A997")]
|
||||
[Address(RVA = "0x1ED4110", Offset = "0x1ED2F10", VA = "0x181ED4110")]
|
||||
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: 0x0600A998 RID: 43416 RVA: 0x00250918 File Offset: 0x0024EB18
|
||||
[Token(Token = "0x600A998")]
|
||||
[Address(RVA = "0x1ED3EE0", Offset = "0x1ED2CE0", VA = "0x181ED3EE0")]
|
||||
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: 0x0600A999 RID: 43417 RVA: 0x00250A0C File Offset: 0x0024EC0C
|
||||
[Token(Token = "0x600A999")]
|
||||
[Address(RVA = "0x1ED45E0", Offset = "0x1ED33E0", VA = "0x181ED45E0")]
|
||||
public static void Square(uint[] x, uint[] z)
|
||||
{
|
||||
uint[] array = Nat256.CreateExt();
|
||||
Nat256.Square(x, array);
|
||||
SM2P256V1Field.Reduce(array, z);
|
||||
}
|
||||
|
||||
// Token: 0x0600A99A RID: 43418 RVA: 0x00250A30 File Offset: 0x0024EC30
|
||||
[Token(Token = "0x600A99A")]
|
||||
[Address(RVA = "0x1ED4500", Offset = "0x1ED3300", VA = "0x181ED4500")]
|
||||
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: 0x0600A99B RID: 43419 RVA: 0x00250A68 File Offset: 0x0024EC68
|
||||
[Token(Token = "0x600A99B")]
|
||||
[Address(RVA = "0x1ED4890", Offset = "0x1ED3690", VA = "0x181ED4890")]
|
||||
public static void Subtract(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
if (Nat256.Sub(x, y, z) != 0)
|
||||
{
|
||||
SM2P256V1Field.SubPInvFrom(z);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600A99C RID: 43420 RVA: 0x00250A88 File Offset: 0x0024EC88
|
||||
[Token(Token = "0x600A99C")]
|
||||
[Address(RVA = "0x1ED47E0", Offset = "0x1ED35E0", VA = "0x181ED47E0")]
|
||||
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: 0x0600A99D RID: 43421 RVA: 0x00250AB4 File Offset: 0x0024ECB4
|
||||
[Token(Token = "0x600A99D")]
|
||||
[Address(RVA = "0x1ED4910", Offset = "0x1ED3710", VA = "0x181ED4910")]
|
||||
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: 0x0600A99E RID: 43422 RVA: 0x00250AEC File Offset: 0x0024ECEC
|
||||
[Token(Token = "0x600A99E")]
|
||||
[Address(RVA = "0x1ED3850", Offset = "0x1ED2650", VA = "0x181ED3850")]
|
||||
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: 0x0600A99F RID: 43423 RVA: 0x00250BC0 File Offset: 0x0024EDC0
|
||||
[Token(Token = "0x600A99F")]
|
||||
[Address(RVA = "0x1ED4670", Offset = "0x1ED3470", VA = "0x181ED4670")]
|
||||
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: 0x0600A9A0 RID: 43424 RVA: 0x00250C88 File Offset: 0x0024EE88
|
||||
[Token(Token = "0x600A9A0")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public SM2P256V1Field()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600A9A1 RID: 43425 RVA: 0x00250C9C File Offset: 0x0024EE9C
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600A9A1")]
|
||||
[Address(RVA = "0x1ED4A00", Offset = "0x1ED3800", VA = "0x181ED4A00")]
|
||||
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: 0x04006C71 RID: 27761
|
||||
[Token(Token = "0x4006C71")]
|
||||
internal static readonly uint[] P;
|
||||
|
||||
// Token: 0x04006C72 RID: 27762
|
||||
[Token(Token = "0x4006C72")]
|
||||
internal static readonly uint[] PExt;
|
||||
|
||||
// Token: 0x04006C73 RID: 27763
|
||||
[Token(Token = "0x4006C73")]
|
||||
internal const uint P7 = 4294967294U;
|
||||
|
||||
// Token: 0x04006C74 RID: 27764
|
||||
[Token(Token = "0x4006C74")]
|
||||
internal const uint PExt15 = 4294967294U;
|
||||
}
|
||||
}
|
||||
+448
@@ -0,0 +1,448 @@
|
||||
using System;
|
||||
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: 0x02001AB8 RID: 6840
|
||||
[Token(Token = "0x2001AB8")]
|
||||
internal class SM2P256V1FieldElement : AbstractFpFieldElement
|
||||
{
|
||||
// Token: 0x0600A9A2 RID: 43426 RVA: 0x00250CDC File Offset: 0x0024EEDC
|
||||
[Token(Token = "0x600A9A2")]
|
||||
[Address(RVA = "0x1ED33D0", Offset = "0x1ED21D0", VA = "0x181ED33D0")]
|
||||
public SM2P256V1FieldElement(BigInteger x)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9A2)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9A3 RID: 43427 RVA: 0x00250D40 File Offset: 0x0024EF40
|
||||
[Token(Token = "0x600A9A3")]
|
||||
[Address(RVA = "0x1ECEB30", Offset = "0x1ECD930", VA = "0x181ECEB30")]
|
||||
public SM2P256V1FieldElement()
|
||||
{
|
||||
uint[] array = Nat256.Create();
|
||||
this.x = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9A4 RID: 43428 RVA: 0x00250D64 File Offset: 0x0024EF64
|
||||
[Token(Token = "0x600A9A4")]
|
||||
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
|
||||
protected internal SM2P256V1FieldElement(uint[] x)
|
||||
{
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
// Token: 0x17001B00 RID: 6912
|
||||
// (get) Token: 0x0600A9A5 RID: 43429 RVA: 0x00250D80 File Offset: 0x0024EF80
|
||||
[Token(Token = "0x17001B00")]
|
||||
public override bool IsZero
|
||||
{
|
||||
[Token(Token = "0x600A9A5")]
|
||||
[Address(RVA = "0x1ECEC10", Offset = "0x1ECDA10", VA = "0x181ECEC10", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return Nat256.IsZero(this.x);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001B01 RID: 6913
|
||||
// (get) Token: 0x0600A9A6 RID: 43430 RVA: 0x00250D98 File Offset: 0x0024EF98
|
||||
[Token(Token = "0x17001B01")]
|
||||
public override bool IsOne
|
||||
{
|
||||
[Token(Token = "0x600A9A6")]
|
||||
[Address(RVA = "0x1ECEC00", Offset = "0x1ECDA00", VA = "0x181ECEC00", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return Nat256.IsOne(this.x);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600A9A7 RID: 43431 RVA: 0x00250DB0 File Offset: 0x0024EFB0
|
||||
[Token(Token = "0x600A9A7")]
|
||||
[Address(RVA = "0x1ECE8A0", Offset = "0x1ECD6A0", VA = "0x181ECE8A0", Slot = "24")]
|
||||
public override bool TestBitZero()
|
||||
{
|
||||
uint[] array = this.x;
|
||||
int num = 0;
|
||||
return Nat256.GetBit(array, num) == (uint)1;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9A8 RID: 43432 RVA: 0x00250DD4 File Offset: 0x0024EFD4
|
||||
[Token(Token = "0x600A9A8")]
|
||||
[Address(RVA = "0x1ECE8C0", Offset = "0x1ECD6C0", VA = "0x181ECE8C0", Slot = "4")]
|
||||
public override BigInteger ToBigInteger()
|
||||
{
|
||||
return Nat256.ToBigInteger(this.x);
|
||||
}
|
||||
|
||||
// Token: 0x17001B02 RID: 6914
|
||||
// (get) Token: 0x0600A9A9 RID: 43433 RVA: 0x00250DEC File Offset: 0x0024EFEC
|
||||
[Token(Token = "0x17001B02")]
|
||||
public override string FieldName
|
||||
{
|
||||
[Token(Token = "0x600A9A9")]
|
||||
[Address(RVA = "0x1ED35A0", Offset = "0x1ED23A0", VA = "0x181ED35A0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "SM2P256V1Field";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001B03 RID: 6915
|
||||
// (get) Token: 0x0600A9AA RID: 43434 RVA: 0x00250E00 File Offset: 0x0024F000
|
||||
[Token(Token = "0x17001B03")]
|
||||
public override int FieldSize
|
||||
{
|
||||
[Token(Token = "0x600A9AA")]
|
||||
[Address(RVA = "0x1ED35D0", Offset = "0x1ED23D0", VA = "0x181ED35D0", Slot = "6")]
|
||||
get
|
||||
{
|
||||
return SM2P256V1FieldElement.Q.BitLength;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600A9AB RID: 43435 RVA: 0x00250E20 File Offset: 0x0024F020
|
||||
[Token(Token = "0x600A9AB")]
|
||||
[Address(RVA = "0x1ED2780", Offset = "0x1ED1580", VA = "0x181ED2780", 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: 0x0600A9AC RID: 43436 RVA: 0x00250E68 File Offset: 0x0024F068
|
||||
[Token(Token = "0x600A9AC")]
|
||||
[Address(RVA = "0x1ED2630", Offset = "0x1ED1430", VA = "0x181ED2630", 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: 0x0600A9AD RID: 43437 RVA: 0x00250EB8 File Offset: 0x0024F0B8
|
||||
[Token(Token = "0x600A9AD")]
|
||||
[Address(RVA = "0x1ED3220", Offset = "0x1ED2020", VA = "0x181ED3220", 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: 0x0600A9AE RID: 43438 RVA: 0x00250F00 File Offset: 0x0024F100
|
||||
[Token(Token = "0x600A9AE")]
|
||||
[Address(RVA = "0x1ED2CF0", Offset = "0x1ED1AF0", VA = "0x181ED2CF0", 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: 0x0600A9AF RID: 43439 RVA: 0x00250F48 File Offset: 0x0024F148
|
||||
[Token(Token = "0x600A9AF")]
|
||||
[Address(RVA = "0x1ED28C0", Offset = "0x1ED16C0", VA = "0x181ED28C0", 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: 0x0600A9B0 RID: 43440 RVA: 0x00250FA0 File Offset: 0x0024F1A0
|
||||
[Token(Token = "0x600A9B0")]
|
||||
[Address(RVA = "0x1ED2E30", Offset = "0x1ED1C30", VA = "0x181ED2E30", Slot = "12")]
|
||||
public override ECFieldElement Negate()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9B0)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9B1 RID: 43441 RVA: 0x00250FCC File Offset: 0x0024F1CC
|
||||
[Token(Token = "0x600A9B1")]
|
||||
[Address(RVA = "0x1ED3190", Offset = "0x1ED1F90", VA = "0x181ED3190", Slot = "13")]
|
||||
public override ECFieldElement Square()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9B1)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9B2 RID: 43442 RVA: 0x00250FF8 File Offset: 0x0024F1F8
|
||||
[Token(Token = "0x600A9B2")]
|
||||
[Address(RVA = "0x1ED2C20", Offset = "0x1ED1A20", VA = "0x181ED2C20", Slot = "14")]
|
||||
public override ECFieldElement Invert()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9B2)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9B3 RID: 43443 RVA: 0x0025102C File Offset: 0x0024F22C
|
||||
[Token(Token = "0x600A9B3")]
|
||||
[Address(RVA = "0x1ED2EC0", Offset = "0x1ED1CC0", VA = "0x181ED2EC0", 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: 0x0600A9B4 RID: 43444 RVA: 0x00251190 File Offset: 0x0024F390
|
||||
[Token(Token = "0x600A9B4")]
|
||||
[Address(RVA = "0x1ED2AD0", Offset = "0x1ED18D0", VA = "0x181ED2AD0", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9B4)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9B5 RID: 43445 RVA: 0x002511AC File Offset: 0x0024F3AC
|
||||
[Token(Token = "0x600A9B5")]
|
||||
[Address(RVA = "0x1ED2A40", Offset = "0x1ED1840", VA = "0x181ED2A40", Slot = "25")]
|
||||
public override bool Equals(ECFieldElement other)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9B5)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9B6 RID: 43446 RVA: 0x002511C8 File Offset: 0x0024F3C8
|
||||
[Token(Token = "0x600A9B6")]
|
||||
[Address(RVA = "0x1ECDF20", Offset = "0x1ECCD20", VA = "0x181ECDF20", 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: 0x0600A9B7 RID: 43447 RVA: 0x002511F4 File Offset: 0x0024F3F4
|
||||
[Token(Token = "0x600A9B7")]
|
||||
[Address(RVA = "0x1ED2B60", Offset = "0x1ED1960", VA = "0x181ED2B60", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
SM2P256V1FieldElement.Q.Finalize();
|
||||
uint[] array = this.x;
|
||||
int num = 0;
|
||||
return Arrays.GetHashCode(array, num, 8);
|
||||
}
|
||||
|
||||
// Token: 0x04006C75 RID: 27765
|
||||
[Token(Token = "0x4006C75")]
|
||||
public static readonly BigInteger Q = SM2P256V1Curve.q;
|
||||
|
||||
// Token: 0x04006C76 RID: 27766
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006C76")]
|
||||
protected internal readonly uint[] x;
|
||||
}
|
||||
}
|
||||
+292
@@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.Raw;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Custom.GM
|
||||
{
|
||||
// Token: 0x02001AB9 RID: 6841
|
||||
[Token(Token = "0x2001AB9")]
|
||||
internal class SM2P256V1Point : AbstractFpPoint
|
||||
{
|
||||
// Token: 0x0600A9B9 RID: 43449 RVA: 0x0025123C File Offset: 0x0024F43C
|
||||
[Token(Token = "0x600A9B9")]
|
||||
[Address(RVA = "0x1ED5E90", Offset = "0x1ED4C90", VA = "0x181ED5E90")]
|
||||
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600A9BA RID: 43450 RVA: 0x0025124C File Offset: 0x0024F44C
|
||||
[Token(Token = "0x600A9BA")]
|
||||
[Address(RVA = "0x1ED5DD0", Offset = "0x1ED4BD0", VA = "0x181ED5DD0")]
|
||||
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9BA)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9BB RID: 43451 RVA: 0x00251274 File Offset: 0x0024F474
|
||||
[Token(Token = "0x600A9BB")]
|
||||
[Address(RVA = "0x1ECD350", Offset = "0x1ECC150", VA = "0x181ECD350")]
|
||||
internal SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600A9BC RID: 43452 RVA: 0x00251284 File Offset: 0x0024F484
|
||||
[Token(Token = "0x600A9BC")]
|
||||
[Address(RVA = "0x1ED5430", Offset = "0x1ED4230", VA = "0x181ED5430", Slot = "7")]
|
||||
protected override ECPoint Detach()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600A9BC)
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600A9BD RID: 43453 RVA: 0x002512A0 File Offset: 0x0024F4A0
|
||||
[Token(Token = "0x600A9BD")]
|
||||
[Address(RVA = "0x1ED4C70", Offset = "0x1ED3A70", VA = "0x181ED4C70", 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: 0x0600A9BE RID: 43454 RVA: 0x00251498 File Offset: 0x0024F698
|
||||
[Token(Token = "0x600A9BE")]
|
||||
[Address(RVA = "0x1ED5740", Offset = "0x1ED4540", VA = "0x181ED5740", 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: 0x0600A9BF RID: 43455 RVA: 0x00251674 File Offset: 0x0024F874
|
||||
[Token(Token = "0x600A9BF")]
|
||||
[Address(RVA = "0x1ED5650", Offset = "0x1ED4450", VA = "0x181ED5650", 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: 0x0600A9C0 RID: 43456 RVA: 0x002516C4 File Offset: 0x0024F8C4
|
||||
[Token(Token = "0x600A9C0")]
|
||||
[Address(RVA = "0x1ED55D0", Offset = "0x1ED43D0", VA = "0x181ED55D0", Slot = "33")]
|
||||
public override ECPoint ThreeTimes()
|
||||
{
|
||||
if (!base.IsInfinity && !this.m_y.IsOne)
|
||||
{
|
||||
ECPoint ecpoint;
|
||||
bool flag = ecpoint.SatisfiesCurveEquation();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600A9C1 RID: 43457 RVA: 0x002516F4 File Offset: 0x0024F8F4
|
||||
[Token(Token = "0x600A9C1")]
|
||||
[Address(RVA = "0x1ED54D0", Offset = "0x1ED42D0", VA = "0x181ED54D0", 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