868 lines
48 KiB
C#
868 lines
48 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
|
|
{
|
|
// Token: 0x02001C8F RID: 7311
|
|
[Token(Token = "0x2001C8F")]
|
|
public class Dstu7624Engine : IBlockCipher
|
|
{
|
|
// Token: 0x0600B772 RID: 46962 RVA: 0x0028941C File Offset: 0x0028761C
|
|
[Token(Token = "0x600B772")]
|
|
[Address(RVA = "0x1DCB460", Offset = "0x1DCA260", VA = "0x181DCB460")]
|
|
public Dstu7624Engine(int blockSizeBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B772)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::.ctor(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_26:
|
|
stloc:ArgumentException(var_2_30, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("unsupported block length: only 128/256/512 are allowed")))
|
|
}
|
|
|
|
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: 0x0600B773 RID: 46963 RVA: 0x0028945C File Offset: 0x0028765C
|
|
[Token(Token = "0x600B773")]
|
|
[Address(RVA = "0x1DC82B0", Offset = "0x1DC70B0", VA = "0x181DC82B0", Slot = "10")]
|
|
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B773)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_1A8:
|
|
stloc:ArgumentException(var_23_1B2, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Unsupported key length")))
|
|
}
|
|
|
|
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.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.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.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.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.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: 0x0600B774 RID: 46964 RVA: 0x0028961C File Offset: 0x0028781C
|
|
[Token(Token = "0x600B774")]
|
|
[Address(RVA = "0x1DCAE30", Offset = "0x1DC9C30", VA = "0x181DCAE30")]
|
|
private void WorkingKeyExpandKT(ulong[] workingKey, ulong[] tempKeys)
|
|
{
|
|
do
|
|
{
|
|
ulong[] array = new ulong[this.wordsInBlock];
|
|
ulong[] array2 = new ulong[this.wordsInBlock];
|
|
ulong[] array3 = new ulong[this.wordsInBlock];
|
|
this.internalState = array3;
|
|
int num = this.wordsInBlock;
|
|
num++;
|
|
int num2 = this.wordsInBlock;
|
|
if (num2 != this.wordsInKey)
|
|
{
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
Array.Copy(workingKey, num4, array, num3, num2);
|
|
}
|
|
int length = array.Length;
|
|
int num5 = 0;
|
|
int num6 = 0;
|
|
Array.Copy(workingKey, num6, array, num5, length);
|
|
int length2 = array2.Length;
|
|
int num7 = 0;
|
|
int num8 = 0;
|
|
Array.Copy(workingKey, num7, array2, num8, length2);
|
|
ulong[] array4 = this.internalState;
|
|
int num9 = 0;
|
|
int num10 = 0;
|
|
if (num10 < array4.Length)
|
|
{
|
|
num9++;
|
|
ulong[] array5 = this.internalState;
|
|
}
|
|
this.EncryptionRound();
|
|
ulong[] array6 = this.internalState;
|
|
int num11 = 0;
|
|
int num12 = 0;
|
|
if (num12 < array6.Length)
|
|
{
|
|
num11++;
|
|
if (this.internalState != 0)
|
|
{
|
|
continue;
|
|
}
|
|
}
|
|
this.EncryptionRound();
|
|
ulong[] array7 = this.internalState;
|
|
int num13 = 0;
|
|
int num14 = 0;
|
|
if (num14 >= array7.Length)
|
|
{
|
|
break;
|
|
}
|
|
num13++;
|
|
}
|
|
while (this.internalState != 0);
|
|
this.EncryptionRound();
|
|
int num15 = this.wordsInBlock;
|
|
int num16 = 0;
|
|
ulong[] array8 = this.internalState;
|
|
int num17 = 0;
|
|
Array.Copy(array8, num17, tempKeys, num16, num15);
|
|
}
|
|
|
|
// Token: 0x0600B775 RID: 46965 RVA: 0x0028978C File Offset: 0x0028798C
|
|
[Token(Token = "0x600B775")]
|
|
[Address(RVA = "0x1DCA850", Offset = "0x1DC9650", VA = "0x181DCA850")]
|
|
private void WorkingKeyExpandEven(ulong[] workingKey, ulong[] tempKey)
|
|
{
|
|
ulong[] array;
|
|
ulong[] array2;
|
|
int num2;
|
|
ulong num6;
|
|
for (;;)
|
|
{
|
|
array = new ulong[this.wordsInKey];
|
|
array2 = new ulong[this.wordsInBlock];
|
|
int num = this.wordsInKey;
|
|
num2 = 0;
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
Array.Copy(workingKey, num4, array, num3, num);
|
|
if (this.wordsInBlock > 0)
|
|
{
|
|
ulong num5 = tempKey[num2];
|
|
num2++;
|
|
num5 += num6;
|
|
array2[0] = num5;
|
|
if (this.wordsInBlock > 0)
|
|
{
|
|
ulong[] array3 = this.internalState;
|
|
ulong num7 = array2[num2];
|
|
num2++;
|
|
array3[0] = num7;
|
|
}
|
|
this.EncryptionRound();
|
|
if (this.T1 > num2)
|
|
{
|
|
ulong[] array4 = this.internalState;
|
|
num2++;
|
|
}
|
|
this.EncryptionRound();
|
|
int num8;
|
|
if (this.wordsInBlock > 0)
|
|
{
|
|
ulong[] array5 = this.internalState;
|
|
num2++;
|
|
num8 = this.wordsInBlock;
|
|
}
|
|
ulong[][] array6 = this.roundKeys;
|
|
int num9 = 0;
|
|
int num10 = 0;
|
|
ulong[] array7 = array6[num2];
|
|
Array.Copy(this.internalState, num10, array7, num9, num8);
|
|
if (this.T2 == num2)
|
|
{
|
|
return;
|
|
}
|
|
int num11 = this.wordsInBlock;
|
|
if (this.wordsInKey == num11)
|
|
{
|
|
goto IL_1DE;
|
|
}
|
|
num2 += 2;
|
|
num6 += num6;
|
|
if (num11 > 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
ulong num12 = tempKey[num2];
|
|
num2++;
|
|
num12 += num6;
|
|
array2[0] = num12;
|
|
if (this.wordsInBlock > 0)
|
|
{
|
|
ulong[] array8 = this.internalState;
|
|
num2++;
|
|
ulong num13 = array[(int)num12];
|
|
array8[0] = num13;
|
|
int num14 = this.wordsInBlock;
|
|
}
|
|
this.EncryptionRound();
|
|
if (this.T1 > num2)
|
|
{
|
|
ulong[] array9 = this.internalState;
|
|
num2++;
|
|
}
|
|
this.EncryptionRound();
|
|
int num15;
|
|
if (this.wordsInBlock > 0)
|
|
{
|
|
ulong[] array10 = this.internalState;
|
|
num2++;
|
|
num15 = this.wordsInBlock;
|
|
}
|
|
ulong[][] array11 = this.roundKeys;
|
|
int num16 = 0;
|
|
int num17 = 0;
|
|
ulong[] array12 = array11[num2];
|
|
Array.Copy(this.internalState, num17, array12, num16, num15);
|
|
if (this.T2 == num2)
|
|
{
|
|
return;
|
|
}
|
|
IL_1DE:
|
|
num2 += 2;
|
|
num6 += num6;
|
|
ulong num18 = array[0];
|
|
int length = array.Length;
|
|
uint num19;
|
|
ulong num21;
|
|
if (num19 < (uint)length)
|
|
{
|
|
uint num20 = num19 - 1U;
|
|
num21 = array[(int)num19];
|
|
num19 += (uint)1;
|
|
array[0] = num21;
|
|
}
|
|
ulong num22 = num21 - 1UL;
|
|
array[0] = num18;
|
|
}
|
|
|
|
// Token: 0x0600B776 RID: 46966 RVA: 0x002899D0 File Offset: 0x00287BD0
|
|
[Token(Token = "0x600B776")]
|
|
[Address(RVA = "0x1DCB150", Offset = "0x1DC9F50", VA = "0x181DCB150")]
|
|
private void WorkingKeyExpandOdd()
|
|
{
|
|
uint num;
|
|
if (this.T2 > num)
|
|
{
|
|
ulong[][] array = this.roundKeys;
|
|
int length = array.Length;
|
|
uint num2 = num - 1U;
|
|
ulong[] array2 = array[(int)num];
|
|
ulong[] array3 = array[(int)num2];
|
|
this.RotateLeft(array3, array2);
|
|
num += (uint)2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B777 RID: 46967 RVA: 0x00289A20 File Offset: 0x00287C20
|
|
[Token(Token = "0x600B777")]
|
|
[Address(RVA = "0x1DC95E0", Offset = "0x1DC83E0", VA = "0x181DC95E0", Slot = "11")]
|
|
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B777)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_12B:
|
|
stloc:InvalidOperationException(var_21_135, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Dstu7624Engine not initialised")))
|
|
}
|
|
|
|
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: 0x0600B778 RID: 46968 RVA: 0x00289B64 File Offset: 0x00287D64
|
|
[Token(Token = "0x600B778")]
|
|
[Address(RVA = "0x1DC81B0", Offset = "0x1DC6FB0", VA = "0x181DC81B0")]
|
|
private void EncryptionRound()
|
|
{
|
|
this.SubBytes();
|
|
this.ShiftRows();
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
ulong num2 = Dstu7624Engine.MixColumn(array[num]);
|
|
num++;
|
|
array[0] = num2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B779 RID: 46969 RVA: 0x00289BB0 File Offset: 0x00287DB0
|
|
[Token(Token = "0x600B779")]
|
|
[Address(RVA = "0x1DC7A60", Offset = "0x1DC6860", VA = "0x181DC7A60")]
|
|
private void DecryptionRound()
|
|
{
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
ulong num3;
|
|
ulong num2 = Dstu7624Engine.MixColumnInv(num3);
|
|
num++;
|
|
}
|
|
this.InvShiftRows();
|
|
this.InvSubBytes();
|
|
}
|
|
|
|
// Token: 0x0600B77A RID: 46970 RVA: 0x00289BEC File Offset: 0x00287DEC
|
|
[Token(Token = "0x600B77A")]
|
|
[Address(RVA = "0x1DC7420", Offset = "0x1DC6220", VA = "0x181DC7420")]
|
|
private void DecryptBlock_128(byte[] input, int inOff, byte[] output, int outOff)
|
|
{
|
|
ulong num = Pack.LE_To_UInt64(input, inOff);
|
|
ulong num2 = Pack.LE_To_UInt64(input, inOff);
|
|
ulong[][] array = this.roundKeys;
|
|
int num3 = this.roundsAmount;
|
|
int length = array[num3].Length;
|
|
ulong num4 = Dstu7624Engine.MixColumnInv(num);
|
|
num = num2;
|
|
ulong num5 = Dstu7624Engine.MixColumnInv(num);
|
|
int length2 = Dstu7624Engine.T0.Length;
|
|
int length3 = Dstu7624Engine.T1.Length;
|
|
int length4 = Dstu7624Engine.T2.Length;
|
|
byte[] t = Dstu7624Engine.T3;
|
|
int length5 = t.Length;
|
|
if (num4 != (ulong)t.Length)
|
|
{
|
|
}
|
|
byte b;
|
|
byte b2;
|
|
b -= b2;
|
|
b2 = b;
|
|
byte b3;
|
|
b2 = b3;
|
|
}
|
|
|
|
// Token: 0x0600B77B RID: 46971 RVA: 0x00289CAC File Offset: 0x00287EAC
|
|
[Token(Token = "0x600B77B")]
|
|
[Address(RVA = "0x1DC7B60", Offset = "0x1DC6960", VA = "0x181DC7B60")]
|
|
private void EncryptBlock_128(byte[] input, int inOff, byte[] output, int outOff)
|
|
{
|
|
ulong num = Pack.LE_To_UInt64(input, inOff);
|
|
ulong num2 = Pack.LE_To_UInt64(input, inOff);
|
|
int length = this.roundKeys[0].Length;
|
|
int length2 = Dstu7624Engine.S0.Length;
|
|
int length3 = Dstu7624Engine.S1.Length;
|
|
int length4 = Dstu7624Engine.S2.Length;
|
|
int length5 = Dstu7624Engine.S3.Length;
|
|
byte b;
|
|
num = Dstu7624Engine.MixColumn((ulong)b);
|
|
byte b2;
|
|
b = b2;
|
|
ulong num3 = Dstu7624Engine.MixColumn((ulong)b);
|
|
ulong num4;
|
|
num4 += (ulong)1L;
|
|
if (num4 != num3)
|
|
{
|
|
}
|
|
b = (byte)((ulong)b + num);
|
|
}
|
|
|
|
// Token: 0x0600B77C RID: 46972 RVA: 0x00289D44 File Offset: 0x00287F44
|
|
[Token(Token = "0x600B77C")]
|
|
[Address(RVA = "0x1DCA4A0", Offset = "0x1DC92A0", VA = "0x181DCA4A0")]
|
|
private void SubBytes()
|
|
{
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
int length = Dstu7624Engine.S0.Length;
|
|
int length2 = Dstu7624Engine.S1.Length;
|
|
int length3 = Dstu7624Engine.S2.Length;
|
|
int length4 = Dstu7624Engine.S3.Length;
|
|
ulong[] array2 = this.internalState;
|
|
num++;
|
|
byte b;
|
|
num.m_value = (int)b;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B77D RID: 46973 RVA: 0x00289DAC File Offset: 0x00287FAC
|
|
[Token(Token = "0x600B77D")]
|
|
[Address(RVA = "0x1DC8D40", Offset = "0x1DC7B40", VA = "0x181DC8D40")]
|
|
private void InvSubBytes()
|
|
{
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
int length = Dstu7624Engine.T0.Length;
|
|
int length2 = Dstu7624Engine.T1.Length;
|
|
int length3 = Dstu7624Engine.T2.Length;
|
|
int length4 = Dstu7624Engine.T3.Length;
|
|
ulong[] array2 = this.internalState;
|
|
num++;
|
|
byte b;
|
|
num.m_value = (int)b;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B77E RID: 46974 RVA: 0x00289E14 File Offset: 0x00288014
|
|
[Token(Token = "0x600B77E")]
|
|
[Address(RVA = "0x1DC9E10", Offset = "0x1DC8C10", VA = "0x181DC9E10")]
|
|
private void ShiftRows()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B77E)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::ShiftRows()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_145:
|
|
stloc:InvalidOperationException(var_14_14F, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported block length: only 128/256/512 are allowed")))
|
|
}
|
|
|
|
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: 0x0600B77F RID: 46975 RVA: 0x00289F74 File Offset: 0x00288174
|
|
[Token(Token = "0x600B77F")]
|
|
[Address(RVA = "0x1DC86C0", Offset = "0x1DC74C0", VA = "0x181DC86C0")]
|
|
private void InvShiftRows()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B77F)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::InvShiftRows()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_161:
|
|
stloc:InvalidOperationException(var_18_16B, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported block length: only 128/256/512 are allowed")))
|
|
}
|
|
|
|
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: 0x0600B780 RID: 46976 RVA: 0x0028A0F0 File Offset: 0x002882F0
|
|
[Token(Token = "0x600B780")]
|
|
[Address(RVA = "0x1DC7390", Offset = "0x1DC6190", VA = "0x181DC7390")]
|
|
private void AddRoundKey(int round)
|
|
{
|
|
ulong[][] array = this.roundKeys;
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array2 = array[round];
|
|
ulong[] array3 = this.internalState;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B781 RID: 46977 RVA: 0x0028A128 File Offset: 0x00288328
|
|
[Token(Token = "0x600B781")]
|
|
[Address(RVA = "0x1DCA7C0", Offset = "0x1DC95C0", VA = "0x181DCA7C0")]
|
|
private void SubRoundKey(int round)
|
|
{
|
|
ulong[][] array = this.roundKeys;
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array2 = array[round];
|
|
ulong[] array3 = this.internalState;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B782 RID: 46978 RVA: 0x0028A160 File Offset: 0x00288360
|
|
[Token(Token = "0x600B782")]
|
|
[Address(RVA = "0x1DCB1E0", Offset = "0x1DC9FE0", VA = "0x181DCB1E0")]
|
|
private void XorRoundKey(int round)
|
|
{
|
|
ulong[][] array = this.roundKeys;
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array2 = array[round];
|
|
ulong[] array3 = this.internalState;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B783 RID: 46979 RVA: 0x0028A198 File Offset: 0x00288398
|
|
[Token(Token = "0x600B783")]
|
|
[Address(RVA = "0x1DC9270", Offset = "0x1DC8070", VA = "0x181DC9270")]
|
|
private static ulong MixColumn(ulong c)
|
|
{
|
|
return c;
|
|
}
|
|
|
|
// Token: 0x0600B784 RID: 46980 RVA: 0x0028A1A8 File Offset: 0x002883A8
|
|
[Token(Token = "0x600B784")]
|
|
[Address(RVA = "0x1DC9480", Offset = "0x1DC8280", VA = "0x181DC9480")]
|
|
private void MixColumns()
|
|
{
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
ulong num2 = Dstu7624Engine.MixColumn(array[num]);
|
|
num++;
|
|
array[0] = num2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B785 RID: 46981 RVA: 0x0028A1E8 File Offset: 0x002883E8
|
|
[Token(Token = "0x600B785")]
|
|
[Address(RVA = "0x1DC9060", Offset = "0x1DC7E60", VA = "0x181DC9060")]
|
|
private static ulong MixColumnInv(ulong c)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B785)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::MixColumnInv(System.UInt64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int64(var_0_06, mul:uint64[exp:int64](ldloc:uint64(c), conv.u8:uint64(ldc.i8:int64[exp:uint64](29))))
|
|
stloc:int64(var_0_0A, add:int64(ldloc:int64(var_0_06), ldloc:int64(var_0_06)))
|
|
stloc:int64(var_1_11, mul:int64(ldloc:int64(var_0_0A), conv.u8:uint64[exp:int64](ldc.i8:int64[exp:uint64](29))))
|
|
stloc:int64(var_1_15, add:int64(ldloc:int64(var_1_11), ldloc:int64(var_1_11)))
|
|
stloc:int64(var_2_1C, mul:uint64[exp:int64](ldloc:uint64(c), conv.u8:uint64(ldc.i8:int64[exp:uint64](29))))
|
|
}
|
|
|
|
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: 0x0600B786 RID: 46982 RVA: 0x0028A214 File Offset: 0x00288414
|
|
[Token(Token = "0x600B786")]
|
|
[Address(RVA = "0x1DC93A0", Offset = "0x1DC81A0", VA = "0x181DC93A0")]
|
|
private void MixColumnsInv()
|
|
{
|
|
int num = 0;
|
|
if (this.T1 > num)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
ulong num2 = Dstu7624Engine.MixColumnInv(array[num]);
|
|
num++;
|
|
array[0] = num2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B787 RID: 46983 RVA: 0x0028A254 File Offset: 0x00288454
|
|
[Token(Token = "0x600B787")]
|
|
[Address(RVA = "0x1DC95B0", Offset = "0x1DC83B0", VA = "0x181DC95B0")]
|
|
private static ulong MulX(ulong n)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B787)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::MulX(System.UInt64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int64(var_0_06, mul:uint64[exp:int64](ldloc:uint64(n), conv.u8:uint64(ldc.i8:int64[exp:uint64](29))))
|
|
}
|
|
|
|
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: 0x0600B788 RID: 46984 RVA: 0x0028A268 File Offset: 0x00288468
|
|
[Token(Token = "0x600B788")]
|
|
[Address(RVA = "0x1DC9560", Offset = "0x1DC8360", VA = "0x181DC9560")]
|
|
private static ulong MulX2(ulong n)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B788)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::MulX2(System.UInt64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int64(var_0_06, mul:uint64[exp:int64](ldloc:uint64(n), conv.u8:uint64(ldc.i8:int64[exp:uint64](29))))
|
|
}
|
|
|
|
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: 0x0600B789 RID: 46985 RVA: 0x0028A27C File Offset: 0x0028847C
|
|
[Token(Token = "0x600B789")]
|
|
[Address(RVA = "0x1B36FF0", Offset = "0x1B35DF0", VA = "0x181B36FF0")]
|
|
private static ulong Rotate(int n, ulong x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600B78A RID: 46986 RVA: 0x0028A28C File Offset: 0x0028848C
|
|
[Token(Token = "0x600B78A")]
|
|
[Address(RVA = "0x1DC9920", Offset = "0x1DC8720", VA = "0x181DC9920")]
|
|
private void RotateLeft(ulong[] x, ulong[] z)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B78A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.Dstu7624Engine::RotateLeft(System.UInt64[],System.UInt64[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_140:
|
|
stloc:InvalidOperationException(var_17_14A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported block length: only 128/256/512 are allowed")))
|
|
}
|
|
|
|
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: 0x17001CCA RID: 7370
|
|
// (get) Token: 0x0600B78B RID: 46987 RVA: 0x0028A3E4 File Offset: 0x002885E4
|
|
[Token(Token = "0x17001CCA")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600B78B")]
|
|
[Address(RVA = "0x1DCB510", Offset = "0x1DCA310", VA = "0x181DCB510", Slot = "12")]
|
|
get
|
|
{
|
|
return "DSTU7624";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B78C RID: 46988 RVA: 0x0028A3F8 File Offset: 0x002885F8
|
|
[Token(Token = "0x600B78C")]
|
|
[Address(RVA = "0x1DC82A0", Offset = "0x1DC70A0", VA = "0x181DC82A0", Slot = "13")]
|
|
public virtual int GetBlockSize()
|
|
{
|
|
return this.wordsInBlock;
|
|
}
|
|
|
|
// Token: 0x17001CCB RID: 7371
|
|
// (get) Token: 0x0600B78D RID: 46989 RVA: 0x0028A40C File Offset: 0x0028860C
|
|
[Token(Token = "0x17001CCB")]
|
|
public virtual bool IsPartialBlockOkay
|
|
{
|
|
[Token(Token = "0x600B78D")]
|
|
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "14")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B78E RID: 46990 RVA: 0x0028A41C File Offset: 0x0028861C
|
|
[Token(Token = "0x600B78E")]
|
|
[Address(RVA = "0x1DC98F0", Offset = "0x1DC86F0", VA = "0x181DC98F0", Slot = "15")]
|
|
public virtual void Reset()
|
|
{
|
|
ulong[] array = this.internalState;
|
|
int length = array.Length;
|
|
int num = 0;
|
|
Array.Clear(array, num, length);
|
|
}
|
|
|
|
// Token: 0x0600B78F RID: 46991 RVA: 0x0028A448 File Offset: 0x00288648
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600B78F")]
|
|
[Address(RVA = "0x1DCB270", Offset = "0x1DCA070", VA = "0x181DCB270")]
|
|
static Dstu7624Engine()
|
|
{
|
|
byte[] array = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.6F5D2C37DFCDB1E72B86BC606C0E717C70E188A4).FieldHandle);
|
|
Dstu7624Engine.S0 = array;
|
|
byte[] array2 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.79039C5C22F863E8EAE0E08E1318F343680E50A8).FieldHandle);
|
|
Dstu7624Engine.S1 = array2;
|
|
byte[] array3 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.340B4B55E1DFD4BADC69CA57007FC1A4CDBA7943).FieldHandle);
|
|
Dstu7624Engine.S2 = array3;
|
|
byte[] array4 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array4, fieldof(<PrivateImplementationDetails>.5CFF612F2058DE2C287ECA5C6407ECC471F65576).FieldHandle);
|
|
Dstu7624Engine.S3 = array4;
|
|
byte[] array5 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array5, fieldof(<PrivateImplementationDetails>.C1C8DE48D8C0FA876F4ED0086BB93D7EAF61E4B2).FieldHandle);
|
|
Dstu7624Engine.T0 = array5;
|
|
byte[] array6 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array6, fieldof(<PrivateImplementationDetails>.9F198D04FF67738AE583484145F45103ECE550CC).FieldHandle);
|
|
Dstu7624Engine.T1 = array6;
|
|
byte[] array7 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array7, fieldof(<PrivateImplementationDetails>.C2443D9DBCD3810F90475C6F404BEDCFEF58661E).FieldHandle);
|
|
Dstu7624Engine.T2 = array7;
|
|
byte[] array8 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array8, fieldof(<PrivateImplementationDetails>.BD0C733AC85AB335526865FA6269790347865705).FieldHandle);
|
|
Dstu7624Engine.T3 = array8;
|
|
}
|
|
|
|
// Token: 0x0400745A RID: 29786
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400745A")]
|
|
private ulong[] internalState;
|
|
|
|
// Token: 0x0400745B RID: 29787
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400745B")]
|
|
private ulong[] workingKey;
|
|
|
|
// Token: 0x0400745C RID: 29788
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400745C")]
|
|
private ulong[][] roundKeys;
|
|
|
|
// Token: 0x0400745D RID: 29789
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400745D")]
|
|
private int wordsInBlock;
|
|
|
|
// Token: 0x0400745E RID: 29790
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x400745E")]
|
|
private int wordsInKey;
|
|
|
|
// Token: 0x0400745F RID: 29791
|
|
[Token(Token = "0x400745F")]
|
|
private const int ROUNDS_128 = 10;
|
|
|
|
// Token: 0x04007460 RID: 29792
|
|
[Token(Token = "0x4007460")]
|
|
private const int ROUNDS_256 = 14;
|
|
|
|
// Token: 0x04007461 RID: 29793
|
|
[Token(Token = "0x4007461")]
|
|
private const int ROUNDS_512 = 18;
|
|
|
|
// Token: 0x04007462 RID: 29794
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007462")]
|
|
private int roundsAmount;
|
|
|
|
// Token: 0x04007463 RID: 29795
|
|
[FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x4007463")]
|
|
private bool forEncryption;
|
|
|
|
// Token: 0x04007464 RID: 29796
|
|
[Token(Token = "0x4007464")]
|
|
private const ulong mdsMatrix = 290207332435296513UL;
|
|
|
|
// Token: 0x04007465 RID: 29797
|
|
[Token(Token = "0x4007465")]
|
|
private const ulong mdsInvMatrix = 14616231584692868525UL;
|
|
|
|
// Token: 0x04007466 RID: 29798
|
|
[Token(Token = "0x4007466")]
|
|
private static readonly byte[] S0;
|
|
|
|
// Token: 0x04007467 RID: 29799
|
|
[Token(Token = "0x4007467")]
|
|
private static readonly byte[] S1;
|
|
|
|
// Token: 0x04007468 RID: 29800
|
|
[Token(Token = "0x4007468")]
|
|
private static readonly byte[] S2;
|
|
|
|
// Token: 0x04007469 RID: 29801
|
|
[Token(Token = "0x4007469")]
|
|
private static readonly byte[] S3;
|
|
|
|
// Token: 0x0400746A RID: 29802
|
|
[Token(Token = "0x400746A")]
|
|
private static readonly byte[] T0;
|
|
|
|
// Token: 0x0400746B RID: 29803
|
|
[Token(Token = "0x400746B")]
|
|
private static readonly byte[] T1;
|
|
|
|
// Token: 0x0400746C RID: 29804
|
|
[Token(Token = "0x400746C")]
|
|
private static readonly byte[] T2;
|
|
|
|
// Token: 0x0400746D RID: 29805
|
|
[Token(Token = "0x400746D")]
|
|
private static readonly byte[] T3;
|
|
}
|
|
}
|