581 lines
24 KiB
C#
581 lines
24 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Rfc8032;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
|
|
{
|
|
// Token: 0x02001D62 RID: 7522
|
|
[Token(Token = "0x2001D62")]
|
|
public class AesLightEngine : IBlockCipher
|
|
{
|
|
// Token: 0x0600BAAC RID: 47788 RVA: 0x0028C14C File Offset: 0x0028A34C
|
|
[Token(Token = "0x600BAAC")]
|
|
[Address(RVA = "0x1030AC0", Offset = "0x102FAC0", VA = "0x181030AC0")]
|
|
private static uint Shift(uint r, int shift)
|
|
{
|
|
return r;
|
|
}
|
|
|
|
// Token: 0x0600BAAD RID: 47789 RVA: 0x0028C15C File Offset: 0x0028A35C
|
|
[Token(Token = "0x600BAAD")]
|
|
[Address(RVA = "0x248D8D0", Offset = "0x248C8D0", VA = "0x18248D8D0")]
|
|
private static uint FFmulX(uint x)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BAAD)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.AesLightEngine::FFmulX(System.UInt32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int64(var_0_05, mul:uint32[exp:int64](ldloc:uint32(x), conv.u4:uint32(ldc.i4:int32[exp:uint32](27))))
|
|
}
|
|
|
|
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: 0x0600BAAE RID: 47790 RVA: 0x0028C170 File Offset: 0x0028A370
|
|
[Token(Token = "0x600BAAE")]
|
|
[Address(RVA = "0x248D8A0", Offset = "0x248C8A0", VA = "0x18248D8A0")]
|
|
private static uint FFmulX2(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BAAF RID: 47791 RVA: 0x0028C180 File Offset: 0x0028A380
|
|
[Token(Token = "0x600BAAF")]
|
|
[Address(RVA = "0x24976C0", Offset = "0x24966C0", VA = "0x1824976C0")]
|
|
private static uint Mcol(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BAB0 RID: 47792 RVA: 0x0028C190 File Offset: 0x0028A390
|
|
[Token(Token = "0x600BAB0")]
|
|
[Address(RVA = "0x2497600", Offset = "0x2496600", VA = "0x182497600")]
|
|
private static uint Inv_Mcol(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BAB1 RID: 47793 RVA: 0x0028C1A0 File Offset: 0x0028A3A0
|
|
[Token(Token = "0x600BAB1")]
|
|
[Address(RVA = "0x24978D0", Offset = "0x24968D0", VA = "0x1824978D0")]
|
|
private static uint SubWord(uint x)
|
|
{
|
|
int length = AesLightEngine.S.Length;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600BAB2 RID: 47794 RVA: 0x0028C1C0 File Offset: 0x0028A3C0
|
|
[Token(Token = "0x600BAB2")]
|
|
[Address(RVA = "0x2495EC0", Offset = "0x2494EC0", VA = "0x182495EC0")]
|
|
private uint[][] GenerateWorkingKey(byte[] key, bool forEncryption)
|
|
{
|
|
uint[][] array;
|
|
int i;
|
|
for (;;)
|
|
{
|
|
if (key.Length == 7)
|
|
{
|
|
this.ROUNDS = key;
|
|
array = new uint[key][];
|
|
i = 0;
|
|
uint[] array2 = new uint[4];
|
|
if (array2 != 0)
|
|
{
|
|
}
|
|
i++;
|
|
array[0] = array2;
|
|
while (i <= this.rcon)
|
|
{
|
|
}
|
|
if (typeof(uint[]).TypeHandle == 0)
|
|
{
|
|
goto IL_3FB;
|
|
}
|
|
if (typeof(uint[]).TypeHandle != 0)
|
|
{
|
|
if (typeof(uint[]).TypeHandle == 0)
|
|
{
|
|
goto IL_1E5;
|
|
}
|
|
uint num;
|
|
if (typeof(uint[]).TypeHandle != 0 && typeof(uint[]).TypeHandle == num)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
uint[] array3 = array[0];
|
|
array3[0] = (uint)i;
|
|
uint[] array4 = array[0];
|
|
array4[0] = array3;
|
|
uint[] array5 = array[0];
|
|
array5[1] = array4;
|
|
uint[] array6 = array[0];
|
|
array6[1] = array5;
|
|
uint[] array7 = array[1];
|
|
array7[0] = array6;
|
|
uint[] array8 = array[1];
|
|
array8[0] = array7;
|
|
uint[] array9 = array[1];
|
|
array9[1] = array8;
|
|
array[1][1] = array9;
|
|
uint num2;
|
|
num2 += num2;
|
|
uint num3 = AesLightEngine.SubWord(array9);
|
|
ulong num4;
|
|
array[(int)num4][0] = i;
|
|
array[(int)num4][0] = array3;
|
|
array[(int)num4][1] = array4;
|
|
array[(int)num4][1] = array5;
|
|
uint num5 = AesLightEngine.SubWord(array5);
|
|
ulong num6 = num4 + 1UL;
|
|
array[(int)num6][0] = array6;
|
|
array[(int)num6][0] = array7;
|
|
array[(int)num6][1] = array8;
|
|
array[(int)num6][1] = array9;
|
|
uint num7 = AesLightEngine.SubWord(array9);
|
|
array[14][0] = (uint)i;
|
|
array[14][0] = array3;
|
|
array[14][1] = array4;
|
|
uint[] array10 = array[14];
|
|
array10[1] = array5;
|
|
IL_1E5:
|
|
uint[] array11 = array[0];
|
|
array11[0] = array10;
|
|
uint[] array12 = array[0];
|
|
array12[0] = array11;
|
|
uint[] array13 = array[0];
|
|
array13[1] = array12;
|
|
uint[] array14 = array[0];
|
|
array14[1] = array13;
|
|
uint[] array15 = array[1];
|
|
array15[0] = array14;
|
|
array[1][0] = array15;
|
|
uint num8 = AesLightEngine.SubWord(array15);
|
|
array[1][1] = num8;
|
|
array[1][1] = array11;
|
|
array[2][0] = array12;
|
|
array[2][0] = array13;
|
|
array[2][1] = array14;
|
|
array[2][1] = array15;
|
|
ulong num9;
|
|
num9 += num9;
|
|
uint num10 = AesLightEngine.SubWord(array15);
|
|
uint num11;
|
|
array[(int)num11][0] = num8;
|
|
array[(int)num11][0] = array11;
|
|
array[(int)num11][1] = array12;
|
|
array[(int)num11][1] = array13;
|
|
uint num12 = num11 + 1U;
|
|
array[(int)num12][0] = array14;
|
|
array[(int)num12][0] = array15;
|
|
num9 += num9;
|
|
uint num13 = AesLightEngine.SubWord(array15);
|
|
array[(int)num12][1] = num8;
|
|
array[(int)num12][1] = array11;
|
|
num11 += (uint)2;
|
|
array[(int)num11][0] = array12;
|
|
array[(int)num11][0] = array13;
|
|
array[(int)num11][1] = array14;
|
|
uint[] array16 = array[(int)num11];
|
|
num11 += (uint)3;
|
|
array16[1] = array15;
|
|
uint num14 = AesLightEngine.SubWord(array15);
|
|
array[12][0] = num8;
|
|
array[12][0] = array11;
|
|
array[12][1] = array12;
|
|
uint[] array17 = array[12];
|
|
array17[1] = array13;
|
|
IL_3FB:
|
|
uint[] array18 = array[0];
|
|
array18[0] = array17;
|
|
uint[] array19 = array[0];
|
|
array19[0] = array18;
|
|
uint[] array20 = array[0];
|
|
array20[1] = array19;
|
|
array[0][1] = array20;
|
|
uint num15 = AesLightEngine.SubWord(array20);
|
|
byte[] array21 = AesLightEngine.rcon;
|
|
uint num17;
|
|
uint num16 = num17 - 1U;
|
|
array[(int)num17][0] = array17;
|
|
array[(int)num17][0] = array18;
|
|
array[(int)num17][1] = array19;
|
|
uint[] array22 = array[(int)num17];
|
|
num17 += (uint)1;
|
|
array22[1] = array20;
|
|
while (num17 <= (uint)10)
|
|
{
|
|
}
|
|
int num18 = 0;
|
|
uint[] array23 = array[(int)num17];
|
|
uint num19 = AesLightEngine.Inv_Mcol(array23[num18]);
|
|
num18++;
|
|
array23[0] = num19;
|
|
num17 += (uint)1;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x0600BAB3 RID: 47795 RVA: 0x0028C6B4 File Offset: 0x0028A8B4
|
|
[Token(Token = "0x600BAB3")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
public AesLightEngine()
|
|
{
|
|
this.Reset();
|
|
}
|
|
|
|
// Token: 0x0600BAB4 RID: 47796 RVA: 0x0028C6C8 File Offset: 0x0028A8C8
|
|
[Token(Token = "0x600BAB4")]
|
|
[Address(RVA = "0x24974F0", Offset = "0x24964F0", VA = "0x1824974F0", Slot = "10")]
|
|
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BAB4)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.AesLightEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_22:
|
|
stloc:ArgumentException(var_4_32, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to AES init - "), ldloc:string(var_3))))
|
|
}
|
|
|
|
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: 0x17001D55 RID: 7509
|
|
// (get) Token: 0x0600BAB5 RID: 47797 RVA: 0x0028C708 File Offset: 0x0028A908
|
|
[Token(Token = "0x17001D55")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BAB5")]
|
|
[Address(RVA = "0x2497AC0", Offset = "0x2496AC0", VA = "0x182497AC0", Slot = "11")]
|
|
get
|
|
{
|
|
return "AES";
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001D56 RID: 7510
|
|
// (get) Token: 0x0600BAB6 RID: 47798 RVA: 0x0028C71C File Offset: 0x0028A91C
|
|
[Token(Token = "0x17001D56")]
|
|
public virtual bool IsPartialBlockOkay
|
|
{
|
|
[Token(Token = "0x600BAB6")]
|
|
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "12")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BAB7 RID: 47799 RVA: 0x0028C72C File Offset: 0x0028A92C
|
|
[Token(Token = "0x600BAB7")]
|
|
[Address(RVA = "0x8BB9C0", Offset = "0x8BA9C0", VA = "0x1808BB9C0", Slot = "13")]
|
|
public virtual int GetBlockSize()
|
|
{
|
|
return 16;
|
|
}
|
|
|
|
// Token: 0x0600BAB8 RID: 47800 RVA: 0x0028C73C File Offset: 0x0028A93C
|
|
[Token(Token = "0x600BAB8")]
|
|
[Address(RVA = "0x2497750", Offset = "0x2496750", VA = "0x182497750", Slot = "14")]
|
|
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BAB8)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.AesLightEngine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_5D:
|
|
stloc:InvalidOperationException(var_7_67, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AES engine 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.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: 0x0600BAB9 RID: 47801 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600BAB9")]
|
|
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "15")]
|
|
public virtual void Reset()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600BABA RID: 47802 RVA: 0x0028C7B4 File Offset: 0x0028A9B4
|
|
[Token(Token = "0x600BABA")]
|
|
[Address(RVA = "0x248F4A0", Offset = "0x248E4A0", VA = "0x18248F4A0")]
|
|
private void UnPackBlock(byte[] bytes, int off)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600BABB RID: 47803 RVA: 0x0028C7C4 File Offset: 0x0028A9C4
|
|
[Token(Token = "0x600BABB")]
|
|
[Address(RVA = "0x248F190", Offset = "0x248E190", VA = "0x18248F190")]
|
|
private void PackBlock(byte[] bytes, int off)
|
|
{
|
|
Ed25519.Encode32(this.C0, bytes, off);
|
|
Ed25519.Encode32(this.C1, bytes, off);
|
|
Ed25519.Encode32(this.C2, bytes, off);
|
|
Ed25519.Encode32(this.C3, bytes, off);
|
|
}
|
|
|
|
// Token: 0x0600BABC RID: 47804 RVA: 0x0028C808 File Offset: 0x0028AA08
|
|
[Token(Token = "0x600BABC")]
|
|
[Address(RVA = "0x2494B80", Offset = "0x2493B80", VA = "0x182494B80")]
|
|
private void EncryptBlock(uint[][] KW)
|
|
{
|
|
int length = KW.Length;
|
|
uint[] array = KW[0];
|
|
int length2 = array.Length;
|
|
uint num = array[0];
|
|
uint num2 = array[0];
|
|
uint num3 = array[1];
|
|
uint num4 = array[1];
|
|
if (array > (uint)1)
|
|
{
|
|
int length3 = AesLightEngine.S.Length;
|
|
num2 = num4;
|
|
byte b;
|
|
uint num5 = AesLightEngine.Mcol((uint)b);
|
|
uint[] array2;
|
|
uint num6 = array2[0];
|
|
int length4 = AesLightEngine.S.Length;
|
|
byte b2;
|
|
uint num7 = AesLightEngine.Mcol((uint)b2);
|
|
uint num8 = array2[0];
|
|
int length5 = AesLightEngine.S.Length;
|
|
num4 = num2;
|
|
byte b3;
|
|
uint num9 = AesLightEngine.Mcol((uint)b3);
|
|
uint num10 = array2[1];
|
|
int length6 = AesLightEngine.S.Length;
|
|
byte b4;
|
|
uint num11 = AesLightEngine.Mcol((uint)b4);
|
|
uint num12 = array2[1];
|
|
int length7 = AesLightEngine.S.Length;
|
|
byte b5;
|
|
uint num13 = AesLightEngine.Mcol((uint)b5);
|
|
int length8 = AesLightEngine.S.Length;
|
|
byte b6;
|
|
uint num14 = AesLightEngine.Mcol((uint)b6);
|
|
int length9 = AesLightEngine.S.Length;
|
|
byte b7;
|
|
uint num15 = AesLightEngine.Mcol((uint)b7);
|
|
int length10 = AesLightEngine.S.Length;
|
|
byte b8;
|
|
uint num16 = AesLightEngine.Mcol((uint)b8);
|
|
}
|
|
int length11 = AesLightEngine.S.Length;
|
|
byte b9;
|
|
uint num17 = AesLightEngine.Mcol((uint)b9);
|
|
uint[] array3;
|
|
uint num18 = array3[0];
|
|
int length12 = AesLightEngine.S.Length;
|
|
byte b10;
|
|
uint num19 = AesLightEngine.Mcol((uint)b10);
|
|
uint num20 = array3[0];
|
|
int length13 = AesLightEngine.S.Length;
|
|
byte b11;
|
|
uint num21 = AesLightEngine.Mcol((uint)b11);
|
|
uint num22 = array3[1];
|
|
int length14 = AesLightEngine.S.Length;
|
|
byte b12;
|
|
uint num23 = AesLightEngine.Mcol((uint)b12);
|
|
uint num24 = array3[1];
|
|
uint num25;
|
|
num25 += (uint)1;
|
|
int length15 = AesLightEngine.S.Length;
|
|
int length16 = AesLightEngine.S.Length;
|
|
int length17 = AesLightEngine.S.Length;
|
|
int length18 = AesLightEngine.S.Length;
|
|
}
|
|
|
|
// Token: 0x0600BABD RID: 47805 RVA: 0x0028CA88 File Offset: 0x0028AC88
|
|
[Token(Token = "0x600BABD")]
|
|
[Address(RVA = "0x2493860", Offset = "0x2492860", VA = "0x182493860")]
|
|
private void DecryptBlock(uint[][] KW)
|
|
{
|
|
int length = KW.Length;
|
|
uint[] array;
|
|
int length2 = array.Length;
|
|
uint num = array[0];
|
|
uint num2 = array[0];
|
|
uint num3 = array[1];
|
|
uint num4 = array[1];
|
|
uint[] array2 = KW[array];
|
|
int length3 = AesLightEngine.Si.Length;
|
|
byte b;
|
|
uint num5 = AesLightEngine.Inv_Mcol((uint)b);
|
|
uint num6 = array2[0];
|
|
int length4 = AesLightEngine.Si.Length;
|
|
byte b2;
|
|
uint num7 = AesLightEngine.Inv_Mcol((uint)b2);
|
|
uint num8 = array2[0];
|
|
int length5 = AesLightEngine.Si.Length;
|
|
byte b3;
|
|
uint num9 = AesLightEngine.Inv_Mcol((uint)b3);
|
|
uint num10 = array2[1];
|
|
int length6 = AesLightEngine.Si.Length;
|
|
byte b4;
|
|
uint num11 = AesLightEngine.Inv_Mcol((uint)b4);
|
|
uint num12 = array2[1];
|
|
int length7 = AesLightEngine.Si.Length;
|
|
byte b5;
|
|
uint num13 = AesLightEngine.Inv_Mcol((uint)b5);
|
|
int length8 = AesLightEngine.Si.Length;
|
|
byte b6;
|
|
uint num14 = AesLightEngine.Inv_Mcol((uint)b6);
|
|
int length9 = AesLightEngine.Si.Length;
|
|
byte b7;
|
|
uint num15 = AesLightEngine.Inv_Mcol((uint)b7);
|
|
int length10 = AesLightEngine.Si.Length;
|
|
byte b8;
|
|
uint num16 = AesLightEngine.Inv_Mcol((uint)b8);
|
|
uint[] array3 = KW[1];
|
|
int length11 = AesLightEngine.Si.Length;
|
|
byte b9;
|
|
uint num17 = AesLightEngine.Inv_Mcol((uint)b9);
|
|
uint num18 = array3[0];
|
|
int length12 = AesLightEngine.Si.Length;
|
|
byte b10;
|
|
uint num19 = AesLightEngine.Inv_Mcol((uint)b10);
|
|
uint num20 = array3[0];
|
|
int length13 = AesLightEngine.Si.Length;
|
|
byte b11;
|
|
uint num21 = AesLightEngine.Inv_Mcol((uint)b11);
|
|
uint num22 = array3[1];
|
|
int length14 = AesLightEngine.Si.Length;
|
|
byte b12;
|
|
uint num23 = AesLightEngine.Inv_Mcol((uint)b12);
|
|
uint num24 = array3[1];
|
|
int length15 = AesLightEngine.Si.Length;
|
|
int length16 = AesLightEngine.Si.Length;
|
|
int length17 = AesLightEngine.Si.Length;
|
|
int length18 = AesLightEngine.Si.Length;
|
|
}
|
|
|
|
// Token: 0x0600BABE RID: 47806 RVA: 0x0028CD00 File Offset: 0x0028AF00
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BABE")]
|
|
[Address(RVA = "0x24979F0", Offset = "0x24969F0", VA = "0x1824979F0")]
|
|
static AesLightEngine()
|
|
{
|
|
byte[] array = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.8F22C9ECE1331718CBD268A9BBFD2F5E451441E3).FieldHandle);
|
|
AesLightEngine.S = array;
|
|
byte[] array2 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.0C4110BC17D746F018F47B49E0EB0D6590F69939).FieldHandle);
|
|
AesLightEngine.Si = array2;
|
|
byte[] array3 = new byte[30];
|
|
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.B8DB0CB599EDD82A386D1A154FB3EB9235513DAD).FieldHandle);
|
|
AesLightEngine.rcon = array3;
|
|
}
|
|
|
|
// Token: 0x040075AC RID: 30124
|
|
[Token(Token = "0x40075AC")]
|
|
private static readonly byte[] S;
|
|
|
|
// Token: 0x040075AD RID: 30125
|
|
[Token(Token = "0x40075AD")]
|
|
private static readonly byte[] Si;
|
|
|
|
// Token: 0x040075AE RID: 30126
|
|
[Token(Token = "0x40075AE")]
|
|
private static readonly byte[] rcon;
|
|
|
|
// Token: 0x040075AF RID: 30127
|
|
[Token(Token = "0x40075AF")]
|
|
private const uint m1 = 2155905152U;
|
|
|
|
// Token: 0x040075B0 RID: 30128
|
|
[Token(Token = "0x40075B0")]
|
|
private const uint m2 = 2139062143U;
|
|
|
|
// Token: 0x040075B1 RID: 30129
|
|
[Token(Token = "0x40075B1")]
|
|
private const uint m3 = 27U;
|
|
|
|
// Token: 0x040075B2 RID: 30130
|
|
[Token(Token = "0x40075B2")]
|
|
private const uint m4 = 3233857728U;
|
|
|
|
// Token: 0x040075B3 RID: 30131
|
|
[Token(Token = "0x40075B3")]
|
|
private const uint m5 = 1061109567U;
|
|
|
|
// Token: 0x040075B4 RID: 30132
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40075B4")]
|
|
private int ROUNDS;
|
|
|
|
// Token: 0x040075B5 RID: 30133
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40075B5")]
|
|
private uint[][] WorkingKey;
|
|
|
|
// Token: 0x040075B6 RID: 30134
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40075B6")]
|
|
private uint C0;
|
|
|
|
// Token: 0x040075B7 RID: 30135
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x40075B7")]
|
|
private uint C1;
|
|
|
|
// Token: 0x040075B8 RID: 30136
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40075B8")]
|
|
private uint C2;
|
|
|
|
// Token: 0x040075B9 RID: 30137
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x40075B9")]
|
|
private uint C3;
|
|
|
|
// Token: 0x040075BA RID: 30138
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40075BA")]
|
|
private bool forEncryption;
|
|
|
|
// Token: 0x040075BB RID: 30139
|
|
[Token(Token = "0x40075BB")]
|
|
private const int BLOCK_SIZE = 16;
|
|
}
|
|
}
|