This commit is contained in:
niko
2026-04-12 16:51:38 +02:00
parent 1b6f6d81d0
commit c12fbe3fc6
17828 changed files with 2994770 additions and 0 deletions
@@ -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: 0x02001B95 RID: 7061
[Token(Token = "0x2001B95")]
internal class SM2P256V1Curve : AbstractFpCurve
{
// Token: 0x0600AD4F RID: 44367 RVA: 0x0025939C File Offset: 0x0025759C
[Token(Token = "0x600AD4F")]
[Address(RVA = "0x6E9CD0", Offset = "0x6E8CD0", VA = "0x1806E9CD0")]
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: 0x0600AD50 RID: 44368 RVA: 0x00259458 File Offset: 0x00257658
[Token(Token = "0x600AD50")]
[Address(RVA = "0x6E97E0", Offset = "0x6E87E0", VA = "0x1806E97E0", Slot = "12")]
protected override ECCurve CloneCurve()
{
/*
An exception occurred when decompiling this method (0600AD50)
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: 0x0600AD51 RID: 44369 RVA: 0x0025946C File Offset: 0x0025766C
[Token(Token = "0x600AD51")]
[Address(RVA = "0x6E9C20", Offset = "0x6E8C20", VA = "0x1806E9C20", Slot = "16")]
public override bool SupportsCoordinateSystem(int coord)
{
return coord == 2;
}
// Token: 0x17001B99 RID: 7065
// (get) Token: 0x0600AD52 RID: 44370 RVA: 0x00259480 File Offset: 0x00257680
[Token(Token = "0x17001B99")]
public virtual BigInteger Q
{
[Token(Token = "0x600AD52")]
[Address(RVA = "0x6E9F60", Offset = "0x6E8F60", VA = "0x1806E9F60", Slot = "38")]
get
{
return SM2P256V1Curve.q;
}
}
// Token: 0x17001B9A RID: 7066
// (get) Token: 0x0600AD53 RID: 44371 RVA: 0x00259494 File Offset: 0x00257694
[Token(Token = "0x17001B9A")]
public override ECPoint Infinity
{
[Token(Token = "0x600AD53")]
[Address(RVA = "0x4936E0", Offset = "0x4926E0", VA = "0x1804936E0", Slot = "22")]
get
{
/*
An exception occurred when decompiling this method (0600AD53)
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: 0x17001B9B RID: 7067
// (get) Token: 0x0600AD54 RID: 44372 RVA: 0x002594A8 File Offset: 0x002576A8
[Token(Token = "0x17001B9B")]
public override int FieldSize
{
[Token(Token = "0x600AD54")]
[Address(RVA = "0x6E9EF0", Offset = "0x6E8EF0", VA = "0x1806E9EF0", Slot = "4")]
get
{
return SM2P256V1Curve.q.BitLength;
}
}
// Token: 0x0600AD55 RID: 44373 RVA: 0x002594C8 File Offset: 0x002576C8
[Token(Token = "0x600AD55")]
[Address(RVA = "0x6E9BC0", Offset = "0x6E8BC0", VA = "0x1806E9BC0", Slot = "5")]
public override ECFieldElement FromBigInteger(BigInteger x)
{
/*
An exception occurred when decompiling this method (0600AD55)
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: 0x0600AD56 RID: 44374 RVA: 0x002594DC File Offset: 0x002576DC
[Token(Token = "0x600AD56")]
[Address(RVA = "0x6E9B30", Offset = "0x6E8B30", VA = "0x1806E9B30", Slot = "13")]
protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, bool withCompression)
{
/*
An exception occurred when decompiling this method (0600AD56)
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: 0x0600AD57 RID: 44375 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600AD57")]
[Address(RVA = "0x6E9A90", Offset = "0x6E8A90", VA = "0x1806E9A90", 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: 0x0600AD58 RID: 44376 RVA: 0x002594F4 File Offset: 0x002576F4
[Token(Token = "0x600AD58")]
[Address(RVA = "0x6E9830", Offset = "0x6E8830", VA = "0x1806E9830", 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: 0x0600AD59 RID: 44377 RVA: 0x00259568 File Offset: 0x00257768
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600AD59")]
[Address(RVA = "0x6E9C30", Offset = "0x6E8C30", VA = "0x1806E9C30")]
static SM2P256V1Curve()
{
byte[] array = Hex.Decode("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF");
SM2P256V1Curve.q = new BigInteger(1, array);
}
// Token: 0x04006E23 RID: 28195
[Token(Token = "0x4006E23")]
public static readonly BigInteger q;
// Token: 0x04006E24 RID: 28196
[Token(Token = "0x4006E24")]
private const int SM2P256V1_DEFAULT_COORDS = 2;
// Token: 0x04006E25 RID: 28197
[Token(Token = "0x4006E25")]
private const int SM2P256V1_FE_INTS = 8;
// Token: 0x04006E26 RID: 28198
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4006E26")]
protected readonly SM2P256V1Point m_infinity;
// Token: 0x02001B96 RID: 7062
[Token(Token = "0x2001B96")]
private class SM2P256V1LookupTable : ECLookupTable
{
// Token: 0x0600AD5A RID: 44378 RVA: 0x0025958C File Offset: 0x0025778C
[Token(Token = "0x600AD5A")]
[Address(RVA = "0x6E7930", Offset = "0x6E6930", VA = "0x1806E7930")]
internal SM2P256V1LookupTable(SM2P256V1Curve outer, uint[] table, int size)
{
this.m_outer = outer;
this.m_table = table;
this.m_size = size;
}
// Token: 0x17001B9C RID: 7068
// (get) Token: 0x0600AD5B RID: 44379 RVA: 0x002595B4 File Offset: 0x002577B4
[Token(Token = "0x17001B9C")]
public virtual int Size
{
[Token(Token = "0x600AD5B")]
[Address(RVA = "0x470B70", Offset = "0x46FB70", VA = "0x180470B70", Slot = "6")]
get
{
return this.m_size;
}
}
// Token: 0x0600AD5C RID: 44380 RVA: 0x002595C8 File Offset: 0x002577C8
[Token(Token = "0x600AD5C")]
[Address(RVA = "0x6EC430", Offset = "0x6EB430", VA = "0x1806EC430", 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: 0x04006E27 RID: 28199
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006E27")]
private readonly SM2P256V1Curve m_outer;
// Token: 0x04006E28 RID: 28200
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006E28")]
private readonly uint[] m_table;
// Token: 0x04006E29 RID: 28201
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006E29")]
private readonly int m_size;
}
}
}
@@ -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: 0x02001B97 RID: 7063
[Token(Token = "0x2001B97")]
internal class SM2P256V1Field
{
// Token: 0x0600AD5D RID: 44381 RVA: 0x00259648 File Offset: 0x00257848
[Token(Token = "0x600AD5D")]
[Address(RVA = "0x6EB350", Offset = "0x6EA350", VA = "0x1806EB350")]
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: 0x0600AD5E RID: 44382 RVA: 0x00259680 File Offset: 0x00257880
[Token(Token = "0x600AD5E")]
[Address(RVA = "0x6EAFD0", Offset = "0x6E9FD0", VA = "0x1806EAFD0")]
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: 0x0600AD5F RID: 44383 RVA: 0x002596C4 File Offset: 0x002578C4
[Token(Token = "0x600AD5F")]
[Address(RVA = "0x6EB0F0", Offset = "0x6EA0F0", VA = "0x1806EB0F0")]
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: 0x0600AD60 RID: 44384 RVA: 0x002596FC File Offset: 0x002578FC
[Token(Token = "0x600AD60")]
[Address(RVA = "0x6EB440", Offset = "0x6EA440", VA = "0x1806EB440")]
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: 0x0600AD61 RID: 44385 RVA: 0x00259734 File Offset: 0x00257934
[Token(Token = "0x600AD61")]
[Address(RVA = "0x6EB530", Offset = "0x6EA530", VA = "0x1806EB530")]
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: 0x0600AD62 RID: 44386 RVA: 0x00259778 File Offset: 0x00257978
[Token(Token = "0x600AD62")]
[Address(RVA = "0x6EB730", Offset = "0x6EA730", VA = "0x1806EB730")]
public static void Multiply(uint[] x, uint[] y, uint[] z)
{
uint[] array = Nat256.CreateExt();
Nat256.Mul(x, y, array);
SM2P256V1Field.Reduce(array, z);
}
// Token: 0x0600AD63 RID: 44387 RVA: 0x0025979C File Offset: 0x0025799C
[Token(Token = "0x600AD63")]
[Address(RVA = "0x6EB610", Offset = "0x6EA610", VA = "0x1806EB610")]
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: 0x0600AD64 RID: 44388 RVA: 0x002597E0 File Offset: 0x002579E0
[Token(Token = "0x600AD64")]
[Address(RVA = "0x6EB7D0", Offset = "0x6EA7D0", VA = "0x1806EB7D0")]
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: 0x0600AD65 RID: 44389 RVA: 0x0025980C File Offset: 0x00257A0C
[Token(Token = "0x600AD65")]
[Address(RVA = "0x6EBAA0", Offset = "0x6EAAA0", VA = "0x1806EBAA0")]
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: 0x0600AD66 RID: 44390 RVA: 0x002599C4 File Offset: 0x00257BC4
[Token(Token = "0x600AD66")]
[Address(RVA = "0x6EB870", Offset = "0x6EA870", VA = "0x1806EB870")]
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: 0x0600AD67 RID: 44391 RVA: 0x00259AB8 File Offset: 0x00257CB8
[Token(Token = "0x600AD67")]
[Address(RVA = "0x6EBF70", Offset = "0x6EAF70", VA = "0x1806EBF70")]
public static void Square(uint[] x, uint[] z)
{
uint[] array = Nat256.CreateExt();
Nat256.Square(x, array);
SM2P256V1Field.Reduce(array, z);
}
// Token: 0x0600AD68 RID: 44392 RVA: 0x00259ADC File Offset: 0x00257CDC
[Token(Token = "0x600AD68")]
[Address(RVA = "0x6EBE90", Offset = "0x6EAE90", VA = "0x1806EBE90")]
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: 0x0600AD69 RID: 44393 RVA: 0x00259B14 File Offset: 0x00257D14
[Token(Token = "0x600AD69")]
[Address(RVA = "0x6EC220", Offset = "0x6EB220", VA = "0x1806EC220")]
public static void Subtract(uint[] x, uint[] y, uint[] z)
{
if (Nat256.Sub(x, y, z) != 0)
{
SM2P256V1Field.SubPInvFrom(z);
}
}
// Token: 0x0600AD6A RID: 44394 RVA: 0x00259B34 File Offset: 0x00257D34
[Token(Token = "0x600AD6A")]
[Address(RVA = "0x6EC170", Offset = "0x6EB170", VA = "0x1806EC170")]
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: 0x0600AD6B RID: 44395 RVA: 0x00259B60 File Offset: 0x00257D60
[Token(Token = "0x600AD6B")]
[Address(RVA = "0x6EC2A0", Offset = "0x6EB2A0", VA = "0x1806EC2A0")]
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: 0x0600AD6C RID: 44396 RVA: 0x00259B98 File Offset: 0x00257D98
[Token(Token = "0x600AD6C")]
[Address(RVA = "0x6EB1E0", Offset = "0x6EA1E0", VA = "0x1806EB1E0")]
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: 0x0600AD6D RID: 44397 RVA: 0x00259C6C File Offset: 0x00257E6C
[Token(Token = "0x600AD6D")]
[Address(RVA = "0x6EC000", Offset = "0x6EB000", VA = "0x1806EC000")]
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: 0x0600AD6E RID: 44398 RVA: 0x00259D34 File Offset: 0x00257F34
[Token(Token = "0x600AD6E")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
public SM2P256V1Field()
{
}
// Token: 0x0600AD6F RID: 44399 RVA: 0x00259D48 File Offset: 0x00257F48
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600AD6F")]
[Address(RVA = "0x6EC390", Offset = "0x6EB390", VA = "0x1806EC390")]
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: 0x04006E2A RID: 28202
[Token(Token = "0x4006E2A")]
internal static readonly uint[] P;
// Token: 0x04006E2B RID: 28203
[Token(Token = "0x4006E2B")]
internal static readonly uint[] PExt;
// Token: 0x04006E2C RID: 28204
[Token(Token = "0x4006E2C")]
internal const uint P7 = 4294967294U;
// Token: 0x04006E2D RID: 28205
[Token(Token = "0x4006E2D")]
internal const uint PExt15 = 4294967294U;
}
}
@@ -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: 0x02001B98 RID: 7064
[Token(Token = "0x2001B98")]
internal class SM2P256V1FieldElement : AbstractFpFieldElement
{
// Token: 0x0600AD70 RID: 44400 RVA: 0x00259D88 File Offset: 0x00257F88
[Token(Token = "0x600AD70")]
[Address(RVA = "0x6EAD60", Offset = "0x6E9D60", VA = "0x1806EAD60")]
public SM2P256V1FieldElement(BigInteger x)
{
/*
An exception occurred when decompiling this method (0600AD70)
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: 0x0600AD71 RID: 44401 RVA: 0x00259DEC File Offset: 0x00257FEC
[Token(Token = "0x600AD71")]
[Address(RVA = "0x6E6470", Offset = "0x6E5470", VA = "0x1806E6470")]
public SM2P256V1FieldElement()
{
uint[] array = Nat256.Create();
this.x = array;
}
// Token: 0x0600AD72 RID: 44402 RVA: 0x00259E10 File Offset: 0x00258010
[Token(Token = "0x600AD72")]
[Address(RVA = "0x681CA0", Offset = "0x680CA0", VA = "0x180681CA0")]
protected internal SM2P256V1FieldElement(uint[] x)
{
this.x = x;
}
// Token: 0x17001B9D RID: 7069
// (get) Token: 0x0600AD73 RID: 44403 RVA: 0x00259E2C File Offset: 0x0025802C
[Token(Token = "0x17001B9D")]
public override bool IsZero
{
[Token(Token = "0x600AD73")]
[Address(RVA = "0x6E6550", Offset = "0x6E5550", VA = "0x1806E6550", Slot = "18")]
get
{
return Nat256.IsZero(this.x);
}
}
// Token: 0x17001B9E RID: 7070
// (get) Token: 0x0600AD74 RID: 44404 RVA: 0x00259E44 File Offset: 0x00258044
[Token(Token = "0x17001B9E")]
public override bool IsOne
{
[Token(Token = "0x600AD74")]
[Address(RVA = "0x6E6540", Offset = "0x6E5540", VA = "0x1806E6540", Slot = "17")]
get
{
return Nat256.IsOne(this.x);
}
}
// Token: 0x0600AD75 RID: 44405 RVA: 0x00259E5C File Offset: 0x0025805C
[Token(Token = "0x600AD75")]
[Address(RVA = "0x6E61E0", Offset = "0x6E51E0", VA = "0x1806E61E0", Slot = "24")]
public override bool TestBitZero()
{
uint[] array = this.x;
int num = 0;
return Nat256.GetBit(array, num) == (uint)1;
}
// Token: 0x0600AD76 RID: 44406 RVA: 0x00259E80 File Offset: 0x00258080
[Token(Token = "0x600AD76")]
[Address(RVA = "0x6E6200", Offset = "0x6E5200", VA = "0x1806E6200", Slot = "4")]
public override BigInteger ToBigInteger()
{
return Nat256.ToBigInteger(this.x);
}
// Token: 0x17001B9F RID: 7071
// (get) Token: 0x0600AD77 RID: 44407 RVA: 0x00259E98 File Offset: 0x00258098
[Token(Token = "0x17001B9F")]
public override string FieldName
{
[Token(Token = "0x600AD77")]
[Address(RVA = "0x6EAF30", Offset = "0x6E9F30", VA = "0x1806EAF30", Slot = "5")]
get
{
return "SM2P256V1Field";
}
}
// Token: 0x17001BA0 RID: 7072
// (get) Token: 0x0600AD78 RID: 44408 RVA: 0x00259EAC File Offset: 0x002580AC
[Token(Token = "0x17001BA0")]
public override int FieldSize
{
[Token(Token = "0x600AD78")]
[Address(RVA = "0x6EAF60", Offset = "0x6E9F60", VA = "0x1806EAF60", Slot = "6")]
get
{
return SM2P256V1FieldElement.Q.BitLength;
}
}
// Token: 0x0600AD79 RID: 44409 RVA: 0x00259ECC File Offset: 0x002580CC
[Token(Token = "0x600AD79")]
[Address(RVA = "0x6EA110", Offset = "0x6E9110", VA = "0x1806EA110", 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: 0x0600AD7A RID: 44410 RVA: 0x00259F14 File Offset: 0x00258114
[Token(Token = "0x600AD7A")]
[Address(RVA = "0x6E9FC0", Offset = "0x6E8FC0", VA = "0x1806E9FC0", 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: 0x0600AD7B RID: 44411 RVA: 0x00259F64 File Offset: 0x00258164
[Token(Token = "0x600AD7B")]
[Address(RVA = "0x6EABB0", Offset = "0x6E9BB0", VA = "0x1806EABB0", 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: 0x0600AD7C RID: 44412 RVA: 0x00259FAC File Offset: 0x002581AC
[Token(Token = "0x600AD7C")]
[Address(RVA = "0x6EA680", Offset = "0x6E9680", VA = "0x1806EA680", 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: 0x0600AD7D RID: 44413 RVA: 0x00259FF4 File Offset: 0x002581F4
[Token(Token = "0x600AD7D")]
[Address(RVA = "0x6EA250", Offset = "0x6E9250", VA = "0x1806EA250", 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: 0x0600AD7E RID: 44414 RVA: 0x0025A04C File Offset: 0x0025824C
[Token(Token = "0x600AD7E")]
[Address(RVA = "0x6EA7C0", Offset = "0x6E97C0", VA = "0x1806EA7C0", Slot = "12")]
public override ECFieldElement Negate()
{
/*
An exception occurred when decompiling this method (0600AD7E)
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: 0x0600AD7F RID: 44415 RVA: 0x0025A078 File Offset: 0x00258278
[Token(Token = "0x600AD7F")]
[Address(RVA = "0x6EAB20", Offset = "0x6E9B20", VA = "0x1806EAB20", Slot = "13")]
public override ECFieldElement Square()
{
/*
An exception occurred when decompiling this method (0600AD7F)
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: 0x0600AD80 RID: 44416 RVA: 0x0025A0A4 File Offset: 0x002582A4
[Token(Token = "0x600AD80")]
[Address(RVA = "0x6EA5B0", Offset = "0x6E95B0", VA = "0x1806EA5B0", Slot = "14")]
public override ECFieldElement Invert()
{
/*
An exception occurred when decompiling this method (0600AD80)
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: 0x0600AD81 RID: 44417 RVA: 0x0025A0D8 File Offset: 0x002582D8
[Token(Token = "0x600AD81")]
[Address(RVA = "0x6EA850", Offset = "0x6E9850", VA = "0x1806EA850", 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: 0x0600AD82 RID: 44418 RVA: 0x0025A23C File Offset: 0x0025843C
[Token(Token = "0x600AD82")]
[Address(RVA = "0x6EA460", Offset = "0x6E9460", VA = "0x1806EA460", Slot = "0")]
public override bool Equals(object obj)
{
/*
An exception occurred when decompiling this method (0600AD82)
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: 0x0600AD83 RID: 44419 RVA: 0x0025A258 File Offset: 0x00258458
[Token(Token = "0x600AD83")]
[Address(RVA = "0x6EA3D0", Offset = "0x6E93D0", VA = "0x1806EA3D0", Slot = "25")]
public override bool Equals(ECFieldElement other)
{
/*
An exception occurred when decompiling this method (0600AD83)
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: 0x0600AD84 RID: 44420 RVA: 0x0025A274 File Offset: 0x00258474
[Token(Token = "0x600AD84")]
[Address(RVA = "0x6E5860", Offset = "0x6E4860", VA = "0x1806E5860", 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: 0x0600AD85 RID: 44421 RVA: 0x0025A2A0 File Offset: 0x002584A0
[Token(Token = "0x600AD85")]
[Address(RVA = "0x6EA4F0", Offset = "0x6E94F0", VA = "0x1806EA4F0", Slot = "2")]
public override int GetHashCode()
{
SM2P256V1FieldElement.Q.Finalize();
uint[] array = this.x;
int num = 0;
return Arrays.GetHashCode(array, num, 8);
}
// Token: 0x04006E2E RID: 28206
[Token(Token = "0x4006E2E")]
public static readonly BigInteger Q = SM2P256V1Curve.q;
// Token: 0x04006E2F RID: 28207
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006E2F")]
protected internal readonly uint[] x;
}
}
@@ -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: 0x02001B99 RID: 7065
[Token(Token = "0x2001B99")]
internal class SM2P256V1Point : AbstractFpPoint
{
// Token: 0x0600AD87 RID: 44423 RVA: 0x0025A2E8 File Offset: 0x002584E8
[Token(Token = "0x600AD87")]
[Address(RVA = "0x6ED820", Offset = "0x6EC820", VA = "0x1806ED820")]
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y)
{
}
// Token: 0x0600AD88 RID: 44424 RVA: 0x0025A2F8 File Offset: 0x002584F8
[Token(Token = "0x600AD88")]
[Address(RVA = "0x6ED760", Offset = "0x6EC760", VA = "0x1806ED760")]
public SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, bool withCompression)
{
/*
An exception occurred when decompiling this method (0600AD88)
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: 0x0600AD89 RID: 44425 RVA: 0x0025A320 File Offset: 0x00258520
[Token(Token = "0x600AD89")]
[Address(RVA = "0x6E4C90", Offset = "0x6E3C90", VA = "0x1806E4C90")]
internal SM2P256V1Point(ECCurve curve, ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression)
{
}
// Token: 0x0600AD8A RID: 44426 RVA: 0x0025A330 File Offset: 0x00258530
[Token(Token = "0x600AD8A")]
[Address(RVA = "0x6ECDC0", Offset = "0x6EBDC0", VA = "0x1806ECDC0", Slot = "7")]
protected override ECPoint Detach()
{
/*
An exception occurred when decompiling this method (0600AD8A)
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: 0x0600AD8B RID: 44427 RVA: 0x0025A34C File Offset: 0x0025854C
[Token(Token = "0x600AD8B")]
[Address(RVA = "0x6EC600", Offset = "0x6EB600", VA = "0x1806EC600", 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: 0x0600AD8C RID: 44428 RVA: 0x0025A544 File Offset: 0x00258744
[Token(Token = "0x600AD8C")]
[Address(RVA = "0x6ED0D0", Offset = "0x6EC0D0", VA = "0x1806ED0D0", 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: 0x0600AD8D RID: 44429 RVA: 0x0025A720 File Offset: 0x00258920
[Token(Token = "0x600AD8D")]
[Address(RVA = "0x6ECFE0", Offset = "0x6EBFE0", VA = "0x1806ECFE0", 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: 0x0600AD8E RID: 44430 RVA: 0x0025A770 File Offset: 0x00258970
[Token(Token = "0x600AD8E")]
[Address(RVA = "0x6ECF60", Offset = "0x6EBF60", VA = "0x1806ECF60", Slot = "33")]
public override ECPoint ThreeTimes()
{
if (!base.IsInfinity && !this.m_y.IsOne)
{
ECPoint ecpoint;
bool flag = ecpoint.SatisfiesCurveEquation();
}
throw new NullReferenceException();
}
// Token: 0x0600AD8F RID: 44431 RVA: 0x0025A7A0 File Offset: 0x002589A0
[Token(Token = "0x600AD8F")]
[Address(RVA = "0x6ECE60", Offset = "0x6EBE60", VA = "0x1806ECE60", 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();
}
}
}