[
  {
    "path": "Arc4.cs",
    "content": "﻿namespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// \"Alleged RC4\" Implementation\n    /// </summary>\n    /// <remarks>\n    /// See pages 397-398 of \"Applied Cryptography, 2nd Edition\" by Bruce Schneier.\n    /// The \"alleged\" part is for historical reasons (and that's how Firefox's NSS library refers to it).\n    /// </remarks>\n    public class Arc4\n    {\n        private byte[] _SubstitionBox = new byte[256];\n        private byte[] _KeyingMaterial = new byte[256];\n        private int _CounterI;\n        private int _CounterJ;\n\n        /// <summary>\n        /// Initializes the algorithm with the <paramref name=\"key\"/>.\n        /// </summary>\n        /// <param name=\"key\">The key to use for encryption/decryption.</param>\n        public Arc4(byte[] key)\n        {\n            // \"Fill it linearly\"\n            for (int i = 0; i < 256; i++)\n            {\n                _SubstitionBox[i] = (byte)i;\n            }\n\n            // \"fill another 256-byte array with the key, \n            // repeating the key as necessary to fill the entire array\"\n            for (int i = 0; i < 256; i++)\n            {\n                _KeyingMaterial[i] = key[i % key.Length];\n            }\n\n            int j = 0;\n\n            for (int i = 0; i < 256; i++)\n            {\n                j = (j + _SubstitionBox[i] + _KeyingMaterial[i]) % 256;\n\n                // Swap S[i] and S[j]\n                Swap(ref _SubstitionBox[i], ref _SubstitionBox[j]);                \n            }\n\n            // \"And that's it.\"\n        }\n\n        private static void Swap(ref byte b1, ref byte b2)\n        {\n            byte temp = b1;\n            b1 = b2;\n            b2 = temp;\n        }\n\n        /// <summary>\n        /// Encrypts the <paramref name=\"input\"/>.\n        /// </summary>\n        /// <param name=\"input\">The plaintext bytes that will be encrypted</param>\n        public byte[] Encrypt(byte[] input)\n        {\n            byte[] encryptedValue = new byte[input.Length];\n\n            for (int i = 0; i < input.Length; i++)\n            {\n                encryptedValue[i] = (byte) (GetNextByte() ^ input[i]);\n            }\n\n            return encryptedValue;\n        }\n\n        private byte GetNextByte()\n        {\n            _CounterI = (_CounterI + 1) % 256;\n            _CounterJ = (_CounterJ + _SubstitionBox[_CounterI]) % 256;\n            Swap(ref _SubstitionBox[_CounterI], ref _SubstitionBox[_CounterJ]);\n            byte t = (byte) ((_SubstitionBox[_CounterI] + _SubstitionBox[_CounterJ]) % 256);\n            return _SubstitionBox[t];\n        }\n    }\n}\n"
  },
  {
    "path": "BigIntegerUtilities.cs",
    "content": "﻿using System.Text;\nusing Mono.Math;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Utilities for <see cref=\"BigInteger\"/>s.\n    /// </summary>\n    public static class BigIntegerUtilities\n    {\n        /// <summary>\n        /// Converts a <see cref=\"BigInteger\"/> to a base-10 representation that's in groups of 10.\n        /// </summary>\n        /// <param name=\"bigInteger\">The integer to display.</param>\n        /// <returns>A base-10 representation of <paramref name=\"bigInteger\"/> with digit groups of 10 digits.</returns>\n        public static string ToDisplayString(this BigInteger bigInteger)\n        {\n            var sb = new StringBuilder();\n            string base10 = bigInteger.ToString();\n\n            for (int i = 0; i < base10.Length; i++)\n            {\n                if ((i % 10 == 0) && (i > 0))\n                {\n                    sb.Append(\" \");\n                }\n                sb.Append(base10[i]);\n            }\n\n            return sb.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "ByteUtilities.cs",
    "content": "﻿using System;\nusing System.Globalization;\nusing System.IO;\nusing System.Text;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Utilities to help with <see cref=\"Byte\"/>s.\n    /// </summary>\n    public static class ByteUtilities\n    {\n        /// <summary>\n        /// Performs <paramref name=\"a\"/> xor <paramref name=\"b\"/>.\n        /// </summary>\n        /// <param name=\"a\">The first byte array.</param>\n        /// <param name=\"b\">The second byte array.</param>\n        /// <returns><paramref name=\"a\"/> xor <paramref name=\"b\"/></returns>\n        public static byte[] Xor(this byte[] a, byte[] b)\n        {\n            if (a.Length > b.Length)\n            {\n                throw new ArgumentException(\"'a' must be smaller than or equal to 'b'\");\n            }\n\n            byte[] result = new byte[b.Length];\n\n            for (int i = 0; i < a.Length; i++)\n            {\n                result[i] = (byte)(a[i] ^ b[i]);\n            }\n\n            for (int i = a.Length; i < b.Length; i++)\n            {\n                result[i] = b[i];\n            }\n\n            return result;\n        }\n\n        /// <summary>\n        /// Concatenates byte arrays into a single byte array.\n        /// </summary>\n        /// <param name=\"byteArrays\">An array containing all the byte arrays to combine.</param>\n        /// <returns>A combined array of all of the individual arrays in <paramref name=\"byteArrays\"/>.</returns>\n        public static byte[] ConcatBytes(params byte[][] byteArrays)\n        {\n            using(var ms = new MemoryStream())\n            {\n                foreach(byte[] currentArray in byteArrays)\n                {\n                    ms.Write(currentArray, 0, currentArray.Length);\n                }\n\n                return ms.ToArray();\n            }\n        }\n\n        /// <summary>\n        /// Determines if two byte arrays are equivalent.\n        /// </summary>\n        /// <param name=\"a\">The first byte array.</param>\n        /// <param name=\"b\">The second byte array.</param>\n        /// <returns><see langword=\"true\"/> if the byte arrays are equal; otherwise, <see langword=\"false\"/>.</returns>\n        public static bool AreEqual(byte[] a, byte[] b)\n        {\n            if(a.Length != b.Length)\n            {\n                return false;\n            }\n\n            for(int i = 0; i < a.Length; i++)\n            {\n                if(a[i] != b[i])\n                {\n                    return false;\n                }\n            }\n\n            return true;\n        }\n\n        /// <summary>\n        /// Formats the bytes for display into single byte segments.\n        /// </summary>\n        /// <param name=\"bytes\">Array to convert to a display string.</param>\n        /// <returns>Formatted display byte string.</returns>\n        public static string ToDisplayByteString(this byte[] bytes)\n        {\n            return ToDisplayByteString(bytes, 1);\n        }\n\n        /// <summary>\n        /// Gets the ASCII byte represetnation of <paramref name=\"s\"/>.\n        /// </summary>\n        /// <param name=\"s\">The string to get the ASCII byte representation of.</param>\n        /// <returns>The ASCII byte representation of <paramref name=\"s\"/>.</returns>\n        public static byte[] ToAsciiBytes(this string s)\n        {\n            return Encoding.ASCII.GetBytes(s);\n        }\n\n        /// <summary>\n        /// Formats the bytes for display into <param name=\"byteGroupSize\"/> byte segments.\n        /// </summary>\n        /// <param name=\"bytes\">Array to convert to a display string.</param>\n        /// <returns>Formatted display byte string.</returns>\n        public static string ToDisplayByteString(this byte[] bytes, int byteGroupSize)\n        {                      \n            int remainderBytes = (bytes.Length % byteGroupSize);\n            int extraBytesNeeded = (remainderBytes == 0) ? 0 : (byteGroupSize - remainderBytes);\n            StringBuilder sb = new StringBuilder();\n\n            int totalBytes = bytes.Length + extraBytesNeeded;\n                        \n            for (int i = 0; i < totalBytes; i++)\n            {\n                if (((i % byteGroupSize) == 0) && (i > 0))\n                {\n                    // Add a space between the byte groups\n                    sb.Append(\" \");\n                }\n\n                if (i < extraBytesNeeded)\n                {\n                    // Add pad bytes\n                    sb.Append(\"00\");\n                }\n                else\n                {\n                    byte currentByte = bytes[i - extraBytesNeeded];\n                    sb.Append(currentByte.ToString(\"X2\", CultureInfo.InvariantCulture));\n                }                \n            }\n\n            return sb.ToString();\n        }\n\n        /// <summary>\n        /// Return a <paramref name=\"length\"/> length subset of <paramref name=\"bytes\"/> starting at <paramref name=\"startIndex\"/>.\n        /// </summary>\n        /// <param name=\"bytes\">The byte array to take a subset of.</param>\n        /// <param name=\"startIndex\">The zero-based starting index of subset.</param>\n        /// <param name=\"length\">The total bytes to have in the subset.</param>\n        /// <returns>A <paramref name=\"length\"/> length subset of <paramref name=\"bytes\"/> starting at <paramref name=\"startIndex\"/>.</returns>\n        public static byte[] SubBytes(this byte[] bytes, int startIndex, int length)\n        {\n            using (var ms = new MemoryStream())\n            {\n                ms.Write(bytes, startIndex, length);\n                return ms.ToArray();\n            }\n        }\n\n        /// <summary>\n        /// Return a subset of <paramref name=\"bytes\"/> starting at <paramref name=\"startIndex\"/>.\n        /// </summary>\n        /// <param name=\"bytes\">The byte array to take a subset of.</param>\n        /// <param name=\"startIndex\">The zero-based starting index of subset.</param>        \n        /// <returns>A subset of <paramref name=\"bytes\"/> starting at <paramref name=\"startIndex\"/>.</returns>\n        public static byte[] SubBytes(this byte[] bytes, int startIndex)\n        {\n            return SubBytes(bytes, startIndex, bytes.Length - startIndex);\n        }        \n    }\n}\n"
  },
  {
    "path": "FirefoxSslDebugFileUtilities.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Utilities to work with Firefox's debug files.\n    /// </summary>\n    public static class FirefoxSslDebugFileUtilities\n    {\n        /// <summary>\n        /// Helper function for things dumped to SSLDEBUGFILE with appropriate SSLTRACE levels.\n        /// </summary>\n        /// <param name=\"input\">Raw input that has the pre-master secret.</param>\n        /// <returns>The pre-master secret key bytes.</returns>\n        public static byte[] GetPremasterSecretKey(string input)\n        {\n            // Looks like\n            // 5140: SSL[75821480]: Pre-Master Secret [Len: 48]\n            // 03 01 97 01 9e aa 3c 3c e1 ef 7f 39 5d be 88 1e   ......<<...9]...\n            // 60 51 e7 f5 94 db fd 62 b2 b5 26 be b5 3d 7c 16   `Q.....b..&..=|.\n            // 4d ff 79 73 8e cb c8 aa 9c 70 f2 5d 29 91 72 50   M.ys.....p.]).rP\n            using (var sr = new StringReader(input))\n            {\n                bool foundHeader = false;\n\n                while (sr.Peek() >= 0)\n                {\n                    string currentLine = sr.ReadLine().Trim();\n                    if (!foundHeader)\n                    {\n                        if (!currentLine.Contains(\"Pre-Master Secret\"))\n                        {\n                            continue;\n                        }\n\n                        foundHeader = true;\n                        break;\n                    }\n                }\n\n                if (!foundHeader)\n                {\n                    throw new InvalidDataException();\n                }\n\n                // reading in secret bytes\n                using (var ms = new MemoryStream())\n                {\n                    for (int ixCurrentLine = 0; ixCurrentLine < 3; ixCurrentLine++)\n                    {\n                        string currentLine = sr.ReadLine().Trim();\n                        for (int ixCurrentByte = 0; ixCurrentByte < 16; ixCurrentByte++)\n                        {\n                            string byteText = currentLine.Substring(3 * ixCurrentByte, 2);\n                            ms.WriteByte(Convert.ToByte(byteText, 16));\n                        }\n                    }\n\n                    return ms.ToArray();\n                }                \n            }            \n        }\n    }\n}\n"
  },
  {
    "path": "Hasher.cs",
    "content": "﻿using System;\nusing System.Net;\nusing System.Security.Cryptography;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Provides some simple wrappers around hash functions.\n    /// </summary>\n    public static class Hasher\n    {\n        private static readonly SHA1Managed _SHA1 = new SHA1Managed();\n        private static readonly MD5 _MD5 = new MD5CryptoServiceProvider();\n        private static readonly HMACMD5 _HmacMd5 = new HMACMD5();\n        private static readonly HMACSHA1 _HmacSha1 = new HMACSHA1();\n\n        /// <summary>\n        /// Computes the SHA-1 hash.\n        /// </summary>\n        /// <param name=\"inputBytes\">The bytes to compute the hash of.</param>\n        /// <returns>The 20 byte SHA-1 digest of <paramref name=\"inputBytes\"/>.</returns>\n        public static byte[] ComputeSHA1Hash(byte[] inputBytes)\n        {\n            return _SHA1.ComputeHash(inputBytes);\n        }\n\n        /// <summary>\n        /// Computes the keyed HMAC version of the SHA-1 hash.\n        /// </summary>\n        /// <param name=\"key\">The key to use for the HMAC operation.</param>\n        /// <param name=\"inputBytes\">The bytes to compute the hash of.</param>\n        /// <returns>The 20 byte HMAC SHA-1 digest of <paramref name=\"inputBytes\"/> using <paramref name=\"key\"/>.</returns>\n        public static byte[] ComputeSHA1Hmac(byte[] key, byte[] inputBytes)\n        {\n            _HmacSha1.Key = key;\n            return _HmacSha1.ComputeHash(inputBytes);\n        }\n\n        /// <summary>\n        /// Computes the MD5 hash.\n        /// </summary>\n        /// <param name=\"inputBytes\">The bytes to compute the hash of.</param>\n        /// <returns>The 16 byte MD5 digest of <paramref name=\"inputBytes\"/>.</returns>\n        public static byte[] ComputeMD5(byte[] inputBytes)\n        {\n            return _MD5.ComputeHash(inputBytes);\n        }\n\n        /// <summary>\n        /// Computes the keyed HMAC version of the MD5 hash.\n        /// </summary>\n        /// <param name=\"key\">The key to use for the HMAC operation.</param>\n        /// <param name=\"inputBytes\">The bytes to compute the hash of.</param>\n        /// <returns>The 16 byte HMAC MD5 digest of <paramref name=\"inputBytes\"/> using <paramref name=\"key\"/>.</returns>\n        public static byte[] ComputeMD5Hmac(byte[] key, byte[] data)\n        {\n            _HmacMd5.Key = key;\n            return _HmacMd5.ComputeHash(data);\n        }\n\n        // HMAC_hash(MAC_write_secret, seq_num + TLSCompressed.type +\n        //           TLSCompressed.version + TLSCompressed.length +\n        //           TLSCompressed.fragment));\n\n        /// <summary>\n        /// Computes the TLS 1.0 MD5 HMAC for a record.\n        /// </summary>\n        /// <param name=\"secret\">The secret to use for the HMAC calculation.</param>\n        /// <param name=\"contentType\">The TLS record content type.</param>\n        /// <param name=\"sequenceNumber\">The sequence number of the fragment.</param>\n        /// <param name=\"fragment\">The data sent.</param>\n        /// <returns>The 16 byte HMAC hash.</returns>\n        public static byte[] ComputeTlsMD5Hmac(byte[] secret, byte contentType, long sequenceNumber, byte[] fragment)\n        {\n            _HmacMd5.Key = secret;\n\n            return _HmacMd5.ComputeHash(\n                    ByteUtilities.ConcatBytes(\n                            BitConverter.GetBytes(IPAddress.HostToNetworkOrder(sequenceNumber)),\n                            new [] { contentType }, \n                            new byte[] {3, 1}, // version\n                            BitConverter.GetBytes(IPAddress.HostToNetworkOrder((short) fragment.Length)),\n                            fragment));\n        }\n    }\n}\n"
  },
  {
    "path": "MainForm.Designer.cs",
    "content": "﻿namespace Moserware.TlsAnalyzer\n{\n    partial class MainForm\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));\n            this.label1 = new System.Windows.Forms.Label();\n            this.btnGo = new System.Windows.Forms.Button();\n            this.label2 = new System.Windows.Forms.Label();\n            this.label3 = new System.Windows.Forms.Label();\n            this.label4 = new System.Windows.Forms.Label();\n            this.label5 = new System.Windows.Forms.Label();\n            this.label6 = new System.Windows.Forms.Label();\n            this.label7 = new System.Windows.Forms.Label();\n            this.textBox1 = new System.Windows.Forms.TextBox();\n            this.label8 = new System.Windows.Forms.Label();\n            this.label9 = new System.Windows.Forms.Label();\n            this.txtServerChangeCipherSpec = new System.Windows.Forms.TextBox();\n            this.label10 = new System.Windows.Forms.Label();\n            this.label11 = new System.Windows.Forms.Label();\n            this.label12 = new System.Windows.Forms.Label();\n            this.txtDecryptedClientKeyExchange = new System.Windows.Forms.TextBox();\n            this.label13 = new System.Windows.Forms.Label();\n            this.label14 = new System.Windows.Forms.Label();\n            this.tabControl = new System.Windows.Forms.TabControl();\n            this.tabHandshakeMessages = new System.Windows.Forms.TabPage();\n            this.groupBox8 = new System.Windows.Forms.GroupBox();\n            this.txtClientEncryptedFinishedMessage = new System.Windows.Forms.TextBox();\n            this.txtClientHello = new System.Windows.Forms.TextBox();\n            this.txtServerHello = new System.Windows.Forms.TextBox();\n            this.txtClientKeyExchange = new System.Windows.Forms.TextBox();\n            this.txtServerHelloCertificate = new System.Windows.Forms.TextBox();\n            this.txtServerEncryptedHandshakeMessage = new System.Windows.Forms.TextBox();\n            this.txtServerHelloDone = new System.Windows.Forms.TextBox();\n            this.groupBox1 = new System.Windows.Forms.GroupBox();\n            this.groupBox10 = new System.Windows.Forms.GroupBox();\n            this.txtServerFinishedHmacMd5 = new System.Windows.Forms.TextBox();\n            this.label63 = new System.Windows.Forms.Label();\n            this.label64 = new System.Windows.Forms.Label();\n            this.txtServerFinishedVerifyData = new System.Windows.Forms.TextBox();\n            this.txtServerFinishedHeader = new System.Windows.Forms.TextBox();\n            this.label65 = new System.Windows.Forms.Label();\n            this.groupBox9 = new System.Windows.Forms.GroupBox();\n            this.txtClientFinishedHmacMd5 = new System.Windows.Forms.TextBox();\n            this.label62 = new System.Windows.Forms.Label();\n            this.label51 = new System.Windows.Forms.Label();\n            this.txtClientFinishedVerifyData = new System.Windows.Forms.TextBox();\n            this.txtClientFinishedHeader = new System.Windows.Forms.TextBox();\n            this.label50 = new System.Windows.Forms.Label();\n            this.tabDebuggingInput = new System.Windows.Forms.TabPage();\n            this.txtPremasterSecret = new System.Windows.Forms.TextBox();\n            this.tabCertificatesInput = new System.Windows.Forms.TabPage();\n            this.btnCalculateCertificateInformation = new System.Windows.Forms.Button();\n            this.groupBox15 = new System.Windows.Forms.GroupBox();\n            this.label76 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus = new System.Windows.Forms.TextBox();\n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue = new System.Windows.Forms.TextBox();\n            this.label78 = new System.Windows.Forms.Label();\n            this.label80 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent = new System.Windows.Forms.TextBox();\n            this.groupBox14 = new System.Windows.Forms.GroupBox();\n            this.label75 = new System.Windows.Forms.Label();\n            this.txtVersignClass3SecureServerSignedCertificate = new System.Windows.Forms.TextBox();\n            this.txtVerisignClass3SecureServerModulus = new System.Windows.Forms.TextBox();\n            this.txtVerisignClass3SecureServerSignatureValue = new System.Windows.Forms.TextBox();\n            this.label72 = new System.Windows.Forms.Label();\n            this.label74 = new System.Windows.Forms.Label();\n            this.label73 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3SecureServerPublicExponent = new System.Windows.Forms.TextBox();\n            this.groupBox13 = new System.Windows.Forms.GroupBox();\n            this.txtAmazonModulus = new System.Windows.Forms.TextBox();\n            this.label69 = new System.Windows.Forms.Label();\n            this.label68 = new System.Windows.Forms.Label();\n            this.txtAmazonPublicExponent = new System.Windows.Forms.TextBox();\n            this.label66 = new System.Windows.Forms.Label();\n            this.txtAmazonSignatureValue = new System.Windows.Forms.TextBox();\n            this.label67 = new System.Windows.Forms.Label();\n            this.txtAmazonSignedCertificate = new System.Windows.Forms.TextBox();\n            this.tabCertificatesOutput = new System.Windows.Forms.TabPage();\n            this.groupBox18 = new System.Windows.Forms.GroupBox();\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue = new System.Windows.Forms.TextBox();\n            this.label87 = new System.Windows.Forms.Label();\n            this.label77 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature = new System.Windows.Forms.TextBox();\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId = new System.Windows.Forms.TextBox();\n            this.label88 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10 = new System.Windows.Forms.TextBox();\n            this.label86 = new System.Windows.Forms.Label();\n            this.groupBox17 = new System.Windows.Forms.GroupBox();\n            this.txtVerisignClass3SecureServerHashValue = new System.Windows.Forms.TextBox();\n            this.label83 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3SecureServerHashAlgorithmId = new System.Windows.Forms.TextBox();\n            this.txtVerisignClass3SecureServerModulusBase10 = new System.Windows.Forms.TextBox();\n            this.label71 = new System.Windows.Forms.Label();\n            this.label85 = new System.Windows.Forms.Label();\n            this.label84 = new System.Windows.Forms.Label();\n            this.txtVerisignClass3SecureServerDecryptedSignature = new System.Windows.Forms.TextBox();\n            this.groupBox16 = new System.Windows.Forms.GroupBox();\n            this.txtAmazonHashValue = new System.Windows.Forms.TextBox();\n            this.txtAmazonHashAlgorithmId = new System.Windows.Forms.TextBox();\n            this.label82 = new System.Windows.Forms.Label();\n            this.label79 = new System.Windows.Forms.Label();\n            this.txtAmazonDecryptedSignature = new System.Windows.Forms.TextBox();\n            this.label81 = new System.Windows.Forms.Label();\n            this.label70 = new System.Windows.Forms.Label();\n            this.txtAmazonModulusBase10 = new System.Windows.Forms.TextBox();\n            this.tabKeyInput = new System.Windows.Forms.TabPage();\n            this.txtServerFinishedLabel = new System.Windows.Forms.TextBox();\n            this.label61 = new System.Windows.Forms.Label();\n            this.txtClientFinishedLabel = new System.Windows.Forms.TextBox();\n            this.label60 = new System.Windows.Forms.Label();\n            this.txtSha1HandshakeMessages = new System.Windows.Forms.TextBox();\n            this.txtMd5HandshakeMessages = new System.Windows.Forms.TextBox();\n            this.label59 = new System.Windows.Forms.Label();\n            this.label58 = new System.Windows.Forms.Label();\n            this.label57 = new System.Windows.Forms.Label();\n            this.txtHandshakeMessages = new System.Windows.Forms.TextBox();\n            this.txtKeyExpansionLabel = new System.Windows.Forms.TextBox();\n            this.label56 = new System.Windows.Forms.Label();\n            this.label54 = new System.Windows.Forms.Label();\n            this.label53 = new System.Windows.Forms.Label();\n            this.label52 = new System.Windows.Forms.Label();\n            this.txtMasterSecretLabel = new System.Windows.Forms.TextBox();\n            this.txtServerRandomBytes = new System.Windows.Forms.TextBox();\n            this.txtClientRandomBytes = new System.Windows.Forms.TextBox();\n            this.tabDerivedKeys = new System.Windows.Forms.TabPage();\n            this.txtServerIV = new System.Windows.Forms.TextBox();\n            this.txtClientIV = new System.Windows.Forms.TextBox();\n            this.txtServerWriteKey = new System.Windows.Forms.TextBox();\n            this.txtClientWriteKey = new System.Windows.Forms.TextBox();\n            this.txtServerWriteMacKey = new System.Windows.Forms.TextBox();\n            this.txtClientWriteMacKey = new System.Windows.Forms.TextBox();\n            this.txtMasterSecret = new System.Windows.Forms.TextBox();\n            this.label55 = new System.Windows.Forms.Label();\n            this.label24 = new System.Windows.Forms.Label();\n            this.label23 = new System.Windows.Forms.Label();\n            this.label18 = new System.Windows.Forms.Label();\n            this.label17 = new System.Windows.Forms.Label();\n            this.label16 = new System.Windows.Forms.Label();\n            this.label15 = new System.Windows.Forms.Label();\n            this.tabAppDataInput = new System.Windows.Forms.TabPage();\n            this.txtServerApplicationDataInput = new System.Windows.Forms.TextBox();\n            this.txtClientApplicationDataInput = new System.Windows.Forms.TextBox();\n            this.tabDecryptedAppData = new System.Windows.Forms.TabPage();\n            this.groupBox12 = new System.Windows.Forms.GroupBox();\n            this.txtServerApplicationDataHmac = new System.Windows.Forms.TextBox();\n            this.txtDecryptedServerApplicationData = new System.Windows.Forms.TextBox();\n            this.label21 = new System.Windows.Forms.Label();\n            this.label22 = new System.Windows.Forms.Label();\n            this.groupBox11 = new System.Windows.Forms.GroupBox();\n            this.txtClientApplicationDataHmac = new System.Windows.Forms.TextBox();\n            this.txtDecryptedClientApplicationData = new System.Windows.Forms.TextBox();\n            this.label19 = new System.Windows.Forms.Label();\n            this.label20 = new System.Windows.Forms.Label();\n            this.tabHmac = new System.Windows.Forms.TabPage();\n            this.groupBox5 = new System.Windows.Forms.GroupBox();\n            this.groupBox7 = new System.Windows.Forms.GroupBox();\n            this.txtHmacSha1Result = new System.Windows.Forms.TextBox();\n            this.label44 = new System.Windows.Forms.Label();\n            this.txtHmacSha1InnerHash = new System.Windows.Forms.TextBox();\n            this.label45 = new System.Windows.Forms.Label();\n            this.txtHmacSha1KeyXorIpad = new System.Windows.Forms.TextBox();\n            this.label46 = new System.Windows.Forms.Label();\n            this.txtHmacSha1IpadBytes = new System.Windows.Forms.TextBox();\n            this.label47 = new System.Windows.Forms.Label();\n            this.txtHmacSha1KeyXorOpad = new System.Windows.Forms.TextBox();\n            this.label48 = new System.Windows.Forms.Label();\n            this.txtHmacSha1Opad = new System.Windows.Forms.TextBox();\n            this.label49 = new System.Windows.Forms.Label();\n            this.txtHmacDataAsciiBytes = new System.Windows.Forms.TextBox();\n            this.label37 = new System.Windows.Forms.Label();\n            this.txtHmacKeyAsciiBytes = new System.Windows.Forms.TextBox();\n            this.label36 = new System.Windows.Forms.Label();\n            this.groupBox6 = new System.Windows.Forms.GroupBox();\n            this.txtHmacMd5Result = new System.Windows.Forms.TextBox();\n            this.label43 = new System.Windows.Forms.Label();\n            this.txtHmacMd5InnerHash = new System.Windows.Forms.TextBox();\n            this.label42 = new System.Windows.Forms.Label();\n            this.txtHmacMd5KeyXorIpad = new System.Windows.Forms.TextBox();\n            this.label41 = new System.Windows.Forms.Label();\n            this.txtHmacMd5IpadBytes = new System.Windows.Forms.TextBox();\n            this.label40 = new System.Windows.Forms.Label();\n            this.txtHmacMd5KeyXorOpad = new System.Windows.Forms.TextBox();\n            this.label39 = new System.Windows.Forms.Label();\n            this.txtHmacMd5Opad = new System.Windows.Forms.TextBox();\n            this.label38 = new System.Windows.Forms.Label();\n            this.groupBox4 = new System.Windows.Forms.GroupBox();\n            this.btnGenerateHmac = new System.Windows.Forms.Button();\n            this.label34 = new System.Windows.Forms.Label();\n            this.txtHmacDataString = new System.Windows.Forms.TextBox();\n            this.label35 = new System.Windows.Forms.Label();\n            this.txtHmacKeyString = new System.Windows.Forms.TextBox();\n            this.label33 = new System.Windows.Forms.Label();\n            this.tabPrf = new System.Windows.Forms.TabPage();\n            this.groupBox3 = new System.Windows.Forms.GroupBox();\n            this.label32 = new System.Windows.Forms.Label();\n            this.txtPrfAsciiLabelBytes = new System.Windows.Forms.TextBox();\n            this.label31 = new System.Windows.Forms.Label();\n            this.txtPrfMD5Output = new System.Windows.Forms.TextBox();\n            this.label30 = new System.Windows.Forms.Label();\n            this.txtPrfOutput = new System.Windows.Forms.TextBox();\n            this.groupBox2 = new System.Windows.Forms.GroupBox();\n            this.txtPrfSeedBytes = new System.Windows.Forms.TextBox();\n            this.label29 = new System.Windows.Forms.Label();\n            this.btnPrfGenerate = new System.Windows.Forms.Button();\n            this.label26 = new System.Windows.Forms.Label();\n            this.nudBytesToGenerate = new System.Windows.Forms.NumericUpDown();\n            this.txtPrfSecretBytes = new System.Windows.Forms.TextBox();\n            this.label28 = new System.Windows.Forms.Label();\n            this.label27 = new System.Windows.Forms.Label();\n            this.txtPrfLabel = new System.Windows.Forms.TextBox();\n            this.label25 = new System.Windows.Forms.Label();\n            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\n            this.tabControl.SuspendLayout();\n            this.tabHandshakeMessages.SuspendLayout();\n            this.groupBox8.SuspendLayout();\n            this.groupBox1.SuspendLayout();\n            this.groupBox10.SuspendLayout();\n            this.groupBox9.SuspendLayout();\n            this.tabDebuggingInput.SuspendLayout();\n            this.tabCertificatesInput.SuspendLayout();\n            this.groupBox15.SuspendLayout();\n            this.groupBox14.SuspendLayout();\n            this.groupBox13.SuspendLayout();\n            this.tabCertificatesOutput.SuspendLayout();\n            this.groupBox18.SuspendLayout();\n            this.groupBox17.SuspendLayout();\n            this.groupBox16.SuspendLayout();\n            this.tabKeyInput.SuspendLayout();\n            this.tabDerivedKeys.SuspendLayout();\n            this.tabAppDataInput.SuspendLayout();\n            this.tabDecryptedAppData.SuspendLayout();\n            this.groupBox12.SuspendLayout();\n            this.groupBox11.SuspendLayout();\n            this.tabHmac.SuspendLayout();\n            this.groupBox5.SuspendLayout();\n            this.groupBox7.SuspendLayout();\n            this.groupBox6.SuspendLayout();\n            this.groupBox4.SuspendLayout();\n            this.tabPrf.SuspendLayout();\n            this.groupBox3.SuspendLayout();\n            this.groupBox2.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.nudBytesToGenerate)).BeginInit();\n            this.tableLayoutPanel1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // label1\n            // \n            this.label1.AutoSize = true;\n            this.label1.Location = new System.Drawing.Point(6, 12);\n            this.label1.Name = \"label1\";\n            this.label1.Size = new System.Drawing.Size(438, 13);\n            this.label1.TabIndex = 0;\n            this.label1.Text = \"All bytes should be copied from TLS records in WireShark using \\\"Bytes (Hex Stream\" +\n                \")\\\" mode\";\n            // \n            // btnGo\n            // \n            this.btnGo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\n            this.btnGo.Location = new System.Drawing.Point(750, 263);\n            this.btnGo.Name = \"btnGo\";\n            this.btnGo.Size = new System.Drawing.Size(146, 24);\n            this.btnGo.TabIndex = 1;\n            this.btnGo.Text = \"&Calculate Verify Messages\";\n            this.btnGo.UseVisualStyleBackColor = true;\n            this.btnGo.Click += new System.EventHandler(this.btnGo_Click);\n            // \n            // label2\n            // \n            this.label2.AutoSize = true;\n            this.label2.Location = new System.Drawing.Point(124, 16);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(63, 13);\n            this.label2.TabIndex = 2;\n            this.label2.Text = \"Client Hello:\";\n            // \n            // label3\n            // \n            this.label3.AutoSize = true;\n            this.label3.Location = new System.Drawing.Point(119, 44);\n            this.label3.Name = \"label3\";\n            this.label3.Size = new System.Drawing.Size(68, 13);\n            this.label3.TabIndex = 4;\n            this.label3.Text = \"Server Hello:\";\n            // \n            // label4\n            // \n            this.label4.AutoSize = true;\n            this.label4.Location = new System.Drawing.Point(90, 72);\n            this.label4.Name = \"label4\";\n            this.label4.Size = new System.Drawing.Size(97, 13);\n            this.label4.TabIndex = 6;\n            this.label4.Text = \"(Server) Certificate:\";\n            // \n            // label5\n            // \n            this.label5.AutoSize = true;\n            this.label5.Location = new System.Drawing.Point(90, 100);\n            this.label5.Name = \"label5\";\n            this.label5.Size = new System.Drawing.Size(97, 13);\n            this.label5.TabIndex = 8;\n            this.label5.Text = \"Server Hello Done:\";\n            // \n            // label6\n            // \n            this.label6.AutoSize = true;\n            this.label6.Location = new System.Drawing.Point(82, 128);\n            this.label6.Name = \"label6\";\n            this.label6.Size = new System.Drawing.Size(105, 13);\n            this.label6.TabIndex = 10;\n            this.label6.Text = \"Client Key Exchange\";\n            // \n            // label7\n            // \n            this.label7.AutoSize = true;\n            this.label7.Location = new System.Drawing.Point(44, 156);\n            this.label7.Name = \"label7\";\n            this.label7.Size = new System.Drawing.Size(143, 13);\n            this.label7.TabIndex = 12;\n            this.label7.Text = \"(Client) Change Cipher Spec:\";\n            // \n            // textBox1\n            // \n            this.textBox1.Location = new System.Drawing.Point(193, 153);\n            this.textBox1.Name = \"textBox1\";\n            this.textBox1.ReadOnly = true;\n            this.textBox1.Size = new System.Drawing.Size(703, 20);\n            this.textBox1.TabIndex = 13;\n            this.textBox1.Text = \"140301000101\";\n            // \n            // label8\n            // \n            this.label8.AutoSize = true;\n            this.label8.Location = new System.Drawing.Point(6, 184);\n            this.label8.Name = \"label8\";\n            this.label8.Size = new System.Drawing.Size(181, 13);\n            this.label8.TabIndex = 14;\n            this.label8.Text = \"(Client) Encrypted Finished Message:\";\n            // \n            // label9\n            // \n            this.label9.AutoSize = true;\n            this.label9.Location = new System.Drawing.Point(39, 212);\n            this.label9.Name = \"label9\";\n            this.label9.Size = new System.Drawing.Size(148, 13);\n            this.label9.TabIndex = 16;\n            this.label9.Text = \"(Server) Change Cipher Spec:\";\n            // \n            // txtServerChangeCipherSpec\n            // \n            this.txtServerChangeCipherSpec.Location = new System.Drawing.Point(193, 209);\n            this.txtServerChangeCipherSpec.Name = \"txtServerChangeCipherSpec\";\n            this.txtServerChangeCipherSpec.ReadOnly = true;\n            this.txtServerChangeCipherSpec.Size = new System.Drawing.Size(703, 20);\n            this.txtServerChangeCipherSpec.TabIndex = 17;\n            this.txtServerChangeCipherSpec.Text = \"140301000101\";\n            // \n            // label10\n            // \n            this.label10.AutoSize = true;\n            this.label10.Location = new System.Drawing.Point(1, 240);\n            this.label10.Name = \"label10\";\n            this.label10.Size = new System.Drawing.Size(186, 13);\n            this.label10.TabIndex = 18;\n            this.label10.Text = \"(Server) Encrypted Finished Message:\";\n            // \n            // label11\n            // \n            this.label11.AutoSize = true;\n            this.label11.Location = new System.Drawing.Point(6, 18);\n            this.label11.Name = \"label11\";\n            this.label11.Size = new System.Drawing.Size(201, 13);\n            this.label11.TabIndex = 20;\n            this.label11.Text = \"Pre-Master Secret from SSLDEBUGFILE:\";\n            // \n            // label12\n            // \n            this.label12.AutoSize = true;\n            this.label12.Location = new System.Drawing.Point(6, 107);\n            this.label12.Name = \"label12\";\n            this.label12.Size = new System.Drawing.Size(279, 13);\n            this.label12.TabIndex = 22;\n            this.label12.Text = \"Decrypted Client Key Exchange from custom Firefox build:\";\n            // \n            // txtDecryptedClientKeyExchange\n            // \n            this.txtDecryptedClientKeyExchange.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"DecryptedClientKeyExchange\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtDecryptedClientKeyExchange.Location = new System.Drawing.Point(7, 123);\n            this.txtDecryptedClientKeyExchange.Multiline = true;\n            this.txtDecryptedClientKeyExchange.Name = \"txtDecryptedClientKeyExchange\";\n            this.txtDecryptedClientKeyExchange.Size = new System.Drawing.Size(899, 67);\n            this.txtDecryptedClientKeyExchange.TabIndex = 23;\n            this.txtDecryptedClientKeyExchange.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.DecryptedClientKeyExchange;\n            // \n            // label13\n            // \n            this.label13.AutoSize = true;\n            this.label13.Location = new System.Drawing.Point(6, 19);\n            this.label13.Name = \"label13\";\n            this.label13.Size = new System.Drawing.Size(184, 13);\n            this.label13.TabIndex = 24;\n            this.label13.Text = \"Client\\'s First Application Data Record:\";\n            // \n            // label14\n            // \n            this.label14.AutoSize = true;\n            this.label14.Location = new System.Drawing.Point(8, 233);\n            this.label14.Name = \"label14\";\n            this.label14.Size = new System.Drawing.Size(186, 13);\n            this.label14.TabIndex = 26;\n            this.label14.Text = \"Server\\'s First Application Data Record\";\n            // \n            // tabControl\n            // \n            this.tabControl.Controls.Add(this.tabHandshakeMessages);\n            this.tabControl.Controls.Add(this.tabDebuggingInput);\n            this.tabControl.Controls.Add(this.tabCertificatesInput);\n            this.tabControl.Controls.Add(this.tabCertificatesOutput);\n            this.tabControl.Controls.Add(this.tabKeyInput);\n            this.tabControl.Controls.Add(this.tabDerivedKeys);\n            this.tabControl.Controls.Add(this.tabAppDataInput);\n            this.tabControl.Controls.Add(this.tabDecryptedAppData);\n            this.tabControl.Controls.Add(this.tabHmac);\n            this.tabControl.Controls.Add(this.tabPrf);\n            this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.tabControl.Location = new System.Drawing.Point(3, 3);\n            this.tabControl.Name = \"tabControl\";\n            this.tabControl.SelectedIndex = 0;\n            this.tabControl.Size = new System.Drawing.Size(921, 479);\n            this.tabControl.TabIndex = 28;\n            // \n            // tabHandshakeMessages\n            // \n            this.tabHandshakeMessages.Controls.Add(this.groupBox8);\n            this.tabHandshakeMessages.Controls.Add(this.groupBox1);\n            this.tabHandshakeMessages.Controls.Add(this.label1);\n            this.tabHandshakeMessages.Location = new System.Drawing.Point(4, 22);\n            this.tabHandshakeMessages.Name = \"tabHandshakeMessages\";\n            this.tabHandshakeMessages.Padding = new System.Windows.Forms.Padding(3);\n            this.tabHandshakeMessages.Size = new System.Drawing.Size(913, 453);\n            this.tabHandshakeMessages.TabIndex = 0;\n            this.tabHandshakeMessages.Text = \"Wireshark Handshake Messages\";\n            this.tabHandshakeMessages.UseVisualStyleBackColor = true;\n            // \n            // groupBox8\n            // \n            this.groupBox8.Controls.Add(this.label2);\n            this.groupBox8.Controls.Add(this.label8);\n            this.groupBox8.Controls.Add(this.btnGo);\n            this.groupBox8.Controls.Add(this.txtClientEncryptedFinishedMessage);\n            this.groupBox8.Controls.Add(this.textBox1);\n            this.groupBox8.Controls.Add(this.label9);\n            this.groupBox8.Controls.Add(this.txtClientHello);\n            this.groupBox8.Controls.Add(this.label7);\n            this.groupBox8.Controls.Add(this.label3);\n            this.groupBox8.Controls.Add(this.txtServerChangeCipherSpec);\n            this.groupBox8.Controls.Add(this.txtServerHello);\n            this.groupBox8.Controls.Add(this.txtClientKeyExchange);\n            this.groupBox8.Controls.Add(this.label4);\n            this.groupBox8.Controls.Add(this.label10);\n            this.groupBox8.Controls.Add(this.txtServerHelloCertificate);\n            this.groupBox8.Controls.Add(this.label6);\n            this.groupBox8.Controls.Add(this.label5);\n            this.groupBox8.Controls.Add(this.txtServerEncryptedHandshakeMessage);\n            this.groupBox8.Controls.Add(this.txtServerHelloDone);\n            this.groupBox8.Location = new System.Drawing.Point(6, 28);\n            this.groupBox8.Name = \"groupBox8\";\n            this.groupBox8.Size = new System.Drawing.Size(902, 295);\n            this.groupBox8.TabIndex = 21;\n            this.groupBox8.TabStop = false;\n            this.groupBox8.Text = \"Input\";\n            // \n            // txtClientEncryptedFinishedMessage\n            // \n            this.txtClientEncryptedFinishedMessage.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ClientEncryptedFinishedMessage\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtClientEncryptedFinishedMessage.Location = new System.Drawing.Point(193, 181);\n            this.txtClientEncryptedFinishedMessage.Name = \"txtClientEncryptedFinishedMessage\";\n            this.txtClientEncryptedFinishedMessage.Size = new System.Drawing.Size(703, 20);\n            this.txtClientEncryptedFinishedMessage.TabIndex = 15;\n            this.txtClientEncryptedFinishedMessage.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ClientEncryptedFinishedMessage;\n            // \n            // txtClientHello\n            // \n            this.txtClientHello.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ClientHello\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtClientHello.Location = new System.Drawing.Point(193, 13);\n            this.txtClientHello.Name = \"txtClientHello\";\n            this.txtClientHello.Size = new System.Drawing.Size(703, 20);\n            this.txtClientHello.TabIndex = 3;\n            this.txtClientHello.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ClientHello;\n            // \n            // txtServerHello\n            // \n            this.txtServerHello.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ServerHello\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtServerHello.Location = new System.Drawing.Point(193, 41);\n            this.txtServerHello.Name = \"txtServerHello\";\n            this.txtServerHello.Size = new System.Drawing.Size(703, 20);\n            this.txtServerHello.TabIndex = 5;\n            this.txtServerHello.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ServerHello;\n            // \n            // txtClientKeyExchange\n            // \n            this.txtClientKeyExchange.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ClientEncryptedKeyExchange\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtClientKeyExchange.Location = new System.Drawing.Point(193, 125);\n            this.txtClientKeyExchange.Name = \"txtClientKeyExchange\";\n            this.txtClientKeyExchange.Size = new System.Drawing.Size(703, 20);\n            this.txtClientKeyExchange.TabIndex = 11;\n            this.txtClientKeyExchange.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ClientEncryptedKeyExchange;\n            // \n            // txtServerHelloCertificate\n            // \n            this.txtServerHelloCertificate.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ServerHelloCertificate\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtServerHelloCertificate.Location = new System.Drawing.Point(193, 69);\n            this.txtServerHelloCertificate.Name = \"txtServerHelloCertificate\";\n            this.txtServerHelloCertificate.Size = new System.Drawing.Size(703, 20);\n            this.txtServerHelloCertificate.TabIndex = 7;\n            this.txtServerHelloCertificate.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ServerHelloCertificate;\n            // \n            // txtServerEncryptedHandshakeMessage\n            // \n            this.txtServerEncryptedHandshakeMessage.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ServerEncryptedFinishedMessage\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtServerEncryptedHandshakeMessage.Location = new System.Drawing.Point(193, 237);\n            this.txtServerEncryptedHandshakeMessage.Name = \"txtServerEncryptedHandshakeMessage\";\n            this.txtServerEncryptedHandshakeMessage.Size = new System.Drawing.Size(703, 20);\n            this.txtServerEncryptedHandshakeMessage.TabIndex = 19;\n            this.txtServerEncryptedHandshakeMessage.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ServerEncryptedFinishedMessage;\n            // \n            // txtServerHelloDone\n            // \n            this.txtServerHelloDone.Location = new System.Drawing.Point(193, 97);\n            this.txtServerHelloDone.Name = \"txtServerHelloDone\";\n            this.txtServerHelloDone.ReadOnly = true;\n            this.txtServerHelloDone.Size = new System.Drawing.Size(703, 20);\n            this.txtServerHelloDone.TabIndex = 9;\n            this.txtServerHelloDone.Text = \"0e000000\";\n            // \n            // groupBox1\n            // \n            this.groupBox1.Controls.Add(this.groupBox10);\n            this.groupBox1.Controls.Add(this.groupBox9);\n            this.groupBox1.Location = new System.Drawing.Point(6, 329);\n            this.groupBox1.Name = \"groupBox1\";\n            this.groupBox1.Size = new System.Drawing.Size(902, 118);\n            this.groupBox1.TabIndex = 20;\n            this.groupBox1.TabStop = false;\n            this.groupBox1.Text = \"Decrypted Finished Messages (requires debugging input)\";\n            // \n            // groupBox10\n            // \n            this.groupBox10.Controls.Add(this.txtServerFinishedHmacMd5);\n            this.groupBox10.Controls.Add(this.label63);\n            this.groupBox10.Controls.Add(this.label64);\n            this.groupBox10.Controls.Add(this.txtServerFinishedVerifyData);\n            this.groupBox10.Controls.Add(this.txtServerFinishedHeader);\n            this.groupBox10.Controls.Add(this.label65);\n            this.groupBox10.Location = new System.Drawing.Point(456, 19);\n            this.groupBox10.Name = \"groupBox10\";\n            this.groupBox10.Size = new System.Drawing.Size(440, 93);\n            this.groupBox10.TabIndex = 6;\n            this.groupBox10.TabStop = false;\n            this.groupBox10.Text = \"Server\";\n            // \n            // txtServerFinishedHmacMd5\n            // \n            this.txtServerFinishedHmacMd5.Location = new System.Drawing.Point(118, 67);\n            this.txtServerFinishedHmacMd5.Name = \"txtServerFinishedHmacMd5\";\n            this.txtServerFinishedHmacMd5.ReadOnly = true;\n            this.txtServerFinishedHmacMd5.Size = new System.Drawing.Size(316, 20);\n            this.txtServerFinishedHmacMd5.TabIndex = 5;\n            // \n            // label63\n            // \n            this.label63.AutoSize = true;\n            this.label63.Location = new System.Drawing.Point(3, 71);\n            this.label63.Name = \"label63\";\n            this.label63.Size = new System.Drawing.Size(109, 13);\n            this.label63.TabIndex = 4;\n            this.label63.Text = \"HMAC_MD5(finished)\";\n            // \n            // label64\n            // \n            this.label64.AutoSize = true;\n            this.label64.Location = new System.Drawing.Point(53, 44);\n            this.label64.Name = \"label64\";\n            this.label64.Size = new System.Drawing.Size(59, 13);\n            this.label64.TabIndex = 3;\n            this.label64.Text = \"verify_data\";\n            // \n            // txtServerFinishedVerifyData\n            // \n            this.txtServerFinishedVerifyData.Location = new System.Drawing.Point(118, 41);\n            this.txtServerFinishedVerifyData.Name = \"txtServerFinishedVerifyData\";\n            this.txtServerFinishedVerifyData.ReadOnly = true;\n            this.txtServerFinishedVerifyData.Size = new System.Drawing.Size(316, 20);\n            this.txtServerFinishedVerifyData.TabIndex = 2;\n            // \n            // txtServerFinishedHeader\n            // \n            this.txtServerFinishedHeader.Location = new System.Drawing.Point(118, 13);\n            this.txtServerFinishedHeader.Name = \"txtServerFinishedHeader\";\n            this.txtServerFinishedHeader.ReadOnly = true;\n            this.txtServerFinishedHeader.Size = new System.Drawing.Size(316, 20);\n            this.txtServerFinishedHeader.TabIndex = 1;\n            this.txtServerFinishedHeader.Text = \"1400000c\";\n            // \n            // label65\n            // \n            this.label65.AutoSize = true;\n            this.label65.Location = new System.Drawing.Point(70, 16);\n            this.label65.Name = \"label65\";\n            this.label65.Size = new System.Drawing.Size(42, 13);\n            this.label65.TabIndex = 0;\n            this.label65.Text = \"Header\";\n            // \n            // groupBox9\n            // \n            this.groupBox9.Controls.Add(this.txtClientFinishedHmacMd5);\n            this.groupBox9.Controls.Add(this.label62);\n            this.groupBox9.Controls.Add(this.label51);\n            this.groupBox9.Controls.Add(this.txtClientFinishedVerifyData);\n            this.groupBox9.Controls.Add(this.txtClientFinishedHeader);\n            this.groupBox9.Controls.Add(this.label50);\n            this.groupBox9.Location = new System.Drawing.Point(8, 20);\n            this.groupBox9.Name = \"groupBox9\";\n            this.groupBox9.Size = new System.Drawing.Size(442, 93);\n            this.groupBox9.TabIndex = 0;\n            this.groupBox9.TabStop = false;\n            this.groupBox9.Text = \"Client\";\n            // \n            // txtClientFinishedHmacMd5\n            // \n            this.txtClientFinishedHmacMd5.Location = new System.Drawing.Point(118, 67);\n            this.txtClientFinishedHmacMd5.Name = \"txtClientFinishedHmacMd5\";\n            this.txtClientFinishedHmacMd5.ReadOnly = true;\n            this.txtClientFinishedHmacMd5.Size = new System.Drawing.Size(312, 20);\n            this.txtClientFinishedHmacMd5.TabIndex = 5;\n            // \n            // label62\n            // \n            this.label62.AutoSize = true;\n            this.label62.Location = new System.Drawing.Point(3, 71);\n            this.label62.Name = \"label62\";\n            this.label62.Size = new System.Drawing.Size(109, 13);\n            this.label62.TabIndex = 4;\n            this.label62.Text = \"HMAC_MD5(finished)\";\n            // \n            // label51\n            // \n            this.label51.AutoSize = true;\n            this.label51.Location = new System.Drawing.Point(53, 44);\n            this.label51.Name = \"label51\";\n            this.label51.Size = new System.Drawing.Size(59, 13);\n            this.label51.TabIndex = 3;\n            this.label51.Text = \"verify_data\";\n            // \n            // txtClientFinishedVerifyData\n            // \n            this.txtClientFinishedVerifyData.Location = new System.Drawing.Point(118, 41);\n            this.txtClientFinishedVerifyData.Name = \"txtClientFinishedVerifyData\";\n            this.txtClientFinishedVerifyData.ReadOnly = true;\n            this.txtClientFinishedVerifyData.Size = new System.Drawing.Size(312, 20);\n            this.txtClientFinishedVerifyData.TabIndex = 2;\n            // \n            // txtClientFinishedHeader\n            // \n            this.txtClientFinishedHeader.Location = new System.Drawing.Point(118, 13);\n            this.txtClientFinishedHeader.Name = \"txtClientFinishedHeader\";\n            this.txtClientFinishedHeader.ReadOnly = true;\n            this.txtClientFinishedHeader.Size = new System.Drawing.Size(312, 20);\n            this.txtClientFinishedHeader.TabIndex = 1;\n            this.txtClientFinishedHeader.Text = \"1400000c\";\n            // \n            // label50\n            // \n            this.label50.AutoSize = true;\n            this.label50.Location = new System.Drawing.Point(70, 16);\n            this.label50.Name = \"label50\";\n            this.label50.Size = new System.Drawing.Size(42, 13);\n            this.label50.TabIndex = 0;\n            this.label50.Text = \"Header\";\n            // \n            // tabDebuggingInput\n            // \n            this.tabDebuggingInput.Controls.Add(this.label11);\n            this.tabDebuggingInput.Controls.Add(this.label12);\n            this.tabDebuggingInput.Controls.Add(this.txtDecryptedClientKeyExchange);\n            this.tabDebuggingInput.Controls.Add(this.txtPremasterSecret);\n            this.tabDebuggingInput.Location = new System.Drawing.Point(4, 22);\n            this.tabDebuggingInput.Name = \"tabDebuggingInput\";\n            this.tabDebuggingInput.Padding = new System.Windows.Forms.Padding(3);\n            this.tabDebuggingInput.Size = new System.Drawing.Size(913, 453);\n            this.tabDebuggingInput.TabIndex = 1;\n            this.tabDebuggingInput.Text = \"Debugging Input\";\n            this.tabDebuggingInput.UseVisualStyleBackColor = true;\n            // \n            // txtPremasterSecret\n            // \n            this.txtPremasterSecret.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"PreMasterSecret\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtPremasterSecret.Location = new System.Drawing.Point(7, 34);\n            this.txtPremasterSecret.Multiline = true;\n            this.txtPremasterSecret.Name = \"txtPremasterSecret\";\n            this.txtPremasterSecret.Size = new System.Drawing.Size(900, 59);\n            this.txtPremasterSecret.TabIndex = 21;\n            this.txtPremasterSecret.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.PreMasterSecret;\n            // \n            // tabCertificatesInput\n            // \n            this.tabCertificatesInput.Controls.Add(this.btnCalculateCertificateInformation);\n            this.tabCertificatesInput.Controls.Add(this.groupBox15);\n            this.tabCertificatesInput.Controls.Add(this.groupBox14);\n            this.tabCertificatesInput.Controls.Add(this.groupBox13);\n            this.tabCertificatesInput.Location = new System.Drawing.Point(4, 22);\n            this.tabCertificatesInput.Name = \"tabCertificatesInput\";\n            this.tabCertificatesInput.Padding = new System.Windows.Forms.Padding(3);\n            this.tabCertificatesInput.Size = new System.Drawing.Size(913, 453);\n            this.tabCertificatesInput.TabIndex = 7;\n            this.tabCertificatesInput.Text = \"Certificate Input\";\n            this.tabCertificatesInput.UseVisualStyleBackColor = true;\n            // \n            // btnCalculateCertificateInformation\n            // \n            this.btnCalculateCertificateInformation.Location = new System.Drawing.Point(734, 424);\n            this.btnCalculateCertificateInformation.Name = \"btnCalculateCertificateInformation\";\n            this.btnCalculateCertificateInformation.Size = new System.Drawing.Size(173, 23);\n            this.btnCalculateCertificateInformation.TabIndex = 21;\n            this.btnCalculateCertificateInformation.Text = \"&Calculate Certificate Information\";\n            this.btnCalculateCertificateInformation.UseVisualStyleBackColor = true;\n            this.btnCalculateCertificateInformation.Click += new System.EventHandler(this.btnCalculateCertificateInformation_Click);\n            // \n            // groupBox15\n            // \n            this.groupBox15.Controls.Add(this.label76);\n            this.groupBox15.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityModulus);\n            this.groupBox15.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue);\n            this.groupBox15.Controls.Add(this.label78);\n            this.groupBox15.Controls.Add(this.label80);\n            this.groupBox15.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent);\n            this.groupBox15.Location = new System.Drawing.Point(6, 281);\n            this.groupBox15.Name = \"groupBox15\";\n            this.groupBox15.Size = new System.Drawing.Size(901, 122);\n            this.groupBox15.TabIndex = 20;\n            this.groupBox15.TabStop = false;\n            this.groupBox15.Text = \"Verisign Class 3 Public Primary Certification Authority\";\n            // \n            // label76\n            // \n            this.label76.AutoSize = true;\n            this.label76.Location = new System.Drawing.Point(4, 21);\n            this.label76.Name = \"label76\";\n            this.label76.Size = new System.Drawing.Size(138, 13);\n            this.label76.TabIndex = 12;\n            this.label76.Text = \"(encrypted) signature value:\";\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityModulus\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.Location = new System.Drawing.Point(146, 70);\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.Multiline = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.Name = \"txtVerisignClass3PrimaryCertificationAuthorityModulus\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.Size = new System.Drawing.Size(747, 42);\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.TabIndex = 17;\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulus.Text = resources.GetString(\"txtVerisignClass3PrimaryCertificationAuthorityModulus.Text\");\n            // \n            // txtVerisignClass3PrimaryCertificationAuthoritySignatureValue\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Location = new System.Drawing.Point(146, 17);\n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Name = \"txtVerisignClass3PrimaryCertificationAuthoritySignatureValue\";\n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Size = new System.Drawing.Size(747, 20);\n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.TabIndex = 13;\n            this.txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Text = resources.GetString(\"txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Text\");\n            // \n            // label78\n            // \n            this.label78.AutoSize = true;\n            this.label78.Location = new System.Drawing.Point(73, 70);\n            this.label78.Name = \"label78\";\n            this.label78.Size = new System.Drawing.Size(69, 13);\n            this.label78.TabIndex = 16;\n            this.label78.Text = \"Modulus \\\"n\\\":\";\n            // \n            // label80\n            // \n            this.label80.AutoSize = true;\n            this.label80.Location = new System.Drawing.Point(15, 49);\n            this.label80.Name = \"label80\";\n            this.label80.Size = new System.Drawing.Size(127, 13);\n            this.label80.TabIndex = 15;\n            this.label80.Text = \"Public Key Exponent \\\"e\\\":\";\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityPublicExponent\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.Location = new System.Drawing.Point(146, 45);\n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.Name = \"txtVerisignClass3PrimaryCertificationAuthorityPublicExponent\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.Size = new System.Drawing.Size(747, 20);\n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.TabIndex = 14;\n            this.txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.Text = \"010001\";\n            // \n            // groupBox14\n            // \n            this.groupBox14.Controls.Add(this.label75);\n            this.groupBox14.Controls.Add(this.txtVersignClass3SecureServerSignedCertificate);\n            this.groupBox14.Controls.Add(this.txtVerisignClass3SecureServerModulus);\n            this.groupBox14.Controls.Add(this.txtVerisignClass3SecureServerSignatureValue);\n            this.groupBox14.Controls.Add(this.label72);\n            this.groupBox14.Controls.Add(this.label74);\n            this.groupBox14.Controls.Add(this.label73);\n            this.groupBox14.Controls.Add(this.txtVerisignClass3SecureServerPublicExponent);\n            this.groupBox14.Location = new System.Drawing.Point(6, 141);\n            this.groupBox14.Name = \"groupBox14\";\n            this.groupBox14.Size = new System.Drawing.Size(901, 137);\n            this.groupBox14.TabIndex = 5;\n            this.groupBox14.TabStop = false;\n            this.groupBox14.Text = \"VeriSign Class 3 Secure Server CA\";\n            // \n            // label75\n            // \n            this.label75.AutoSize = true;\n            this.label75.Location = new System.Drawing.Point(4, 42);\n            this.label75.Name = \"label75\";\n            this.label75.Size = new System.Drawing.Size(138, 13);\n            this.label75.TabIndex = 12;\n            this.label75.Text = \"(encrypted) signature value:\";\n            // \n            // txtVersignClass3SecureServerSignedCertificate\n            // \n            this.txtVersignClass3SecureServerSignedCertificate.Location = new System.Drawing.Point(146, 17);\n            this.txtVersignClass3SecureServerSignedCertificate.Name = \"txtVersignClass3SecureServerSignedCertificate\";\n            this.txtVersignClass3SecureServerSignedCertificate.Size = new System.Drawing.Size(747, 20);\n            this.txtVersignClass3SecureServerSignedCertificate.TabIndex = 11;\n            this.txtVersignClass3SecureServerSignedCertificate.Text = resources.GetString(\"txtVersignClass3SecureServerSignedCertificate.Text\");\n            // \n            // txtVerisignClass3SecureServerModulus\n            // \n            this.txtVerisignClass3SecureServerModulus.Location = new System.Drawing.Point(146, 88);\n            this.txtVerisignClass3SecureServerModulus.Multiline = true;\n            this.txtVerisignClass3SecureServerModulus.Name = \"txtVerisignClass3SecureServerModulus\";\n            this.txtVerisignClass3SecureServerModulus.Size = new System.Drawing.Size(747, 42);\n            this.txtVerisignClass3SecureServerModulus.TabIndex = 17;\n            this.txtVerisignClass3SecureServerModulus.Text = resources.GetString(\"txtVerisignClass3SecureServerModulus.Text\");\n            // \n            // txtVerisignClass3SecureServerSignatureValue\n            // \n            this.txtVerisignClass3SecureServerSignatureValue.Location = new System.Drawing.Point(146, 38);\n            this.txtVerisignClass3SecureServerSignatureValue.Name = \"txtVerisignClass3SecureServerSignatureValue\";\n            this.txtVerisignClass3SecureServerSignatureValue.Size = new System.Drawing.Size(747, 20);\n            this.txtVerisignClass3SecureServerSignatureValue.TabIndex = 13;\n            this.txtVerisignClass3SecureServerSignatureValue.Text = resources.GetString(\"txtVerisignClass3SecureServerSignatureValue.Text\");\n            // \n            // label72\n            // \n            this.label72.AutoSize = true;\n            this.label72.Location = new System.Drawing.Point(73, 88);\n            this.label72.Name = \"label72\";\n            this.label72.Size = new System.Drawing.Size(69, 13);\n            this.label72.TabIndex = 16;\n            this.label72.Text = \"Modulus \\\"n\\\":\";\n            // \n            // label74\n            // \n            this.label74.AutoSize = true;\n            this.label74.Location = new System.Drawing.Point(54, 21);\n            this.label74.Name = \"label74\";\n            this.label74.Size = new System.Drawing.Size(88, 13);\n            this.label74.TabIndex = 10;\n            this.label74.Text = \"signedCertificate:\";\n            // \n            // label73\n            // \n            this.label73.AutoSize = true;\n            this.label73.Location = new System.Drawing.Point(15, 67);\n            this.label73.Name = \"label73\";\n            this.label73.Size = new System.Drawing.Size(127, 13);\n            this.label73.TabIndex = 15;\n            this.label73.Text = \"Public Key Exponent \\\"e\\\":\";\n            // \n            // txtVerisignClass3SecureServerPublicExponent\n            // \n            this.txtVerisignClass3SecureServerPublicExponent.Location = new System.Drawing.Point(146, 63);\n            this.txtVerisignClass3SecureServerPublicExponent.Name = \"txtVerisignClass3SecureServerPublicExponent\";\n            this.txtVerisignClass3SecureServerPublicExponent.Size = new System.Drawing.Size(747, 20);\n            this.txtVerisignClass3SecureServerPublicExponent.TabIndex = 14;\n            this.txtVerisignClass3SecureServerPublicExponent.Text = \"010001 \";\n            // \n            // groupBox13\n            // \n            this.groupBox13.Controls.Add(this.txtAmazonModulus);\n            this.groupBox13.Controls.Add(this.label69);\n            this.groupBox13.Controls.Add(this.label68);\n            this.groupBox13.Controls.Add(this.txtAmazonPublicExponent);\n            this.groupBox13.Controls.Add(this.label66);\n            this.groupBox13.Controls.Add(this.txtAmazonSignatureValue);\n            this.groupBox13.Controls.Add(this.label67);\n            this.groupBox13.Controls.Add(this.txtAmazonSignedCertificate);\n            this.groupBox13.Location = new System.Drawing.Point(6, -2);\n            this.groupBox13.Name = \"groupBox13\";\n            this.groupBox13.Size = new System.Drawing.Size(901, 137);\n            this.groupBox13.TabIndex = 4;\n            this.groupBox13.TabStop = false;\n            this.groupBox13.Text = \"www.amazon.com\";\n            // \n            // txtAmazonModulus\n            // \n            this.txtAmazonModulus.Location = new System.Drawing.Point(146, 90);\n            this.txtAmazonModulus.Multiline = true;\n            this.txtAmazonModulus.Name = \"txtAmazonModulus\";\n            this.txtAmazonModulus.Size = new System.Drawing.Size(747, 42);\n            this.txtAmazonModulus.TabIndex = 7;\n            this.txtAmazonModulus.Text = resources.GetString(\"txtAmazonModulus.Text\");\n            // \n            // label69\n            // \n            this.label69.AutoSize = true;\n            this.label69.Location = new System.Drawing.Point(73, 90);\n            this.label69.Name = \"label69\";\n            this.label69.Size = new System.Drawing.Size(69, 13);\n            this.label69.TabIndex = 6;\n            this.label69.Text = \"Modulus \\\"n\\\":\";\n            // \n            // label68\n            // \n            this.label68.AutoSize = true;\n            this.label68.Location = new System.Drawing.Point(15, 69);\n            this.label68.Name = \"label68\";\n            this.label68.Size = new System.Drawing.Size(127, 13);\n            this.label68.TabIndex = 5;\n            this.label68.Text = \"Public Key Exponent \\\"e\\\":\";\n            // \n            // txtAmazonPublicExponent\n            // \n            this.txtAmazonPublicExponent.Location = new System.Drawing.Point(146, 65);\n            this.txtAmazonPublicExponent.Name = \"txtAmazonPublicExponent\";\n            this.txtAmazonPublicExponent.Size = new System.Drawing.Size(747, 20);\n            this.txtAmazonPublicExponent.TabIndex = 4;\n            this.txtAmazonPublicExponent.Text = \"010001 \";\n            // \n            // label66\n            // \n            this.label66.AutoSize = true;\n            this.label66.Location = new System.Drawing.Point(54, 22);\n            this.label66.Name = \"label66\";\n            this.label66.Size = new System.Drawing.Size(88, 13);\n            this.label66.TabIndex = 0;\n            this.label66.Text = \"signedCertificate:\";\n            // \n            // txtAmazonSignatureValue\n            // \n            this.txtAmazonSignatureValue.Location = new System.Drawing.Point(146, 40);\n            this.txtAmazonSignatureValue.Name = \"txtAmazonSignatureValue\";\n            this.txtAmazonSignatureValue.Size = new System.Drawing.Size(747, 20);\n            this.txtAmazonSignatureValue.TabIndex = 3;\n            this.txtAmazonSignatureValue.Text = resources.GetString(\"txtAmazonSignatureValue.Text\");\n            // \n            // label67\n            // \n            this.label67.AutoSize = true;\n            this.label67.Location = new System.Drawing.Point(4, 44);\n            this.label67.Name = \"label67\";\n            this.label67.Size = new System.Drawing.Size(138, 13);\n            this.label67.TabIndex = 2;\n            this.label67.Text = \"(encrypted) signature value:\";\n            // \n            // txtAmazonSignedCertificate\n            // \n            this.txtAmazonSignedCertificate.Location = new System.Drawing.Point(146, 18);\n            this.txtAmazonSignedCertificate.Name = \"txtAmazonSignedCertificate\";\n            this.txtAmazonSignedCertificate.Size = new System.Drawing.Size(747, 20);\n            this.txtAmazonSignedCertificate.TabIndex = 1;\n            this.txtAmazonSignedCertificate.Text = resources.GetString(\"txtAmazonSignedCertificate.Text\");\n            // \n            // tabCertificatesOutput\n            // \n            this.tabCertificatesOutput.Controls.Add(this.groupBox18);\n            this.tabCertificatesOutput.Controls.Add(this.groupBox17);\n            this.tabCertificatesOutput.Controls.Add(this.groupBox16);\n            this.tabCertificatesOutput.Location = new System.Drawing.Point(4, 22);\n            this.tabCertificatesOutput.Name = \"tabCertificatesOutput\";\n            this.tabCertificatesOutput.Size = new System.Drawing.Size(913, 453);\n            this.tabCertificatesOutput.TabIndex = 9;\n            this.tabCertificatesOutput.Text = \"Certificate Output\";\n            this.tabCertificatesOutput.UseVisualStyleBackColor = true;\n            // \n            // groupBox18\n            // \n            this.groupBox18.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityHashValue);\n            this.groupBox18.Controls.Add(this.label87);\n            this.groupBox18.Controls.Add(this.label77);\n            this.groupBox18.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature);\n            this.groupBox18.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId);\n            this.groupBox18.Controls.Add(this.label88);\n            this.groupBox18.Controls.Add(this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10);\n            this.groupBox18.Controls.Add(this.label86);\n            this.groupBox18.Location = new System.Drawing.Point(3, 282);\n            this.groupBox18.Name = \"groupBox18\";\n            this.groupBox18.Size = new System.Drawing.Size(905, 133);\n            this.groupBox18.TabIndex = 14;\n            this.groupBox18.TabStop = false;\n            this.groupBox18.Text = \"Verisign Class 3 Public Primary Certification Authority\";\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityHashValue\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue.Location = new System.Drawing.Point(113, 111);\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue.Name = \"txtVerisignClass3PrimaryCertificationAuthorityHashValue\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue.ReadOnly = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashValue.TabIndex = 33;\n            // \n            // label87\n            // \n            this.label87.AutoSize = true;\n            this.label87.Location = new System.Drawing.Point(18, 26);\n            this.label87.Name = \"label87\";\n            this.label87.Size = new System.Drawing.Size(92, 13);\n            this.label87.TabIndex = 26;\n            this.label87.Text = \"Modulus Base-10:\";\n            // \n            // label77\n            // \n            this.label77.AutoSize = true;\n            this.label77.Location = new System.Drawing.Point(15, 88);\n            this.label77.Name = \"label77\";\n            this.label77.Size = new System.Drawing.Size(95, 13);\n            this.label77.TabIndex = 30;\n            this.label77.Text = \"Hash Algorithm ID:\";\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.Location = new System.Drawing.Point(113, 53);\n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.Name = \"txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.ReadOnly = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.TabIndex = 29;\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.Location = new System.Drawing.Point(113, 85);\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.Name = \"txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.ReadOnly = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.TabIndex = 32;\n            // \n            // label88\n            // \n            this.label88.AutoSize = true;\n            this.label88.Location = new System.Drawing.Point(3, 56);\n            this.label88.Name = \"label88\";\n            this.label88.Size = new System.Drawing.Size(107, 13);\n            this.label88.TabIndex = 28;\n            this.label88.Text = \"Decrypted Signature:\";\n            // \n            // txtVerisignClass3PrimaryCertificationAuthorityModulusBase10\n            // \n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.Location = new System.Drawing.Point(113, 23);\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.Multiline = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.Name = \"txtVerisignClass3PrimaryCertificationAuthorityModulusBase10\";\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.ReadOnly = true;\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.Size = new System.Drawing.Size(782, 24);\n            this.txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.TabIndex = 27;\n            // \n            // label86\n            // \n            this.label86.AutoSize = true;\n            this.label86.Location = new System.Drawing.Point(45, 113);\n            this.label86.Name = \"label86\";\n            this.label86.Size = new System.Drawing.Size(65, 13);\n            this.label86.TabIndex = 31;\n            this.label86.Text = \"Hash Value:\";\n            // \n            // groupBox17\n            // \n            this.groupBox17.Controls.Add(this.txtVerisignClass3SecureServerHashValue);\n            this.groupBox17.Controls.Add(this.label83);\n            this.groupBox17.Controls.Add(this.txtVerisignClass3SecureServerHashAlgorithmId);\n            this.groupBox17.Controls.Add(this.txtVerisignClass3SecureServerModulusBase10);\n            this.groupBox17.Controls.Add(this.label71);\n            this.groupBox17.Controls.Add(this.label85);\n            this.groupBox17.Controls.Add(this.label84);\n            this.groupBox17.Controls.Add(this.txtVerisignClass3SecureServerDecryptedSignature);\n            this.groupBox17.Location = new System.Drawing.Point(3, 142);\n            this.groupBox17.Name = \"groupBox17\";\n            this.groupBox17.Size = new System.Drawing.Size(905, 133);\n            this.groupBox17.TabIndex = 13;\n            this.groupBox17.TabStop = false;\n            this.groupBox17.Text = \"VeriSign Class 3 Secure Server CA\";\n            // \n            // txtVerisignClass3SecureServerHashValue\n            // \n            this.txtVerisignClass3SecureServerHashValue.Location = new System.Drawing.Point(113, 107);\n            this.txtVerisignClass3SecureServerHashValue.Name = \"txtVerisignClass3SecureServerHashValue\";\n            this.txtVerisignClass3SecureServerHashValue.ReadOnly = true;\n            this.txtVerisignClass3SecureServerHashValue.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3SecureServerHashValue.TabIndex = 25;\n            // \n            // label83\n            // \n            this.label83.AutoSize = true;\n            this.label83.Location = new System.Drawing.Point(15, 84);\n            this.label83.Name = \"label83\";\n            this.label83.Size = new System.Drawing.Size(95, 13);\n            this.label83.TabIndex = 22;\n            this.label83.Text = \"Hash Algorithm ID:\";\n            // \n            // txtVerisignClass3SecureServerHashAlgorithmId\n            // \n            this.txtVerisignClass3SecureServerHashAlgorithmId.Location = new System.Drawing.Point(113, 81);\n            this.txtVerisignClass3SecureServerHashAlgorithmId.Name = \"txtVerisignClass3SecureServerHashAlgorithmId\";\n            this.txtVerisignClass3SecureServerHashAlgorithmId.ReadOnly = true;\n            this.txtVerisignClass3SecureServerHashAlgorithmId.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3SecureServerHashAlgorithmId.TabIndex = 24;\n            // \n            // txtVerisignClass3SecureServerModulusBase10\n            // \n            this.txtVerisignClass3SecureServerModulusBase10.Location = new System.Drawing.Point(113, 19);\n            this.txtVerisignClass3SecureServerModulusBase10.Multiline = true;\n            this.txtVerisignClass3SecureServerModulusBase10.Name = \"txtVerisignClass3SecureServerModulusBase10\";\n            this.txtVerisignClass3SecureServerModulusBase10.ReadOnly = true;\n            this.txtVerisignClass3SecureServerModulusBase10.Size = new System.Drawing.Size(782, 24);\n            this.txtVerisignClass3SecureServerModulusBase10.TabIndex = 19;\n            // \n            // label71\n            // \n            this.label71.AutoSize = true;\n            this.label71.Location = new System.Drawing.Point(45, 109);\n            this.label71.Name = \"label71\";\n            this.label71.Size = new System.Drawing.Size(65, 13);\n            this.label71.TabIndex = 23;\n            this.label71.Text = \"Hash Value:\";\n            // \n            // label85\n            // \n            this.label85.AutoSize = true;\n            this.label85.Location = new System.Drawing.Point(18, 22);\n            this.label85.Name = \"label85\";\n            this.label85.Size = new System.Drawing.Size(92, 13);\n            this.label85.TabIndex = 18;\n            this.label85.Text = \"Modulus Base-10:\";\n            // \n            // label84\n            // \n            this.label84.AutoSize = true;\n            this.label84.Location = new System.Drawing.Point(3, 52);\n            this.label84.Name = \"label84\";\n            this.label84.Size = new System.Drawing.Size(107, 13);\n            this.label84.TabIndex = 20;\n            this.label84.Text = \"Decrypted Signature:\";\n            // \n            // txtVerisignClass3SecureServerDecryptedSignature\n            // \n            this.txtVerisignClass3SecureServerDecryptedSignature.Location = new System.Drawing.Point(113, 49);\n            this.txtVerisignClass3SecureServerDecryptedSignature.Name = \"txtVerisignClass3SecureServerDecryptedSignature\";\n            this.txtVerisignClass3SecureServerDecryptedSignature.ReadOnly = true;\n            this.txtVerisignClass3SecureServerDecryptedSignature.Size = new System.Drawing.Size(782, 20);\n            this.txtVerisignClass3SecureServerDecryptedSignature.TabIndex = 21;\n            // \n            // groupBox16\n            // \n            this.groupBox16.Controls.Add(this.txtAmazonHashValue);\n            this.groupBox16.Controls.Add(this.txtAmazonHashAlgorithmId);\n            this.groupBox16.Controls.Add(this.label82);\n            this.groupBox16.Controls.Add(this.label79);\n            this.groupBox16.Controls.Add(this.txtAmazonDecryptedSignature);\n            this.groupBox16.Controls.Add(this.label81);\n            this.groupBox16.Controls.Add(this.label70);\n            this.groupBox16.Controls.Add(this.txtAmazonModulusBase10);\n            this.groupBox16.Location = new System.Drawing.Point(3, 3);\n            this.groupBox16.Name = \"groupBox16\";\n            this.groupBox16.Size = new System.Drawing.Size(905, 133);\n            this.groupBox16.TabIndex = 12;\n            this.groupBox16.TabStop = false;\n            this.groupBox16.Text = \"www.amazon.com\";\n            // \n            // txtAmazonHashValue\n            // \n            this.txtAmazonHashValue.Location = new System.Drawing.Point(113, 101);\n            this.txtAmazonHashValue.Name = \"txtAmazonHashValue\";\n            this.txtAmazonHashValue.ReadOnly = true;\n            this.txtAmazonHashValue.Size = new System.Drawing.Size(782, 20);\n            this.txtAmazonHashValue.TabIndex = 17;\n            // \n            // txtAmazonHashAlgorithmId\n            // \n            this.txtAmazonHashAlgorithmId.Location = new System.Drawing.Point(113, 76);\n            this.txtAmazonHashAlgorithmId.Name = \"txtAmazonHashAlgorithmId\";\n            this.txtAmazonHashAlgorithmId.ReadOnly = true;\n            this.txtAmazonHashAlgorithmId.Size = new System.Drawing.Size(782, 20);\n            this.txtAmazonHashAlgorithmId.TabIndex = 16;\n            // \n            // label82\n            // \n            this.label82.AutoSize = true;\n            this.label82.Location = new System.Drawing.Point(45, 103);\n            this.label82.Name = \"label82\";\n            this.label82.Size = new System.Drawing.Size(65, 13);\n            this.label82.TabIndex = 15;\n            this.label82.Text = \"Hash Value:\";\n            // \n            // label79\n            // \n            this.label79.AutoSize = true;\n            this.label79.Location = new System.Drawing.Point(15, 78);\n            this.label79.Name = \"label79\";\n            this.label79.Size = new System.Drawing.Size(95, 13);\n            this.label79.TabIndex = 14;\n            this.label79.Text = \"Hash Algorithm ID:\";\n            // \n            // txtAmazonDecryptedSignature\n            // \n            this.txtAmazonDecryptedSignature.Location = new System.Drawing.Point(113, 43);\n            this.txtAmazonDecryptedSignature.Name = \"txtAmazonDecryptedSignature\";\n            this.txtAmazonDecryptedSignature.ReadOnly = true;\n            this.txtAmazonDecryptedSignature.Size = new System.Drawing.Size(782, 20);\n            this.txtAmazonDecryptedSignature.TabIndex = 13;\n            // \n            // label81\n            // \n            this.label81.AutoSize = true;\n            this.label81.Location = new System.Drawing.Point(3, 46);\n            this.label81.Name = \"label81\";\n            this.label81.Size = new System.Drawing.Size(107, 13);\n            this.label81.TabIndex = 12;\n            this.label81.Text = \"Decrypted Signature:\";\n            // \n            // label70\n            // \n            this.label70.AutoSize = true;\n            this.label70.Location = new System.Drawing.Point(18, 16);\n            this.label70.Name = \"label70\";\n            this.label70.Size = new System.Drawing.Size(92, 13);\n            this.label70.TabIndex = 10;\n            this.label70.Text = \"Modulus Base-10:\";\n            // \n            // txtAmazonModulusBase10\n            // \n            this.txtAmazonModulusBase10.Location = new System.Drawing.Point(113, 13);\n            this.txtAmazonModulusBase10.Multiline = true;\n            this.txtAmazonModulusBase10.Name = \"txtAmazonModulusBase10\";\n            this.txtAmazonModulusBase10.ReadOnly = true;\n            this.txtAmazonModulusBase10.Size = new System.Drawing.Size(782, 24);\n            this.txtAmazonModulusBase10.TabIndex = 11;\n            // \n            // tabKeyInput\n            // \n            this.tabKeyInput.Controls.Add(this.txtServerFinishedLabel);\n            this.tabKeyInput.Controls.Add(this.label61);\n            this.tabKeyInput.Controls.Add(this.txtClientFinishedLabel);\n            this.tabKeyInput.Controls.Add(this.label60);\n            this.tabKeyInput.Controls.Add(this.txtSha1HandshakeMessages);\n            this.tabKeyInput.Controls.Add(this.txtMd5HandshakeMessages);\n            this.tabKeyInput.Controls.Add(this.label59);\n            this.tabKeyInput.Controls.Add(this.label58);\n            this.tabKeyInput.Controls.Add(this.label57);\n            this.tabKeyInput.Controls.Add(this.txtHandshakeMessages);\n            this.tabKeyInput.Controls.Add(this.txtKeyExpansionLabel);\n            this.tabKeyInput.Controls.Add(this.label56);\n            this.tabKeyInput.Controls.Add(this.label54);\n            this.tabKeyInput.Controls.Add(this.label53);\n            this.tabKeyInput.Controls.Add(this.label52);\n            this.tabKeyInput.Controls.Add(this.txtMasterSecretLabel);\n            this.tabKeyInput.Controls.Add(this.txtServerRandomBytes);\n            this.tabKeyInput.Controls.Add(this.txtClientRandomBytes);\n            this.tabKeyInput.Location = new System.Drawing.Point(4, 22);\n            this.tabKeyInput.Name = \"tabKeyInput\";\n            this.tabKeyInput.Padding = new System.Windows.Forms.Padding(3);\n            this.tabKeyInput.Size = new System.Drawing.Size(913, 453);\n            this.tabKeyInput.TabIndex = 3;\n            this.tabKeyInput.Text = \"Key Input\";\n            this.tabKeyInput.UseVisualStyleBackColor = true;\n            // \n            // txtServerFinishedLabel\n            // \n            this.txtServerFinishedLabel.Location = new System.Drawing.Point(204, 410);\n            this.txtServerFinishedLabel.Name = \"txtServerFinishedLabel\";\n            this.txtServerFinishedLabel.ReadOnly = true;\n            this.txtServerFinishedLabel.Size = new System.Drawing.Size(703, 20);\n            this.txtServerFinishedLabel.TabIndex = 25;\n            this.txtServerFinishedLabel.Text = \"server finished\";\n            // \n            // label61\n            // \n            this.label61.AutoSize = true;\n            this.label61.Location = new System.Drawing.Point(25, 410);\n            this.label61.Name = \"label61\";\n            this.label61.Size = new System.Drawing.Size(170, 13);\n            this.label61.TabIndex = 24;\n            this.label61.Text = \"PRF Server Finished Label (string):\";\n            // \n            // txtClientFinishedLabel\n            // \n            this.txtClientFinishedLabel.Location = new System.Drawing.Point(204, 384);\n            this.txtClientFinishedLabel.Name = \"txtClientFinishedLabel\";\n            this.txtClientFinishedLabel.ReadOnly = true;\n            this.txtClientFinishedLabel.Size = new System.Drawing.Size(703, 20);\n            this.txtClientFinishedLabel.TabIndex = 23;\n            this.txtClientFinishedLabel.Text = \"client finished\";\n            // \n            // label60\n            // \n            this.label60.AutoSize = true;\n            this.label60.Location = new System.Drawing.Point(30, 384);\n            this.label60.Name = \"label60\";\n            this.label60.Size = new System.Drawing.Size(165, 13);\n            this.label60.TabIndex = 22;\n            this.label60.Text = \"PRF Client Finished Label (string):\";\n            // \n            // txtSha1HandshakeMessages\n            // \n            this.txtSha1HandshakeMessages.Location = new System.Drawing.Point(204, 357);\n            this.txtSha1HandshakeMessages.Name = \"txtSha1HandshakeMessages\";\n            this.txtSha1HandshakeMessages.ReadOnly = true;\n            this.txtSha1HandshakeMessages.Size = new System.Drawing.Size(703, 20);\n            this.txtSha1HandshakeMessages.TabIndex = 21;\n            // \n            // txtMd5HandshakeMessages\n            // \n            this.txtMd5HandshakeMessages.Location = new System.Drawing.Point(204, 329);\n            this.txtMd5HandshakeMessages.Name = \"txtMd5HandshakeMessages\";\n            this.txtMd5HandshakeMessages.ReadOnly = true;\n            this.txtMd5HandshakeMessages.Size = new System.Drawing.Size(703, 20);\n            this.txtMd5HandshakeMessages.TabIndex = 20;\n            // \n            // label59\n            // \n            this.label59.AutoSize = true;\n            this.label59.Location = new System.Drawing.Point(42, 357);\n            this.label59.Name = \"label59\";\n            this.label59.Size = new System.Drawing.Size(153, 13);\n            this.label59.TabIndex = 19;\n            this.label59.Text = \"SHA-1(handshake_messages):\";\n            // \n            // label58\n            // \n            this.label58.AutoSize = true;\n            this.label58.Location = new System.Drawing.Point(50, 332);\n            this.label58.Name = \"label58\";\n            this.label58.Size = new System.Drawing.Size(145, 13);\n            this.label58.TabIndex = 18;\n            this.label58.Text = \"MD5(handshake_messages):\";\n            // \n            // label57\n            // \n            this.label57.AutoSize = true;\n            this.label57.Location = new System.Drawing.Point(82, 133);\n            this.label57.Name = \"label57\";\n            this.label57.Size = new System.Drawing.Size(113, 13);\n            this.label57.TabIndex = 17;\n            this.label57.Text = \"handshake_messages\";\n            // \n            // txtHandshakeMessages\n            // \n            this.txtHandshakeMessages.Location = new System.Drawing.Point(204, 133);\n            this.txtHandshakeMessages.Multiline = true;\n            this.txtHandshakeMessages.Name = \"txtHandshakeMessages\";\n            this.txtHandshakeMessages.ReadOnly = true;\n            this.txtHandshakeMessages.Size = new System.Drawing.Size(703, 190);\n            this.txtHandshakeMessages.TabIndex = 16;\n            // \n            // txtKeyExpansionLabel\n            // \n            this.txtKeyExpansionLabel.Location = new System.Drawing.Point(204, 104);\n            this.txtKeyExpansionLabel.Name = \"txtKeyExpansionLabel\";\n            this.txtKeyExpansionLabel.ReadOnly = true;\n            this.txtKeyExpansionLabel.Size = new System.Drawing.Size(703, 20);\n            this.txtKeyExpansionLabel.TabIndex = 15;\n            this.txtKeyExpansionLabel.Text = \"key expansion\";\n            // \n            // label56\n            // \n            this.label56.AutoSize = true;\n            this.label56.Location = new System.Drawing.Point(28, 104);\n            this.label56.Name = \"label56\";\n            this.label56.Size = new System.Drawing.Size(167, 13);\n            this.label56.TabIndex = 14;\n            this.label56.Text = \"PRF Key Expansion Label (string):\";\n            // \n            // label54\n            // \n            this.label54.AutoSize = true;\n            this.label54.Location = new System.Drawing.Point(60, 71);\n            this.label54.Name = \"label54\";\n            this.label54.Size = new System.Drawing.Size(115, 13);\n            this.label54.TabIndex = 10;\n            this.label54.Text = \"Server Random (bytes)\";\n            // \n            // label53\n            // \n            this.label53.AutoSize = true;\n            this.label53.Location = new System.Drawing.Point(62, 38);\n            this.label53.Name = \"label53\";\n            this.label53.Size = new System.Drawing.Size(113, 13);\n            this.label53.TabIndex = 8;\n            this.label53.Text = \"Client Random (bytes):\";\n            // \n            // label52\n            // \n            this.label52.AutoSize = true;\n            this.label52.Location = new System.Drawing.Point(12, 9);\n            this.label52.Name = \"label52\";\n            this.label52.Size = new System.Drawing.Size(163, 13);\n            this.label52.TabIndex = 6;\n            this.label52.Text = \"PRF Master Secret Label (string):\";\n            // \n            // txtMasterSecretLabel\n            // \n            this.txtMasterSecretLabel.Location = new System.Drawing.Point(204, 6);\n            this.txtMasterSecretLabel.Name = \"txtMasterSecretLabel\";\n            this.txtMasterSecretLabel.ReadOnly = true;\n            this.txtMasterSecretLabel.Size = new System.Drawing.Size(703, 20);\n            this.txtMasterSecretLabel.TabIndex = 7;\n            this.txtMasterSecretLabel.Text = \"master secret\";\n            // \n            // txtServerRandomBytes\n            // \n            this.txtServerRandomBytes.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ServerRandomBytes\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtServerRandomBytes.Location = new System.Drawing.Point(204, 68);\n            this.txtServerRandomBytes.Name = \"txtServerRandomBytes\";\n            this.txtServerRandomBytes.Size = new System.Drawing.Size(703, 20);\n            this.txtServerRandomBytes.TabIndex = 11;\n            this.txtServerRandomBytes.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ServerRandomBytes;\n            // \n            // txtClientRandomBytes\n            // \n            this.txtClientRandomBytes.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ClientRandomBytes\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtClientRandomBytes.Location = new System.Drawing.Point(204, 35);\n            this.txtClientRandomBytes.Name = \"txtClientRandomBytes\";\n            this.txtClientRandomBytes.Size = new System.Drawing.Size(703, 20);\n            this.txtClientRandomBytes.TabIndex = 9;\n            this.txtClientRandomBytes.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ClientRandomBytes;\n            // \n            // tabDerivedKeys\n            // \n            this.tabDerivedKeys.Controls.Add(this.txtServerIV);\n            this.tabDerivedKeys.Controls.Add(this.txtClientIV);\n            this.tabDerivedKeys.Controls.Add(this.txtServerWriteKey);\n            this.tabDerivedKeys.Controls.Add(this.txtClientWriteKey);\n            this.tabDerivedKeys.Controls.Add(this.txtServerWriteMacKey);\n            this.tabDerivedKeys.Controls.Add(this.txtClientWriteMacKey);\n            this.tabDerivedKeys.Controls.Add(this.txtMasterSecret);\n            this.tabDerivedKeys.Controls.Add(this.label55);\n            this.tabDerivedKeys.Controls.Add(this.label24);\n            this.tabDerivedKeys.Controls.Add(this.label23);\n            this.tabDerivedKeys.Controls.Add(this.label18);\n            this.tabDerivedKeys.Controls.Add(this.label17);\n            this.tabDerivedKeys.Controls.Add(this.label16);\n            this.tabDerivedKeys.Controls.Add(this.label15);\n            this.tabDerivedKeys.Location = new System.Drawing.Point(4, 22);\n            this.tabDerivedKeys.Name = \"tabDerivedKeys\";\n            this.tabDerivedKeys.Padding = new System.Windows.Forms.Padding(3);\n            this.tabDerivedKeys.Size = new System.Drawing.Size(913, 453);\n            this.tabDerivedKeys.TabIndex = 8;\n            this.tabDerivedKeys.Text = \"Derived Keys\";\n            this.tabDerivedKeys.UseVisualStyleBackColor = true;\n            // \n            // txtServerIV\n            // \n            this.txtServerIV.Location = new System.Drawing.Point(219, 232);\n            this.txtServerIV.Name = \"txtServerIV\";\n            this.txtServerIV.ReadOnly = true;\n            this.txtServerIV.Size = new System.Drawing.Size(688, 20);\n            this.txtServerIV.TabIndex = 21;\n            // \n            // txtClientIV\n            // \n            this.txtClientIV.Location = new System.Drawing.Point(219, 198);\n            this.txtClientIV.Name = \"txtClientIV\";\n            this.txtClientIV.ReadOnly = true;\n            this.txtClientIV.Size = new System.Drawing.Size(688, 20);\n            this.txtClientIV.TabIndex = 20;\n            // \n            // txtServerWriteKey\n            // \n            this.txtServerWriteKey.Location = new System.Drawing.Point(219, 166);\n            this.txtServerWriteKey.Name = \"txtServerWriteKey\";\n            this.txtServerWriteKey.ReadOnly = true;\n            this.txtServerWriteKey.Size = new System.Drawing.Size(688, 20);\n            this.txtServerWriteKey.TabIndex = 19;\n            // \n            // txtClientWriteKey\n            // \n            this.txtClientWriteKey.Location = new System.Drawing.Point(219, 134);\n            this.txtClientWriteKey.Name = \"txtClientWriteKey\";\n            this.txtClientWriteKey.ReadOnly = true;\n            this.txtClientWriteKey.Size = new System.Drawing.Size(688, 20);\n            this.txtClientWriteKey.TabIndex = 18;\n            // \n            // txtServerWriteMacKey\n            // \n            this.txtServerWriteMacKey.Location = new System.Drawing.Point(219, 103);\n            this.txtServerWriteMacKey.Name = \"txtServerWriteMacKey\";\n            this.txtServerWriteMacKey.ReadOnly = true;\n            this.txtServerWriteMacKey.Size = new System.Drawing.Size(688, 20);\n            this.txtServerWriteMacKey.TabIndex = 17;\n            // \n            // txtClientWriteMacKey\n            // \n            this.txtClientWriteMacKey.Location = new System.Drawing.Point(219, 73);\n            this.txtClientWriteMacKey.Name = \"txtClientWriteMacKey\";\n            this.txtClientWriteMacKey.ReadOnly = true;\n            this.txtClientWriteMacKey.Size = new System.Drawing.Size(688, 20);\n            this.txtClientWriteMacKey.TabIndex = 16;\n            // \n            // txtMasterSecret\n            // \n            this.txtMasterSecret.Location = new System.Drawing.Point(219, 17);\n            this.txtMasterSecret.Multiline = true;\n            this.txtMasterSecret.Name = \"txtMasterSecret\";\n            this.txtMasterSecret.ReadOnly = true;\n            this.txtMasterSecret.Size = new System.Drawing.Size(688, 42);\n            this.txtMasterSecret.TabIndex = 15;\n            // \n            // label55\n            // \n            this.label55.AutoSize = true;\n            this.label55.Location = new System.Drawing.Point(139, 17);\n            this.label55.Name = \"label55\";\n            this.label55.Size = new System.Drawing.Size(76, 13);\n            this.label55.TabIndex = 14;\n            this.label55.Text = \"Master Secret:\";\n            // \n            // label24\n            // \n            this.label24.AutoSize = true;\n            this.label24.Location = new System.Drawing.Point(5, 232);\n            this.label24.Name = \"label24\";\n            this.label24.Size = new System.Drawing.Size(213, 13);\n            this.label24.TabIndex = 11;\n            this.label24.Text = \"Server Write Initialization Vector (not used): \";\n            // \n            // label23\n            // \n            this.label23.AutoSize = true;\n            this.label23.Location = new System.Drawing.Point(10, 198);\n            this.label23.Name = \"label23\";\n            this.label23.Size = new System.Drawing.Size(205, 13);\n            this.label23.TabIndex = 10;\n            this.label23.Text = \"Client Write Initialization Vector (not used):\";\n            // \n            // label18\n            // \n            this.label18.AutoSize = true;\n            this.label18.Location = new System.Drawing.Point(125, 166);\n            this.label18.Name = \"label18\";\n            this.label18.Size = new System.Drawing.Size(90, 13);\n            this.label18.TabIndex = 9;\n            this.label18.Text = \"Server Write Key:\";\n            // \n            // label17\n            // \n            this.label17.AutoSize = true;\n            this.label17.Location = new System.Drawing.Point(130, 134);\n            this.label17.Name = \"label17\";\n            this.label17.Size = new System.Drawing.Size(85, 13);\n            this.label17.TabIndex = 8;\n            this.label17.Text = \"Client Write Key:\";\n            // \n            // label16\n            // \n            this.label16.AutoSize = true;\n            this.label16.Location = new System.Drawing.Point(99, 103);\n            this.label16.Name = \"label16\";\n            this.label16.Size = new System.Drawing.Size(116, 13);\n            this.label16.TabIndex = 7;\n            this.label16.Text = \"Server Write MAC Key:\";\n            // \n            // label15\n            // \n            this.label15.AutoSize = true;\n            this.label15.Location = new System.Drawing.Point(104, 73);\n            this.label15.Name = \"label15\";\n            this.label15.Size = new System.Drawing.Size(111, 13);\n            this.label15.TabIndex = 6;\n            this.label15.Text = \"Client Write MAC Key:\";\n            // \n            // tabAppDataInput\n            // \n            this.tabAppDataInput.Controls.Add(this.label13);\n            this.tabAppDataInput.Controls.Add(this.label14);\n            this.tabAppDataInput.Controls.Add(this.txtServerApplicationDataInput);\n            this.tabAppDataInput.Controls.Add(this.txtClientApplicationDataInput);\n            this.tabAppDataInput.Location = new System.Drawing.Point(4, 22);\n            this.tabAppDataInput.Name = \"tabAppDataInput\";\n            this.tabAppDataInput.Padding = new System.Windows.Forms.Padding(3);\n            this.tabAppDataInput.Size = new System.Drawing.Size(913, 453);\n            this.tabAppDataInput.TabIndex = 2;\n            this.tabAppDataInput.Text = \"Application Data Input\";\n            this.tabAppDataInput.UseVisualStyleBackColor = true;\n            // \n            // txtServerApplicationDataInput\n            // \n            this.txtServerApplicationDataInput.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ServerApplicationData\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtServerApplicationDataInput.Location = new System.Drawing.Point(11, 249);\n            this.txtServerApplicationDataInput.Multiline = true;\n            this.txtServerApplicationDataInput.Name = \"txtServerApplicationDataInput\";\n            this.txtServerApplicationDataInput.Size = new System.Drawing.Size(896, 198);\n            this.txtServerApplicationDataInput.TabIndex = 27;\n            this.txtServerApplicationDataInput.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ServerApplicationData;\n            // \n            // txtClientApplicationDataInput\n            // \n            this.txtClientApplicationDataInput.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"ClientApplicationData\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtClientApplicationDataInput.Location = new System.Drawing.Point(11, 35);\n            this.txtClientApplicationDataInput.Multiline = true;\n            this.txtClientApplicationDataInput.Name = \"txtClientApplicationDataInput\";\n            this.txtClientApplicationDataInput.Size = new System.Drawing.Size(896, 195);\n            this.txtClientApplicationDataInput.TabIndex = 25;\n            this.txtClientApplicationDataInput.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.ClientApplicationData;\n            // \n            // tabDecryptedAppData\n            // \n            this.tabDecryptedAppData.Controls.Add(this.groupBox12);\n            this.tabDecryptedAppData.Controls.Add(this.groupBox11);\n            this.tabDecryptedAppData.Location = new System.Drawing.Point(4, 22);\n            this.tabDecryptedAppData.Name = \"tabDecryptedAppData\";\n            this.tabDecryptedAppData.Padding = new System.Windows.Forms.Padding(3);\n            this.tabDecryptedAppData.Size = new System.Drawing.Size(913, 453);\n            this.tabDecryptedAppData.TabIndex = 4;\n            this.tabDecryptedAppData.Text = \"Decrypted Application Data\";\n            this.tabDecryptedAppData.UseVisualStyleBackColor = true;\n            // \n            // groupBox12\n            // \n            this.groupBox12.Controls.Add(this.txtServerApplicationDataHmac);\n            this.groupBox12.Controls.Add(this.txtDecryptedServerApplicationData);\n            this.groupBox12.Controls.Add(this.label21);\n            this.groupBox12.Controls.Add(this.label22);\n            this.groupBox12.Location = new System.Drawing.Point(6, 215);\n            this.groupBox12.Name = \"groupBox12\";\n            this.groupBox12.Size = new System.Drawing.Size(901, 232);\n            this.groupBox12.TabIndex = 10;\n            this.groupBox12.TabStop = false;\n            this.groupBox12.Text = \"Server\";\n            // \n            // txtServerApplicationDataHmac\n            // \n            this.txtServerApplicationDataHmac.Location = new System.Drawing.Point(79, 211);\n            this.txtServerApplicationDataHmac.Name = \"txtServerApplicationDataHmac\";\n            this.txtServerApplicationDataHmac.ReadOnly = true;\n            this.txtServerApplicationDataHmac.Size = new System.Drawing.Size(816, 20);\n            this.txtServerApplicationDataHmac.TabIndex = 9;\n            // \n            // txtDecryptedServerApplicationData\n            // \n            this.txtDecryptedServerApplicationData.Location = new System.Drawing.Point(9, 32);\n            this.txtDecryptedServerApplicationData.Multiline = true;\n            this.txtDecryptedServerApplicationData.Name = \"txtDecryptedServerApplicationData\";\n            this.txtDecryptedServerApplicationData.ReadOnly = true;\n            this.txtDecryptedServerApplicationData.Size = new System.Drawing.Size(886, 170);\n            this.txtDecryptedServerApplicationData.TabIndex = 9;\n            // \n            // label21\n            // \n            this.label21.AutoSize = true;\n            this.label21.Location = new System.Drawing.Point(6, 16);\n            this.label21.Name = \"label21\";\n            this.label21.Size = new System.Drawing.Size(85, 13);\n            this.label21.TabIndex = 7;\n            this.label21.Text = \"Decrypted Data:\";\n            // \n            // label22\n            // \n            this.label22.AutoSize = true;\n            this.label22.Location = new System.Drawing.Point(6, 211);\n            this.label22.Name = \"label22\";\n            this.label22.Size = new System.Drawing.Size(67, 13);\n            this.label22.TabIndex = 8;\n            this.label22.Text = \"HMAC_MD5\";\n            // \n            // groupBox11\n            // \n            this.groupBox11.Controls.Add(this.txtClientApplicationDataHmac);\n            this.groupBox11.Controls.Add(this.txtDecryptedClientApplicationData);\n            this.groupBox11.Controls.Add(this.label19);\n            this.groupBox11.Controls.Add(this.label20);\n            this.groupBox11.Location = new System.Drawing.Point(6, 6);\n            this.groupBox11.Name = \"groupBox11\";\n            this.groupBox11.Size = new System.Drawing.Size(901, 203);\n            this.groupBox11.TabIndex = 9;\n            this.groupBox11.TabStop = false;\n            this.groupBox11.Text = \"Client\";\n            // \n            // txtClientApplicationDataHmac\n            // \n            this.txtClientApplicationDataHmac.Location = new System.Drawing.Point(79, 174);\n            this.txtClientApplicationDataHmac.Name = \"txtClientApplicationDataHmac\";\n            this.txtClientApplicationDataHmac.ReadOnly = true;\n            this.txtClientApplicationDataHmac.Size = new System.Drawing.Size(816, 20);\n            this.txtClientApplicationDataHmac.TabIndex = 8;\n            // \n            // txtDecryptedClientApplicationData\n            // \n            this.txtDecryptedClientApplicationData.Location = new System.Drawing.Point(9, 32);\n            this.txtDecryptedClientApplicationData.Multiline = true;\n            this.txtDecryptedClientApplicationData.Name = \"txtDecryptedClientApplicationData\";\n            this.txtDecryptedClientApplicationData.ReadOnly = true;\n            this.txtDecryptedClientApplicationData.Size = new System.Drawing.Size(886, 136);\n            this.txtDecryptedClientApplicationData.TabIndex = 7;\n            // \n            // label19\n            // \n            this.label19.AutoSize = true;\n            this.label19.Location = new System.Drawing.Point(6, 16);\n            this.label19.Name = \"label19\";\n            this.label19.Size = new System.Drawing.Size(85, 13);\n            this.label19.TabIndex = 5;\n            this.label19.Text = \"Decrypted Data:\";\n            // \n            // label20\n            // \n            this.label20.AutoSize = true;\n            this.label20.Location = new System.Drawing.Point(6, 177);\n            this.label20.Name = \"label20\";\n            this.label20.Size = new System.Drawing.Size(67, 13);\n            this.label20.TabIndex = 6;\n            this.label20.Text = \"HMAC_MD5\";\n            // \n            // tabHmac\n            // \n            this.tabHmac.Controls.Add(this.groupBox5);\n            this.tabHmac.Controls.Add(this.groupBox4);\n            this.tabHmac.Controls.Add(this.label33);\n            this.tabHmac.Location = new System.Drawing.Point(4, 22);\n            this.tabHmac.Name = \"tabHmac\";\n            this.tabHmac.Padding = new System.Windows.Forms.Padding(3);\n            this.tabHmac.Size = new System.Drawing.Size(913, 453);\n            this.tabHmac.TabIndex = 6;\n            this.tabHmac.Text = \"HMAC\";\n            this.tabHmac.UseVisualStyleBackColor = true;\n            // \n            // groupBox5\n            // \n            this.groupBox5.Controls.Add(this.groupBox7);\n            this.groupBox5.Controls.Add(this.txtHmacDataAsciiBytes);\n            this.groupBox5.Controls.Add(this.label37);\n            this.groupBox5.Controls.Add(this.txtHmacKeyAsciiBytes);\n            this.groupBox5.Controls.Add(this.label36);\n            this.groupBox5.Controls.Add(this.groupBox6);\n            this.groupBox5.Location = new System.Drawing.Point(9, 143);\n            this.groupBox5.Name = \"groupBox5\";\n            this.groupBox5.Size = new System.Drawing.Size(898, 304);\n            this.groupBox5.TabIndex = 6;\n            this.groupBox5.TabStop = false;\n            this.groupBox5.Text = \"Output\";\n            // \n            // groupBox7\n            // \n            this.groupBox7.Controls.Add(this.txtHmacSha1Result);\n            this.groupBox7.Controls.Add(this.label44);\n            this.groupBox7.Controls.Add(this.txtHmacSha1InnerHash);\n            this.groupBox7.Controls.Add(this.label45);\n            this.groupBox7.Controls.Add(this.txtHmacSha1KeyXorIpad);\n            this.groupBox7.Controls.Add(this.label46);\n            this.groupBox7.Controls.Add(this.txtHmacSha1IpadBytes);\n            this.groupBox7.Controls.Add(this.label47);\n            this.groupBox7.Controls.Add(this.txtHmacSha1KeyXorOpad);\n            this.groupBox7.Controls.Add(this.label48);\n            this.groupBox7.Controls.Add(this.txtHmacSha1Opad);\n            this.groupBox7.Controls.Add(this.label49);\n            this.groupBox7.Location = new System.Drawing.Point(442, 68);\n            this.groupBox7.Name = \"groupBox7\";\n            this.groupBox7.Size = new System.Drawing.Size(450, 230);\n            this.groupBox7.TabIndex = 12;\n            this.groupBox7.TabStop = false;\n            this.groupBox7.Text = \"SHA-1\";\n            // \n            // txtHmacSha1Result\n            // \n            this.txtHmacSha1Result.Location = new System.Drawing.Point(9, 204);\n            this.txtHmacSha1Result.Name = \"txtHmacSha1Result\";\n            this.txtHmacSha1Result.ReadOnly = true;\n            this.txtHmacSha1Result.Size = new System.Drawing.Size(435, 20);\n            this.txtHmacSha1Result.TabIndex = 11;\n            // \n            // label44\n            // \n            this.label44.AutoSize = true;\n            this.label44.Location = new System.Drawing.Point(6, 179);\n            this.label44.Name = \"label44\";\n            this.label44.Size = new System.Drawing.Size(128, 13);\n            this.label44.TabIndex = 10;\n            this.label44.Text = \"HMAC_SHA1(Key, Data):\";\n            // \n            // txtHmacSha1InnerHash\n            // \n            this.txtHmacSha1InnerHash.Location = new System.Drawing.Point(9, 151);\n            this.txtHmacSha1InnerHash.Name = \"txtHmacSha1InnerHash\";\n            this.txtHmacSha1InnerHash.ReadOnly = true;\n            this.txtHmacSha1InnerHash.Size = new System.Drawing.Size(435, 20);\n            this.txtHmacSha1InnerHash.TabIndex = 9;\n            // \n            // label45\n            // \n            this.label45.AutoSize = true;\n            this.label45.Location = new System.Drawing.Point(6, 131);\n            this.label45.Name = \"label45\";\n            this.label45.Size = new System.Drawing.Size(149, 13);\n            this.label45.TabIndex = 8;\n            this.label45.Text = \"SHA1((Key xor ipad) ++ Data):\";\n            // \n            // txtHmacSha1KeyXorIpad\n            // \n            this.txtHmacSha1KeyXorIpad.Location = new System.Drawing.Point(78, 102);\n            this.txtHmacSha1KeyXorIpad.Name = \"txtHmacSha1KeyXorIpad\";\n            this.txtHmacSha1KeyXorIpad.ReadOnly = true;\n            this.txtHmacSha1KeyXorIpad.Size = new System.Drawing.Size(366, 20);\n            this.txtHmacSha1KeyXorIpad.TabIndex = 7;\n            // \n            // label46\n            // \n            this.label46.AutoSize = true;\n            this.label46.Location = new System.Drawing.Point(6, 105);\n            this.label46.Name = \"label46\";\n            this.label46.Size = new System.Drawing.Size(68, 13);\n            this.label46.TabIndex = 6;\n            this.label46.Text = \"Key xor ipad:\";\n            // \n            // txtHmacSha1IpadBytes\n            // \n            this.txtHmacSha1IpadBytes.Location = new System.Drawing.Point(78, 75);\n            this.txtHmacSha1IpadBytes.Name = \"txtHmacSha1IpadBytes\";\n            this.txtHmacSha1IpadBytes.ReadOnly = true;\n            this.txtHmacSha1IpadBytes.Size = new System.Drawing.Size(366, 20);\n            this.txtHmacSha1IpadBytes.TabIndex = 5;\n            // \n            // label47\n            // \n            this.label47.AutoSize = true;\n            this.label47.Location = new System.Drawing.Point(6, 78);\n            this.label47.Name = \"label47\";\n            this.label47.Size = new System.Drawing.Size(64, 13);\n            this.label47.TabIndex = 4;\n            this.label47.Text = \"ipad (bytes):\";\n            // \n            // txtHmacSha1KeyXorOpad\n            // \n            this.txtHmacSha1KeyXorOpad.Location = new System.Drawing.Point(78, 44);\n            this.txtHmacSha1KeyXorOpad.Name = \"txtHmacSha1KeyXorOpad\";\n            this.txtHmacSha1KeyXorOpad.ReadOnly = true;\n            this.txtHmacSha1KeyXorOpad.Size = new System.Drawing.Size(366, 20);\n            this.txtHmacSha1KeyXorOpad.TabIndex = 3;\n            // \n            // label48\n            // \n            this.label48.AutoSize = true;\n            this.label48.Location = new System.Drawing.Point(2, 47);\n            this.label48.Name = \"label48\";\n            this.label48.Size = new System.Drawing.Size(72, 13);\n            this.label48.TabIndex = 2;\n            this.label48.Text = \"Key xor opad:\";\n            // \n            // txtHmacSha1Opad\n            // \n            this.txtHmacSha1Opad.Location = new System.Drawing.Point(76, 13);\n            this.txtHmacSha1Opad.Name = \"txtHmacSha1Opad\";\n            this.txtHmacSha1Opad.ReadOnly = true;\n            this.txtHmacSha1Opad.Size = new System.Drawing.Size(368, 20);\n            this.txtHmacSha1Opad.TabIndex = 1;\n            // \n            // label49\n            // \n            this.label49.AutoSize = true;\n            this.label49.Location = new System.Drawing.Point(6, 16);\n            this.label49.Name = \"label49\";\n            this.label49.Size = new System.Drawing.Size(68, 13);\n            this.label49.TabIndex = 0;\n            this.label49.Text = \"opad (bytes):\";\n            // \n            // txtHmacDataAsciiBytes\n            // \n            this.txtHmacDataAsciiBytes.Location = new System.Drawing.Point(104, 42);\n            this.txtHmacDataAsciiBytes.Name = \"txtHmacDataAsciiBytes\";\n            this.txtHmacDataAsciiBytes.ReadOnly = true;\n            this.txtHmacDataAsciiBytes.Size = new System.Drawing.Size(788, 20);\n            this.txtHmacDataAsciiBytes.TabIndex = 4;\n            // \n            // label37\n            // \n            this.label37.AutoSize = true;\n            this.label37.Location = new System.Drawing.Point(6, 45);\n            this.label37.Name = \"label37\";\n            this.label37.Size = new System.Drawing.Size(97, 13);\n            this.label37.TabIndex = 3;\n            this.label37.Text = \"Data (ASCII bytes):\";\n            // \n            // txtHmacKeyAsciiBytes\n            // \n            this.txtHmacKeyAsciiBytes.Location = new System.Drawing.Point(104, 13);\n            this.txtHmacKeyAsciiBytes.Name = \"txtHmacKeyAsciiBytes\";\n            this.txtHmacKeyAsciiBytes.ReadOnly = true;\n            this.txtHmacKeyAsciiBytes.Size = new System.Drawing.Size(788, 20);\n            this.txtHmacKeyAsciiBytes.TabIndex = 2;\n            // \n            // label36\n            // \n            this.label36.AutoSize = true;\n            this.label36.Location = new System.Drawing.Point(6, 16);\n            this.label36.Name = \"label36\";\n            this.label36.Size = new System.Drawing.Size(92, 13);\n            this.label36.TabIndex = 1;\n            this.label36.Text = \"Key (ASCII bytes):\";\n            // \n            // groupBox6\n            // \n            this.groupBox6.Controls.Add(this.txtHmacMd5Result);\n            this.groupBox6.Controls.Add(this.label43);\n            this.groupBox6.Controls.Add(this.txtHmacMd5InnerHash);\n            this.groupBox6.Controls.Add(this.label42);\n            this.groupBox6.Controls.Add(this.txtHmacMd5KeyXorIpad);\n            this.groupBox6.Controls.Add(this.label41);\n            this.groupBox6.Controls.Add(this.txtHmacMd5IpadBytes);\n            this.groupBox6.Controls.Add(this.label40);\n            this.groupBox6.Controls.Add(this.txtHmacMd5KeyXorOpad);\n            this.groupBox6.Controls.Add(this.label39);\n            this.groupBox6.Controls.Add(this.txtHmacMd5Opad);\n            this.groupBox6.Controls.Add(this.label38);\n            this.groupBox6.Location = new System.Drawing.Point(9, 68);\n            this.groupBox6.Name = \"groupBox6\";\n            this.groupBox6.Size = new System.Drawing.Size(427, 230);\n            this.groupBox6.TabIndex = 0;\n            this.groupBox6.TabStop = false;\n            this.groupBox6.Text = \"MD5\";\n            // \n            // txtHmacMd5Result\n            // \n            this.txtHmacMd5Result.Location = new System.Drawing.Point(9, 204);\n            this.txtHmacMd5Result.Name = \"txtHmacMd5Result\";\n            this.txtHmacMd5Result.ReadOnly = true;\n            this.txtHmacMd5Result.Size = new System.Drawing.Size(412, 20);\n            this.txtHmacMd5Result.TabIndex = 11;\n            // \n            // label43\n            // \n            this.label43.AutoSize = true;\n            this.label43.Location = new System.Drawing.Point(6, 179);\n            this.label43.Name = \"label43\";\n            this.label43.Size = new System.Drawing.Size(123, 13);\n            this.label43.TabIndex = 10;\n            this.label43.Text = \"HMAC_MD5(Key, Data):\";\n            // \n            // txtHmacMd5InnerHash\n            // \n            this.txtHmacMd5InnerHash.Location = new System.Drawing.Point(9, 151);\n            this.txtHmacMd5InnerHash.Name = \"txtHmacMd5InnerHash\";\n            this.txtHmacMd5InnerHash.ReadOnly = true;\n            this.txtHmacMd5InnerHash.Size = new System.Drawing.Size(412, 20);\n            this.txtHmacMd5InnerHash.TabIndex = 9;\n            // \n            // label42\n            // \n            this.label42.AutoSize = true;\n            this.label42.Location = new System.Drawing.Point(6, 131);\n            this.label42.Name = \"label42\";\n            this.label42.Size = new System.Drawing.Size(144, 13);\n            this.label42.TabIndex = 8;\n            this.label42.Text = \"MD5((Key xor ipad) ++ Data):\";\n            // \n            // txtHmacMd5KeyXorIpad\n            // \n            this.txtHmacMd5KeyXorIpad.Location = new System.Drawing.Point(76, 101);\n            this.txtHmacMd5KeyXorIpad.Name = \"txtHmacMd5KeyXorIpad\";\n            this.txtHmacMd5KeyXorIpad.ReadOnly = true;\n            this.txtHmacMd5KeyXorIpad.Size = new System.Drawing.Size(343, 20);\n            this.txtHmacMd5KeyXorIpad.TabIndex = 7;\n            // \n            // label41\n            // \n            this.label41.AutoSize = true;\n            this.label41.Location = new System.Drawing.Point(6, 105);\n            this.label41.Name = \"label41\";\n            this.label41.Size = new System.Drawing.Size(68, 13);\n            this.label41.TabIndex = 6;\n            this.label41.Text = \"Key xor ipad:\";\n            // \n            // txtHmacMd5IpadBytes\n            // \n            this.txtHmacMd5IpadBytes.Location = new System.Drawing.Point(76, 74);\n            this.txtHmacMd5IpadBytes.Name = \"txtHmacMd5IpadBytes\";\n            this.txtHmacMd5IpadBytes.ReadOnly = true;\n            this.txtHmacMd5IpadBytes.Size = new System.Drawing.Size(343, 20);\n            this.txtHmacMd5IpadBytes.TabIndex = 5;\n            // \n            // label40\n            // \n            this.label40.AutoSize = true;\n            this.label40.Location = new System.Drawing.Point(10, 78);\n            this.label40.Name = \"label40\";\n            this.label40.Size = new System.Drawing.Size(64, 13);\n            this.label40.TabIndex = 4;\n            this.label40.Text = \"ipad (bytes):\";\n            // \n            // txtHmacMd5KeyXorOpad\n            // \n            this.txtHmacMd5KeyXorOpad.Location = new System.Drawing.Point(76, 43);\n            this.txtHmacMd5KeyXorOpad.Name = \"txtHmacMd5KeyXorOpad\";\n            this.txtHmacMd5KeyXorOpad.ReadOnly = true;\n            this.txtHmacMd5KeyXorOpad.Size = new System.Drawing.Size(345, 20);\n            this.txtHmacMd5KeyXorOpad.TabIndex = 3;\n            // \n            // label39\n            // \n            this.label39.AutoSize = true;\n            this.label39.Location = new System.Drawing.Point(2, 47);\n            this.label39.Name = \"label39\";\n            this.label39.Size = new System.Drawing.Size(72, 13);\n            this.label39.TabIndex = 2;\n            this.label39.Text = \"Key xor opad:\";\n            // \n            // txtHmacMd5Opad\n            // \n            this.txtHmacMd5Opad.Location = new System.Drawing.Point(76, 12);\n            this.txtHmacMd5Opad.Name = \"txtHmacMd5Opad\";\n            this.txtHmacMd5Opad.ReadOnly = true;\n            this.txtHmacMd5Opad.Size = new System.Drawing.Size(345, 20);\n            this.txtHmacMd5Opad.TabIndex = 1;\n            // \n            // label38\n            // \n            this.label38.AutoSize = true;\n            this.label38.Location = new System.Drawing.Point(6, 16);\n            this.label38.Name = \"label38\";\n            this.label38.Size = new System.Drawing.Size(68, 13);\n            this.label38.TabIndex = 0;\n            this.label38.Text = \"opad (bytes):\";\n            // \n            // groupBox4\n            // \n            this.groupBox4.Controls.Add(this.btnGenerateHmac);\n            this.groupBox4.Controls.Add(this.label34);\n            this.groupBox4.Controls.Add(this.txtHmacDataString);\n            this.groupBox4.Controls.Add(this.label35);\n            this.groupBox4.Controls.Add(this.txtHmacKeyString);\n            this.groupBox4.Location = new System.Drawing.Point(9, 29);\n            this.groupBox4.Name = \"groupBox4\";\n            this.groupBox4.Size = new System.Drawing.Size(898, 108);\n            this.groupBox4.TabIndex = 5;\n            this.groupBox4.TabStop = false;\n            this.groupBox4.Text = \"Input\";\n            // \n            // btnGenerateHmac\n            // \n            this.btnGenerateHmac.Location = new System.Drawing.Point(721, 79);\n            this.btnGenerateHmac.Name = \"btnGenerateHmac\";\n            this.btnGenerateHmac.Size = new System.Drawing.Size(171, 23);\n            this.btnGenerateHmac.TabIndex = 5;\n            this.btnGenerateHmac.Text = \"&Generate HMACs\";\n            this.btnGenerateHmac.UseVisualStyleBackColor = true;\n            this.btnGenerateHmac.Click += new System.EventHandler(this.btnGenerateHmac_Click);\n            // \n            // label34\n            // \n            this.label34.AutoSize = true;\n            this.label34.Location = new System.Drawing.Point(6, 24);\n            this.label34.Name = \"label34\";\n            this.label34.Size = new System.Drawing.Size(92, 13);\n            this.label34.TabIndex = 1;\n            this.label34.Text = \"Key (ASCII string):\";\n            // \n            // txtHmacDataString\n            // \n            this.txtHmacDataString.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"HmacData\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtHmacDataString.Location = new System.Drawing.Point(104, 48);\n            this.txtHmacDataString.Name = \"txtHmacDataString\";\n            this.txtHmacDataString.Size = new System.Drawing.Size(788, 20);\n            this.txtHmacDataString.TabIndex = 4;\n            this.txtHmacDataString.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.HmacData;\n            // \n            // label35\n            // \n            this.label35.AutoSize = true;\n            this.label35.Location = new System.Drawing.Point(1, 52);\n            this.label35.Name = \"label35\";\n            this.label35.Size = new System.Drawing.Size(97, 13);\n            this.label35.TabIndex = 2;\n            this.label35.Text = \"Data (ASCII string):\";\n            // \n            // txtHmacKeyString\n            // \n            this.txtHmacKeyString.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"HmacKey\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtHmacKeyString.Location = new System.Drawing.Point(104, 20);\n            this.txtHmacKeyString.Name = \"txtHmacKeyString\";\n            this.txtHmacKeyString.Size = new System.Drawing.Size(788, 20);\n            this.txtHmacKeyString.TabIndex = 3;\n            this.txtHmacKeyString.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.HmacKey;\n            // \n            // label33\n            // \n            this.label33.AutoSize = true;\n            this.label33.Location = new System.Drawing.Point(6, 3);\n            this.label33.Name = \"label33\";\n            this.label33.Size = new System.Drawing.Size(422, 13);\n            this.label33.TabIndex = 0;\n            this.label33.Text = \"This tab demonstrates how keyed-Hashed Message Authentication Codes (HMAC) work\";\n            // \n            // tabPrf\n            // \n            this.tabPrf.Controls.Add(this.groupBox3);\n            this.tabPrf.Controls.Add(this.groupBox2);\n            this.tabPrf.Controls.Add(this.label25);\n            this.tabPrf.Location = new System.Drawing.Point(4, 22);\n            this.tabPrf.Name = \"tabPrf\";\n            this.tabPrf.Padding = new System.Windows.Forms.Padding(3);\n            this.tabPrf.Size = new System.Drawing.Size(913, 453);\n            this.tabPrf.TabIndex = 5;\n            this.tabPrf.Text = \"PRF\";\n            this.tabPrf.UseVisualStyleBackColor = true;\n            // \n            // groupBox3\n            // \n            this.groupBox3.Controls.Add(this.label32);\n            this.groupBox3.Controls.Add(this.txtPrfAsciiLabelBytes);\n            this.groupBox3.Controls.Add(this.label31);\n            this.groupBox3.Controls.Add(this.txtPrfMD5Output);\n            this.groupBox3.Controls.Add(this.label30);\n            this.groupBox3.Controls.Add(this.txtPrfOutput);\n            this.groupBox3.Location = new System.Drawing.Point(9, 279);\n            this.groupBox3.Name = \"groupBox3\";\n            this.groupBox3.Size = new System.Drawing.Size(901, 168);\n            this.groupBox3.TabIndex = 9;\n            this.groupBox3.TabStop = false;\n            this.groupBox3.Text = \"Output\";\n            // \n            // label32\n            // \n            this.label32.AutoSize = true;\n            this.label32.Location = new System.Drawing.Point(6, 43);\n            this.label32.Name = \"label32\";\n            this.label32.Size = new System.Drawing.Size(100, 13);\n            this.label32.TabIndex = 5;\n            this.label32.Text = \"PRF Output (bytes):\";\n            // \n            // txtPrfAsciiLabelBytes\n            // \n            this.txtPrfAsciiLabelBytes.Location = new System.Drawing.Point(109, 16);\n            this.txtPrfAsciiLabelBytes.Name = \"txtPrfAsciiLabelBytes\";\n            this.txtPrfAsciiLabelBytes.ReadOnly = true;\n            this.txtPrfAsciiLabelBytes.Size = new System.Drawing.Size(783, 20);\n            this.txtPrfAsciiLabelBytes.TabIndex = 4;\n            // \n            // label31\n            // \n            this.label31.AutoSize = true;\n            this.label31.Location = new System.Drawing.Point(6, 16);\n            this.label31.Name = \"label31\";\n            this.label31.Size = new System.Drawing.Size(97, 13);\n            this.label31.TabIndex = 3;\n            this.label31.Text = \"Label ASCII (bytes)\";\n            // \n            // txtPrfMD5Output\n            // \n            this.txtPrfMD5Output.Location = new System.Drawing.Point(128, 145);\n            this.txtPrfMD5Output.Name = \"txtPrfMD5Output\";\n            this.txtPrfMD5Output.ReadOnly = true;\n            this.txtPrfMD5Output.Size = new System.Drawing.Size(764, 20);\n            this.txtPrfMD5Output.TabIndex = 2;\n            // \n            // label30\n            // \n            this.label30.AutoSize = true;\n            this.label30.Location = new System.Drawing.Point(2, 145);\n            this.label30.Name = \"label30\";\n            this.label30.Size = new System.Drawing.Size(120, 13);\n            this.label30.TabIndex = 1;\n            this.label30.Text = \"PRF Output MD5 Hash:\";\n            // \n            // txtPrfOutput\n            // \n            this.txtPrfOutput.Location = new System.Drawing.Point(5, 59);\n            this.txtPrfOutput.Multiline = true;\n            this.txtPrfOutput.Name = \"txtPrfOutput\";\n            this.txtPrfOutput.ReadOnly = true;\n            this.txtPrfOutput.Size = new System.Drawing.Size(887, 83);\n            this.txtPrfOutput.TabIndex = 0;\n            // \n            // groupBox2\n            // \n            this.groupBox2.Controls.Add(this.txtPrfSeedBytes);\n            this.groupBox2.Controls.Add(this.label29);\n            this.groupBox2.Controls.Add(this.btnPrfGenerate);\n            this.groupBox2.Controls.Add(this.label26);\n            this.groupBox2.Controls.Add(this.nudBytesToGenerate);\n            this.groupBox2.Controls.Add(this.txtPrfSecretBytes);\n            this.groupBox2.Controls.Add(this.label28);\n            this.groupBox2.Controls.Add(this.label27);\n            this.groupBox2.Controls.Add(this.txtPrfLabel);\n            this.groupBox2.Location = new System.Drawing.Point(9, 30);\n            this.groupBox2.Name = \"groupBox2\";\n            this.groupBox2.Size = new System.Drawing.Size(898, 243);\n            this.groupBox2.TabIndex = 8;\n            this.groupBox2.TabStop = false;\n            this.groupBox2.Text = \"Input\";\n            // \n            // txtPrfSeedBytes\n            // \n            this.txtPrfSeedBytes.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"PrfSeedBytes\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtPrfSeedBytes.Location = new System.Drawing.Point(101, 108);\n            this.txtPrfSeedBytes.Multiline = true;\n            this.txtPrfSeedBytes.Name = \"txtPrfSeedBytes\";\n            this.txtPrfSeedBytes.Size = new System.Drawing.Size(791, 59);\n            this.txtPrfSeedBytes.TabIndex = 9;\n            this.txtPrfSeedBytes.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.PrfSeedBytes;\n            // \n            // label29\n            // \n            this.label29.AutoSize = true;\n            this.label29.Location = new System.Drawing.Point(29, 111);\n            this.label29.Name = \"label29\";\n            this.label29.Size = new System.Drawing.Size(66, 13);\n            this.label29.TabIndex = 8;\n            this.label29.Text = \"Seed (bytes)\";\n            // \n            // btnPrfGenerate\n            // \n            this.btnPrfGenerate.Location = new System.Drawing.Point(744, 214);\n            this.btnPrfGenerate.Name = \"btnPrfGenerate\";\n            this.btnPrfGenerate.Size = new System.Drawing.Size(148, 23);\n            this.btnPrfGenerate.TabIndex = 7;\n            this.btnPrfGenerate.Text = \"&Generate PRF Output\";\n            this.btnPrfGenerate.UseVisualStyleBackColor = true;\n            this.btnPrfGenerate.Click += new System.EventHandler(this.btnPrfGenerate_Click);\n            // \n            // label26\n            // \n            this.label26.AutoSize = true;\n            this.label26.Location = new System.Drawing.Point(23, 22);\n            this.label26.Name = \"label26\";\n            this.label26.Size = new System.Drawing.Size(72, 13);\n            this.label26.TabIndex = 1;\n            this.label26.Text = \"Secret (bytes)\";\n            // \n            // nudBytesToGenerate\n            // \n            this.nudBytesToGenerate.DataBindings.Add(new System.Windows.Forms.Binding(\"Value\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"PrfBytesToGenerate\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.nudBytesToGenerate.Location = new System.Drawing.Point(101, 178);\n            this.nudBytesToGenerate.Maximum = new decimal(new int[] {\n            1024,\n            0,\n            0,\n            0});\n            this.nudBytesToGenerate.Name = \"nudBytesToGenerate\";\n            this.nudBytesToGenerate.Size = new System.Drawing.Size(54, 20);\n            this.nudBytesToGenerate.TabIndex = 6;\n            this.nudBytesToGenerate.Value = global::Moserware.TlsAnalyzer.Properties.Settings.Default.PrfBytesToGenerate;\n            // \n            // txtPrfSecretBytes\n            // \n            this.txtPrfSecretBytes.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"PrfSecretBytes\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtPrfSecretBytes.Location = new System.Drawing.Point(101, 18);\n            this.txtPrfSecretBytes.Multiline = true;\n            this.txtPrfSecretBytes.Name = \"txtPrfSecretBytes\";\n            this.txtPrfSecretBytes.Size = new System.Drawing.Size(791, 56);\n            this.txtPrfSecretBytes.TabIndex = 2;\n            this.txtPrfSecretBytes.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.PrfSecretBytes;\n            // \n            // label28\n            // \n            this.label28.AutoSize = true;\n            this.label28.Location = new System.Drawing.Point(10, 180);\n            this.label28.Name = \"label28\";\n            this.label28.Size = new System.Drawing.Size(93, 13);\n            this.label28.TabIndex = 5;\n            this.label28.Text = \"Bytes to generate:\";\n            // \n            // label27\n            // \n            this.label27.AutoSize = true;\n            this.label27.Location = new System.Drawing.Point(2, 85);\n            this.label27.Name = \"label27\";\n            this.label27.Size = new System.Drawing.Size(93, 13);\n            this.label27.TabIndex = 3;\n            this.label27.Text = \"ASCII label (string)\";\n            // \n            // txtPrfLabel\n            // \n            this.txtPrfLabel.DataBindings.Add(new System.Windows.Forms.Binding(\"Text\", global::Moserware.TlsAnalyzer.Properties.Settings.Default, \"PrfLabel\", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));\n            this.txtPrfLabel.Location = new System.Drawing.Point(101, 82);\n            this.txtPrfLabel.Name = \"txtPrfLabel\";\n            this.txtPrfLabel.Size = new System.Drawing.Size(791, 20);\n            this.txtPrfLabel.TabIndex = 4;\n            this.txtPrfLabel.Text = global::Moserware.TlsAnalyzer.Properties.Settings.Default.PrfLabel;\n            // \n            // label25\n            // \n            this.label25.AutoSize = true;\n            this.label25.Location = new System.Drawing.Point(6, 3);\n            this.label25.Name = \"label25\";\n            this.label25.Size = new System.Drawing.Size(357, 13);\n            this.label25.TabIndex = 0;\n            this.label25.Text = \"This tab lets you experiment with TLS 1.0 Pseudo Random Function (PRF)\";\n            // \n            // tableLayoutPanel1\n            // \n            this.tableLayoutPanel1.ColumnCount = 1;\n            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\n            this.tableLayoutPanel1.Controls.Add(this.tabControl, 0, 0);\n            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\n            this.tableLayoutPanel1.Name = \"tableLayoutPanel1\";\n            this.tableLayoutPanel1.RowCount = 1;\n            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\n            this.tableLayoutPanel1.Size = new System.Drawing.Size(927, 485);\n            this.tableLayoutPanel1.TabIndex = 29;\n            // \n            // MainForm\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.ClientSize = new System.Drawing.Size(927, 485);\n            this.Controls.Add(this.tableLayoutPanel1);\n            this.MaximizeBox = false;\n            this.MinimizeBox = false;\n            this.Name = \"MainForm\";\n            this.Text = \"TLS 1.0 Analyzer for \\\"The First Few Milliseconds of an HTTPS Connection\\\" blog pos\" +\n                \"t on moserware.com\";\n            this.tabControl.ResumeLayout(false);\n            this.tabHandshakeMessages.ResumeLayout(false);\n            this.tabHandshakeMessages.PerformLayout();\n            this.groupBox8.ResumeLayout(false);\n            this.groupBox8.PerformLayout();\n            this.groupBox1.ResumeLayout(false);\n            this.groupBox10.ResumeLayout(false);\n            this.groupBox10.PerformLayout();\n            this.groupBox9.ResumeLayout(false);\n            this.groupBox9.PerformLayout();\n            this.tabDebuggingInput.ResumeLayout(false);\n            this.tabDebuggingInput.PerformLayout();\n            this.tabCertificatesInput.ResumeLayout(false);\n            this.groupBox15.ResumeLayout(false);\n            this.groupBox15.PerformLayout();\n            this.groupBox14.ResumeLayout(false);\n            this.groupBox14.PerformLayout();\n            this.groupBox13.ResumeLayout(false);\n            this.groupBox13.PerformLayout();\n            this.tabCertificatesOutput.ResumeLayout(false);\n            this.groupBox18.ResumeLayout(false);\n            this.groupBox18.PerformLayout();\n            this.groupBox17.ResumeLayout(false);\n            this.groupBox17.PerformLayout();\n            this.groupBox16.ResumeLayout(false);\n            this.groupBox16.PerformLayout();\n            this.tabKeyInput.ResumeLayout(false);\n            this.tabKeyInput.PerformLayout();\n            this.tabDerivedKeys.ResumeLayout(false);\n            this.tabDerivedKeys.PerformLayout();\n            this.tabAppDataInput.ResumeLayout(false);\n            this.tabAppDataInput.PerformLayout();\n            this.tabDecryptedAppData.ResumeLayout(false);\n            this.groupBox12.ResumeLayout(false);\n            this.groupBox12.PerformLayout();\n            this.groupBox11.ResumeLayout(false);\n            this.groupBox11.PerformLayout();\n            this.tabHmac.ResumeLayout(false);\n            this.tabHmac.PerformLayout();\n            this.groupBox5.ResumeLayout(false);\n            this.groupBox5.PerformLayout();\n            this.groupBox7.ResumeLayout(false);\n            this.groupBox7.PerformLayout();\n            this.groupBox6.ResumeLayout(false);\n            this.groupBox6.PerformLayout();\n            this.groupBox4.ResumeLayout(false);\n            this.groupBox4.PerformLayout();\n            this.tabPrf.ResumeLayout(false);\n            this.tabPrf.PerformLayout();\n            this.groupBox3.ResumeLayout(false);\n            this.groupBox3.PerformLayout();\n            this.groupBox2.ResumeLayout(false);\n            this.groupBox2.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.nudBytesToGenerate)).EndInit();\n            this.tableLayoutPanel1.ResumeLayout(false);\n            this.ResumeLayout(false);\n\n        }\n\n        #endregion\n\n        private System.Windows.Forms.Label label1;\n        private System.Windows.Forms.Button btnGo;\n        private System.Windows.Forms.Label label2;\n        private System.Windows.Forms.TextBox txtClientHello;\n        private System.Windows.Forms.Label label3;\n        private System.Windows.Forms.TextBox txtServerHello;\n        private System.Windows.Forms.Label label4;\n        private System.Windows.Forms.TextBox txtServerHelloCertificate;\n        private System.Windows.Forms.Label label5;\n        private System.Windows.Forms.TextBox txtServerHelloDone;\n        private System.Windows.Forms.Label label6;\n        private System.Windows.Forms.TextBox txtClientKeyExchange;\n        private System.Windows.Forms.Label label7;\n        private System.Windows.Forms.TextBox textBox1;\n        private System.Windows.Forms.Label label8;\n        private System.Windows.Forms.TextBox txtClientEncryptedFinishedMessage;\n        private System.Windows.Forms.Label label9;\n        private System.Windows.Forms.TextBox txtServerChangeCipherSpec;\n        private System.Windows.Forms.Label label10;\n        private System.Windows.Forms.TextBox txtServerEncryptedHandshakeMessage;\n        private System.Windows.Forms.Label label11;\n        private System.Windows.Forms.TextBox txtPremasterSecret;\n        private System.Windows.Forms.Label label12;\n        private System.Windows.Forms.TextBox txtDecryptedClientKeyExchange;\n        private System.Windows.Forms.Label label13;\n        private System.Windows.Forms.TextBox txtClientApplicationDataInput;\n        private System.Windows.Forms.Label label14;\n        private System.Windows.Forms.TextBox txtServerApplicationDataInput;\n        private System.Windows.Forms.TabControl tabControl;\n        private System.Windows.Forms.TabPage tabHandshakeMessages;\n        private System.Windows.Forms.TabPage tabDebuggingInput;\n        private System.Windows.Forms.TabPage tabAppDataInput;\n        private System.Windows.Forms.TabPage tabKeyInput;\n        private System.Windows.Forms.TabPage tabDecryptedAppData;\n        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\n        private System.Windows.Forms.Label label22;\n        private System.Windows.Forms.Label label21;\n        private System.Windows.Forms.Label label20;\n        private System.Windows.Forms.Label label19;\n        private System.Windows.Forms.GroupBox groupBox1;\n        private System.Windows.Forms.TabPage tabPrf;\n        private System.Windows.Forms.TabPage tabHmac;\n        private System.Windows.Forms.TabPage tabCertificatesInput;\n        private System.Windows.Forms.Label label28;\n        private System.Windows.Forms.TextBox txtPrfLabel;\n        private System.Windows.Forms.Label label27;\n        private System.Windows.Forms.TextBox txtPrfSecretBytes;\n        private System.Windows.Forms.Label label26;\n        private System.Windows.Forms.Label label25;\n        private System.Windows.Forms.NumericUpDown nudBytesToGenerate;\n        private System.Windows.Forms.GroupBox groupBox3;\n        private System.Windows.Forms.TextBox txtPrfOutput;\n        private System.Windows.Forms.GroupBox groupBox2;\n        private System.Windows.Forms.Button btnPrfGenerate;\n        private System.Windows.Forms.TextBox txtPrfSeedBytes;\n        private System.Windows.Forms.Label label29;\n        private System.Windows.Forms.TextBox txtPrfMD5Output;\n        private System.Windows.Forms.Label label30;\n        private System.Windows.Forms.Label label32;\n        private System.Windows.Forms.TextBox txtPrfAsciiLabelBytes;\n        private System.Windows.Forms.Label label31;\n        private System.Windows.Forms.Label label33;\n        private System.Windows.Forms.TextBox txtHmacDataString;\n        private System.Windows.Forms.TextBox txtHmacKeyString;\n        private System.Windows.Forms.Label label35;\n        private System.Windows.Forms.Label label34;\n        private System.Windows.Forms.GroupBox groupBox4;\n        private System.Windows.Forms.Button btnGenerateHmac;\n        private System.Windows.Forms.GroupBox groupBox5;\n        private System.Windows.Forms.TextBox txtHmacDataAsciiBytes;\n        private System.Windows.Forms.Label label37;\n        private System.Windows.Forms.TextBox txtHmacKeyAsciiBytes;\n        private System.Windows.Forms.Label label36;\n        private System.Windows.Forms.GroupBox groupBox6;\n        private System.Windows.Forms.TextBox txtHmacMd5KeyXorOpad;\n        private System.Windows.Forms.Label label39;\n        private System.Windows.Forms.TextBox txtHmacMd5Opad;\n        private System.Windows.Forms.Label label38;\n        private System.Windows.Forms.TextBox txtHmacMd5InnerHash;\n        private System.Windows.Forms.Label label42;\n        private System.Windows.Forms.GroupBox groupBox7;\n        private System.Windows.Forms.TextBox txtHmacSha1Result;\n        private System.Windows.Forms.Label label44;\n        private System.Windows.Forms.TextBox txtHmacSha1InnerHash;\n        private System.Windows.Forms.Label label45;\n        private System.Windows.Forms.TextBox txtHmacSha1KeyXorIpad;\n        private System.Windows.Forms.Label label46;\n        private System.Windows.Forms.TextBox txtHmacSha1IpadBytes;\n        private System.Windows.Forms.Label label47;\n        private System.Windows.Forms.TextBox txtHmacMd5Result;\n        private System.Windows.Forms.Label label43;\n        private System.Windows.Forms.TextBox txtHmacSha1KeyXorOpad;\n        private System.Windows.Forms.Label label48;\n        private System.Windows.Forms.TextBox txtHmacSha1Opad;\n        private System.Windows.Forms.Label label49;\n        private System.Windows.Forms.TextBox txtHmacMd5KeyXorIpad;\n        private System.Windows.Forms.Label label41;\n        private System.Windows.Forms.TextBox txtHmacMd5IpadBytes;\n        private System.Windows.Forms.Label label40;\n        private System.Windows.Forms.GroupBox groupBox8;\n        private System.Windows.Forms.TextBox txtMasterSecretLabel;\n        private System.Windows.Forms.Label label52;\n        private System.Windows.Forms.TextBox txtClientRandomBytes;\n        private System.Windows.Forms.Label label53;\n        private System.Windows.Forms.TextBox txtServerRandomBytes;\n        private System.Windows.Forms.Label label54;\n        private System.Windows.Forms.TextBox txtKeyExpansionLabel;\n        private System.Windows.Forms.Label label56;\n        private System.Windows.Forms.Label label57;\n        private System.Windows.Forms.TextBox txtHandshakeMessages;\n        private System.Windows.Forms.TextBox txtSha1HandshakeMessages;\n        private System.Windows.Forms.TextBox txtMd5HandshakeMessages;\n        private System.Windows.Forms.Label label59;\n        private System.Windows.Forms.Label label58;\n        private System.Windows.Forms.TextBox txtClientFinishedLabel;\n        private System.Windows.Forms.Label label60;\n        private System.Windows.Forms.TextBox txtServerFinishedLabel;\n        private System.Windows.Forms.Label label61;\n        private System.Windows.Forms.TabPage tabDerivedKeys;\n        private System.Windows.Forms.Label label24;\n        private System.Windows.Forms.Label label23;\n        private System.Windows.Forms.Label label18;\n        private System.Windows.Forms.Label label17;\n        private System.Windows.Forms.Label label16;\n        private System.Windows.Forms.Label label15;\n        private System.Windows.Forms.TextBox txtMasterSecret;\n        private System.Windows.Forms.Label label55;\n        private System.Windows.Forms.TextBox txtClientWriteMacKey;\n        private System.Windows.Forms.TextBox txtServerWriteMacKey;\n        private System.Windows.Forms.TextBox txtClientWriteKey;\n        private System.Windows.Forms.TextBox txtServerWriteKey;\n        private System.Windows.Forms.TextBox txtClientIV;\n        private System.Windows.Forms.TextBox txtServerIV;\n        private System.Windows.Forms.GroupBox groupBox9;\n        private System.Windows.Forms.TextBox txtClientFinishedHeader;\n        private System.Windows.Forms.Label label50;\n        private System.Windows.Forms.TextBox txtClientFinishedHmacMd5;\n        private System.Windows.Forms.Label label62;\n        private System.Windows.Forms.Label label51;\n        private System.Windows.Forms.TextBox txtClientFinishedVerifyData;\n        private System.Windows.Forms.GroupBox groupBox10;\n        private System.Windows.Forms.TextBox txtServerFinishedHmacMd5;\n        private System.Windows.Forms.Label label63;\n        private System.Windows.Forms.Label label64;\n        private System.Windows.Forms.TextBox txtServerFinishedVerifyData;\n        private System.Windows.Forms.TextBox txtServerFinishedHeader;\n        private System.Windows.Forms.Label label65;\n        private System.Windows.Forms.GroupBox groupBox12;\n        private System.Windows.Forms.GroupBox groupBox11;\n        private System.Windows.Forms.TextBox txtDecryptedClientApplicationData;\n        private System.Windows.Forms.TextBox txtServerApplicationDataHmac;\n        private System.Windows.Forms.TextBox txtDecryptedServerApplicationData;\n        private System.Windows.Forms.TextBox txtClientApplicationDataHmac;\n        private System.Windows.Forms.TextBox txtAmazonSignedCertificate;\n        private System.Windows.Forms.Label label66;\n        private System.Windows.Forms.GroupBox groupBox13;\n        private System.Windows.Forms.TextBox txtAmazonModulus;\n        private System.Windows.Forms.Label label69;\n        private System.Windows.Forms.Label label68;\n        private System.Windows.Forms.TextBox txtAmazonPublicExponent;\n        private System.Windows.Forms.TextBox txtAmazonSignatureValue;\n        private System.Windows.Forms.Label label67;\n        private System.Windows.Forms.GroupBox groupBox14;\n        private System.Windows.Forms.GroupBox groupBox15;\n        private System.Windows.Forms.Label label76;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityModulus;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthoritySignatureValue;\n        private System.Windows.Forms.Label label78;\n        private System.Windows.Forms.Label label80;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityPublicExponent;\n        private System.Windows.Forms.Label label75;\n        private System.Windows.Forms.TextBox txtVersignClass3SecureServerSignedCertificate;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerModulus;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerSignatureValue;\n        private System.Windows.Forms.Label label72;\n        private System.Windows.Forms.Label label74;\n        private System.Windows.Forms.Label label73;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerPublicExponent;\n        private System.Windows.Forms.TabPage tabCertificatesOutput;\n        private System.Windows.Forms.GroupBox groupBox16;\n        private System.Windows.Forms.TextBox txtAmazonDecryptedSignature;\n        private System.Windows.Forms.Label label81;\n        private System.Windows.Forms.Label label70;\n        private System.Windows.Forms.TextBox txtAmazonModulusBase10;\n        private System.Windows.Forms.GroupBox groupBox18;\n        private System.Windows.Forms.GroupBox groupBox17;\n        private System.Windows.Forms.Button btnCalculateCertificateInformation;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityHashValue;\n        private System.Windows.Forms.Label label87;\n        private System.Windows.Forms.Label label77;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId;\n        private System.Windows.Forms.Label label88;\n        private System.Windows.Forms.TextBox txtVerisignClass3PrimaryCertificationAuthorityModulusBase10;\n        private System.Windows.Forms.Label label86;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerHashValue;\n        private System.Windows.Forms.Label label83;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerHashAlgorithmId;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerModulusBase10;\n        private System.Windows.Forms.Label label71;\n        private System.Windows.Forms.Label label85;\n        private System.Windows.Forms.Label label84;\n        private System.Windows.Forms.TextBox txtVerisignClass3SecureServerDecryptedSignature;\n        private System.Windows.Forms.TextBox txtAmazonHashValue;\n        private System.Windows.Forms.TextBox txtAmazonHashAlgorithmId;\n        private System.Windows.Forms.Label label82;\n        private System.Windows.Forms.Label label79;\n    }\n}"
  },
  {
    "path": "MainForm.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\nusing Mono.Math;\n\nnamespace Moserware.TlsAnalyzer\n{\n    public partial class MainForm : Form\n    {\n        public MainForm()\n        {\n            InitializeComponent();\n        }\n\n        private void btnGo_Click(object sender, EventArgs e)\n        {\n            try\n            {\n                byte[] preMasterSecret = FirefoxSslDebugFileUtilities.GetPremasterSecretKey(txtPremasterSecret.Text);\n                string label = txtMasterSecretLabel.Text;\n\n                byte[] serverHelloRandom = txtServerRandomBytes.Text.FromWireshark();\n                byte[] clientHelloRandom = txtClientRandomBytes.Text.FromWireshark();\n\n                byte[] clientHelloAndServerHello = ByteUtilities.ConcatBytes(clientHelloRandom, serverHelloRandom);\n\n                byte[] masterSecret = Prf10.GenerateBytes(preMasterSecret, label, clientHelloAndServerHello, 48);\n\n                txtMasterSecret.Text = masterSecret.ToDisplayByteString();\n\n                byte[] serverHelloAndClientHello = ByteUtilities.ConcatBytes(serverHelloRandom, clientHelloRandom);\n\n                byte[] keyBlock = Prf10.GenerateBytes(masterSecret, txtKeyExpansionLabel.Text, serverHelloAndClientHello, 96);\n\n                byte[] client_write_MAC_secret = new byte[16];\n                byte[] server_write_MAC_secret = new byte[16];\n                byte[] client_write_key = new byte[16];\n                byte[] server_write_key = new byte[16];\n                byte[] client_write_IV = new byte[16];\n                byte[] server_write_IV = new byte[16];\n\n                Buffer.BlockCopy(keyBlock, 0, client_write_MAC_secret, 0, 16);\n                txtClientWriteMacKey.Text = client_write_MAC_secret.ToDisplayByteString();\n\n                Buffer.BlockCopy(keyBlock, 16, server_write_MAC_secret, 0, 16);\n                txtServerWriteMacKey.Text = server_write_MAC_secret.ToDisplayByteString();\n\n                Buffer.BlockCopy(keyBlock, 32, client_write_key, 0, 16);\n                txtClientWriteKey.Text = client_write_key.ToDisplayByteString();\n\n                Buffer.BlockCopy(keyBlock, 48, server_write_key, 0, 16);\n                txtServerWriteKey.Text = server_write_key.ToDisplayByteString();\n\n                Buffer.BlockCopy(keyBlock, 64, client_write_IV, 0, 16);\n                txtClientIV.Text = client_write_IV.ToDisplayByteString();\n\n                Buffer.BlockCopy(keyBlock, 80, server_write_IV, 0, 16);\n                txtServerIV.Text = server_write_IV.ToDisplayByteString();\n\n                byte[] clientHello = txtClientHello.Text.FromWireshark();\n                byte[] serverHello = txtServerHello.Text.FromWireshark();\n                byte[] certificate = txtServerHelloCertificate.Text.FromWireshark();\n                byte[] serverHelloDone = txtServerHelloDone.Text.FromWireshark();\n                byte[] clientKeyExchangeEncrypted = txtClientKeyExchange.Text.FromWireshark();\n\n                byte[] handshakeMessages = ByteUtilities.ConcatBytes(clientHello, serverHello, certificate, serverHelloDone, clientKeyExchangeEncrypted);\n                txtHandshakeMessages.Text = handshakeMessages.ToDisplayByteString(16);\n\n                var md5Handshake = Hasher.ComputeMD5(handshakeMessages);\n                txtMd5HandshakeMessages.Text = md5Handshake.ToDisplayByteString();\n\n                var sha1Handshake = Hasher.ComputeSHA1Hash(handshakeMessages);\n                txtSha1HandshakeMessages.Text = sha1Handshake.ToDisplayByteString();\n\n                byte[] clientVerifyData = Prf10.GenerateBytes(masterSecret, txtClientFinishedLabel.Text, ByteUtilities.ConcatBytes(md5Handshake, sha1Handshake), 12);\n                txtClientFinishedVerifyData.Text = clientVerifyData.ToDisplayByteString();\n\n                var clientFinishedHeaderBytes = txtClientFinishedHeader.Text.FromWireshark();\n                var clientFinishedHash = Hasher.ComputeTlsMD5Hmac(client_write_MAC_secret, 0x16, 0, ByteUtilities.ConcatBytes(clientFinishedHeaderBytes, clientVerifyData));\n                txtClientFinishedHmacMd5.Text = clientFinishedHash.ToDisplayByteString();\n                var clientFinishedHeaderAndVerify = ByteUtilities.ConcatBytes(clientFinishedHeaderBytes, clientVerifyData);\n                var clientFinishedDecrypted = ByteUtilities.ConcatBytes(clientFinishedHeaderBytes, clientVerifyData, clientFinishedHash);\n                Arc4 clientWriteArc4 = new Arc4(client_write_key);\n                var clientFinishedEncrypted = clientWriteArc4.Encrypt(clientFinishedDecrypted);                \n\n                var expectedClientFinishedEncrypted = txtClientEncryptedFinishedMessage.Text.FromWireshark();\n                Debug.Assert(ByteUtilities.AreEqual(expectedClientFinishedEncrypted, clientFinishedEncrypted));\n\n                byte[] clientApplicationData = txtClientApplicationDataInput.Text.FromWireshark();            \n                byte[] decryptedBytes = clientWriteArc4.Encrypt(clientApplicationData);\n                byte[] plainTextBytes = new byte[decryptedBytes.Length - 16];\n                Buffer.BlockCopy(decryptedBytes, 0, plainTextBytes, 0, plainTextBytes.Length);\n\n                string plainText = ASCIIEncoding.ASCII.GetString(plainTextBytes);\n                txtDecryptedClientApplicationData.Text = plainText;\n\n                byte[] hmacClientBytesReceived = new byte[16];\n                Buffer.BlockCopy(decryptedBytes, plainTextBytes.Length, hmacClientBytesReceived, 0, 16);\n                txtClientApplicationDataHmac.Text = hmacClientBytesReceived.ToDisplayByteString();\n\n                var hmacFirstClientPacket = Hasher.ComputeTlsMD5Hmac(client_write_MAC_secret, 23, 1, plainTextBytes);\n                Debug.Assert(ByteUtilities.AreEqual(hmacFirstClientPacket, hmacClientBytesReceived));\n\n                // get server reply\n                var serverHandshakeMessages = ByteUtilities.ConcatBytes(handshakeMessages, clientFinishedHeaderAndVerify);\n                var serverFinishedHeader = txtServerFinishedHeader.Text.FromWireshark();\n                md5Handshake = Hasher.ComputeMD5(serverHandshakeMessages);\n                sha1Handshake = Hasher.ComputeSHA1Hash(serverHandshakeMessages);\n                var serverVerifyData = Prf10.GenerateBytes(masterSecret, txtServerFinishedLabel.Text, ByteUtilities.ConcatBytes(md5Handshake, sha1Handshake), 12);\n                txtServerFinishedVerifyData.Text = serverVerifyData.ToDisplayByteString();\n                var serverFirstHash = Hasher.ComputeTlsMD5Hmac(server_write_MAC_secret, 0x16, 0, ByteUtilities.ConcatBytes(serverFinishedHeader, serverVerifyData));\n                txtServerFinishedHmacMd5.Text = serverFirstHash.ToDisplayByteString();\n\n                var serverArc4 = new Arc4(server_write_key);\n\n                var serverFinishedMessage = ByteUtilities.ConcatBytes(serverFinishedHeader, serverVerifyData, serverFirstHash);\n                var encryptedServerFinishedMessage = serverArc4.Encrypt(serverFinishedMessage);\n\n                Debug.Assert(ByteUtilities.AreEqual(encryptedServerFinishedMessage, txtServerEncryptedHandshakeMessage.Text.FromWireshark()));\n\n                var serverApplicationDataBytes = txtServerApplicationDataInput.Text.FromWireshark();                \n                var decryptedServerApplicationDataBytes = serverArc4.Encrypt(serverApplicationDataBytes);\n                \n                var serverPlainTextBytes = new byte[decryptedServerApplicationDataBytes.Length - 16];\n                Buffer.BlockCopy(decryptedServerApplicationDataBytes, 0, serverPlainTextBytes, 0, serverPlainTextBytes.Length);\n\n                var hmacServerFirstPacketReceived = new byte[16];\n                Buffer.BlockCopy(decryptedServerApplicationDataBytes, serverPlainTextBytes.Length, hmacServerFirstPacketReceived, 0, 16);\n\n                txtDecryptedServerApplicationData.Text = ASCIIEncoding.ASCII.GetString(serverPlainTextBytes);\n                var hmacServerFirstPacketComputed = Hasher.ComputeTlsMD5Hmac(server_write_MAC_secret, 23, 1, serverPlainTextBytes);                \n                txtServerApplicationDataHmac.Text = hmacServerFirstPacketComputed.ToDisplayByteString();\n\n                Debug.Assert(ByteUtilities.AreEqual(hmacServerFirstPacketComputed, hmacServerFirstPacketComputed));\n            }\n            catch (Exception ex)\n            {\n                MessageBox.Show(\"Error calculating derived handshake info: \" + ex.Message);\n            }\n        }\n\n        private void btnPrfGenerate_Click(object sender, EventArgs e)\n        {\n            try\n            {\n                byte[] secretBytes = txtPrfSecretBytes.Text.FromWireshark();\n                string prfLabel = txtPrfLabel.Text;\n                byte[] seedBytes = txtPrfSeedBytes.Text.FromWireshark();\n                int bytesToGenerate = (int)nudBytesToGenerate.Value;\n\n                txtPrfAsciiLabelBytes.Text = prfLabel.ToAsciiBytes().ToDisplayByteString();\n                byte[] prfBytes = Prf10.GenerateBytes(secretBytes, prfLabel, seedBytes, bytesToGenerate);\n                txtPrfOutput.Text = prfBytes.ToDisplayByteString();\n                txtPrfMD5Output.Text = Hasher.ComputeMD5(prfBytes).ToDisplayByteString();\n            }\n            catch (Exception ex)\n            {\n                MessageBox.Show(\"Error generating PRF: \" + ex.Message);\n            }\n        }        \n\n        private void btnGenerateHmac_Click(object sender, EventArgs e)\n        {\n            try\n            {\n                byte[] keyBytes = txtHmacKeyString.Text.ToAsciiBytes();\n                txtHmacKeyAsciiBytes.Text = keyBytes.ToDisplayByteString();\n\n                byte[] dataBytes = txtHmacDataString.Text.ToAsciiBytes();\n                txtHmacDataAsciiBytes.Text = dataBytes.ToDisplayByteString();\n\n                const int blockSize = 64;\n                Func<byte, byte[]> getPad = padByte => Enumerable.Range(1, blockSize).Select(n=>padByte).ToArray();\n\n                // SHA-1\n                                \n                byte[] sha1Key = keyBytes.Length > blockSize ? Hasher.ComputeSHA1Hash(keyBytes) : keyBytes;\n\n                byte[] sha1Opad = getPad(0x5c);\n                txtHmacSha1Opad.Text = sha1Opad.ToDisplayByteString();\n\n                byte[] sha1KeyXorOpad = sha1Key.Xor(sha1Opad);\n\n                txtHmacSha1KeyXorOpad.Text = sha1KeyXorOpad.ToDisplayByteString();\n\n                byte[] sha1Ipad = getPad(0x36);\n                txtHmacSha1IpadBytes.Text = sha1Ipad.ToDisplayByteString();\n\n                byte[] sha1KeyXorIpad = sha1Key.Xor(sha1Ipad);\n                txtHmacSha1KeyXorIpad.Text = sha1KeyXorIpad.ToDisplayByteString();\n\n                byte[] sha1TotalInnerToHash = ByteUtilities.ConcatBytes(sha1KeyXorIpad, dataBytes);\n                byte[] sha1InnerHash = Hasher.ComputeSHA1Hash(sha1TotalInnerToHash);\n\n                txtHmacSha1InnerHash.Text = sha1InnerHash.ToDisplayByteString();\n\n                byte[] sha1Hmac = Hasher.ComputeSHA1Hash(ByteUtilities.ConcatBytes(sha1KeyXorOpad, sha1InnerHash));\n                byte[] sha1ExpectedHmac = Hasher.ComputeSHA1Hmac(keyBytes, dataBytes);\n                Debug.Assert(ByteUtilities.AreEqual(sha1ExpectedHmac, sha1Hmac));\n\n                txtHmacSha1Result.Text = sha1Hmac.ToDisplayByteString();\n\n\n                // MD5                \n                              \n                byte[] md5Key = keyBytes.Length > blockSize ? Hasher.ComputeMD5(keyBytes) : keyBytes;\n\n                byte[] md5Opad = getPad(0x5c);\n                txtHmacMd5Opad.Text = md5Opad.ToDisplayByteString();\n                \n                byte[] md5KeyXorOpad = md5Key.Xor(md5Opad);\n\n                txtHmacMd5KeyXorOpad.Text = md5KeyXorOpad.ToDisplayByteString();\n\n                byte[] md5Ipad = getPad(0x36);\n                txtHmacMd5IpadBytes.Text = md5Ipad.ToDisplayByteString();\n\n                byte[] md5KeyXorIpad = md5Key.Xor(md5Ipad);\n                txtHmacMd5KeyXorIpad.Text = md5KeyXorIpad.ToDisplayByteString();\n\n                byte[] md5TotalInnerToHash = ByteUtilities.ConcatBytes(md5KeyXorIpad, dataBytes);\n                byte[] md5InnerHash = Hasher.ComputeMD5(md5TotalInnerToHash);\n\n                txtHmacMd5InnerHash.Text = md5InnerHash.ToDisplayByteString();\n\n                byte[] md5Hmac = Hasher.ComputeMD5(ByteUtilities.ConcatBytes(md5KeyXorOpad, md5InnerHash));\n                byte[] md5ExpectedHmac = Hasher.ComputeMD5Hmac(keyBytes, dataBytes);\n                Debug.Assert(ByteUtilities.AreEqual(md5ExpectedHmac, md5Hmac));\n\n                txtHmacMd5Result.Text = md5Hmac.ToDisplayByteString();\n            }\n            catch (Exception ex)\n            {\n                MessageBox.Show(\"Error: \" + ex.Message);\n            }\n        }\n\n        private void btnCalculateCertificateInformation_Click(object sender, EventArgs e)\n        {\n            try\n            {\n                // Get moduli ahead of time since they'll be needed in a chained fashion\n                byte[] amazonModulusBytes = txtAmazonModulus.Text.FromWireshark();\n                BigInteger amazonModulus = new BigInteger(amazonModulusBytes);\n                txtAmazonModulusBase10.Text = amazonModulus.ToDisplayString();\n                byte[] amazonPublicExponentBytes = txtAmazonPublicExponent.Text.FromWireshark();\n\n\n                byte[] verisignClass3SecureServerModulusBytes = txtVerisignClass3SecureServerModulus.Text.FromWireshark();\n                BigInteger verisignClass3SecureServerModulus = new BigInteger(verisignClass3SecureServerModulusBytes);\n                txtVerisignClass3SecureServerModulusBase10.Text = verisignClass3SecureServerModulus.ToDisplayString();\n                byte[] verisignClass3SecureServerPublicExponentBytes = txtVerisignClass3SecureServerPublicExponent.Text.FromWireshark();\n\n                byte[] verisignClass3PrimaryCertificationAuthorityModulusBytes = txtVerisignClass3PrimaryCertificationAuthorityModulus.Text.FromWireshark();\n                BigInteger verisignClass3PrimaryCertificationAuthorityModulus = new BigInteger(verisignClass3PrimaryCertificationAuthorityModulusBytes);\n                txtVerisignClass3PrimaryCertificationAuthorityModulusBase10.Text = verisignClass3PrimaryCertificationAuthorityModulus.ToDisplayString();\n                byte[] verisignClass3PrimaryCertificationAuthorityPublicExponentBytes = txtVerisignClass3PrimaryCertificationAuthorityPublicExponent.Text.FromWireshark();\n\n                byte[] amazonSignedCertificateBytes = txtAmazonSignatureValue.Text.FromWireshark();\n                byte[] amazonDecryptedSignatureBytes = RsaUtilities.GetSignedOriginalValue(amazonSignedCertificateBytes, verisignClass3SecureServerPublicExponentBytes, verisignClass3SecureServerModulusBytes);\n                txtAmazonDecryptedSignature.Text = amazonDecryptedSignatureBytes.ToDisplayByteString(16);\n\n                const int sha1HashSize = 20; // bytes\n                byte[] amazonHashValueBytes = amazonDecryptedSignatureBytes.SubBytes(amazonDecryptedSignatureBytes.Length - sha1HashSize);\n\n                Debug.Assert(ByteUtilities.AreEqual(Hasher.ComputeSHA1Hash(txtAmazonSignedCertificate.Text.FromWireshark()), amazonHashValueBytes));\n                \n                txtAmazonHashValue.Text = amazonHashValueBytes.ToDisplayByteString();\n\n                // For algorithm info, see http://tools.ietf.org/html/rfc3447#page-43\n                const int algorithmIdSize = 15; // bytes\n                byte[] amazonAlgorithmIdBytes = amazonDecryptedSignatureBytes.SubBytes(amazonDecryptedSignatureBytes.Length - sha1HashSize - algorithmIdSize, algorithmIdSize);\n                txtAmazonHashAlgorithmId.Text = amazonAlgorithmIdBytes.ToDisplayByteString();\n                                \n                byte[] verisignClass3SecureServerSignatureValueBytes = txtVerisignClass3SecureServerSignatureValue.Text.FromWireshark();\n                byte[] verisignClass3SecureServerDecryptedSignatureBytes = RsaUtilities.GetSignedOriginalValue(verisignClass3SecureServerSignatureValueBytes, verisignClass3PrimaryCertificationAuthorityPublicExponentBytes, verisignClass3PrimaryCertificationAuthorityModulusBytes);\n                txtVerisignClass3SecureServerDecryptedSignature.Text = verisignClass3SecureServerDecryptedSignatureBytes.ToDisplayByteString(16);\n                byte[] verisignClass3SecureServerHashValueBytes = verisignClass3SecureServerDecryptedSignatureBytes.SubBytes(verisignClass3SecureServerDecryptedSignatureBytes.Length - sha1HashSize);\n\n                Debug.Assert(ByteUtilities.AreEqual(Hasher.ComputeSHA1Hash(txtVersignClass3SecureServerSignedCertificate.Text.FromWireshark()), verisignClass3SecureServerHashValueBytes));\n\n                txtVerisignClass3SecureServerHashValue.Text = verisignClass3SecureServerHashValueBytes.ToDisplayByteString();\n                byte[] verisignClass3SecureServerAlgorithmIdBytes = verisignClass3SecureServerDecryptedSignatureBytes.SubBytes(verisignClass3SecureServerDecryptedSignatureBytes.Length - sha1HashSize - algorithmIdSize, algorithmIdSize);\n                txtVerisignClass3SecureServerHashAlgorithmId.Text = verisignClass3SecureServerAlgorithmIdBytes.ToDisplayByteString();\n\n                byte[] verisignClass3PrimaryCertificationAuthoritySignatureValueBytes = txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Text.FromWireshark();\n                byte[] verisignClass3PrimaryCertificationAuthorityDecryptedSignatureBytes = RsaUtilities.GetSignedOriginalValue(verisignClass3PrimaryCertificationAuthoritySignatureValueBytes, verisignClass3PrimaryCertificationAuthorityPublicExponentBytes, verisignClass3PrimaryCertificationAuthorityModulusBytes);\n                txtVerisignClass3PrimaryCertificationAuthorityDecryptedSignature.Text = verisignClass3PrimaryCertificationAuthorityDecryptedSignatureBytes.ToDisplayByteString(16);\n                \n                const int md2HashSize = 16; // bytes\n                int md2AlgorithmIdSize = algorithmIdSize + 3;\n                byte[] verisignClass3PrimaryCertificationAuthorityHashValueBytes = verisignClass3SecureServerDecryptedSignatureBytes.SubBytes(verisignClass3SecureServerDecryptedSignatureBytes.Length - md2HashSize);\n                txtVerisignClass3PrimaryCertificationAuthorityHashValue.Text = verisignClass3PrimaryCertificationAuthorityHashValueBytes.ToDisplayByteString();\n                byte[] verisignClass3PrimaryCertificationAuthorityAlgorithmIdBytes = verisignClass3PrimaryCertificationAuthorityDecryptedSignatureBytes.SubBytes(verisignClass3PrimaryCertificationAuthorityDecryptedSignatureBytes.Length - md2HashSize - md2AlgorithmIdSize, md2AlgorithmIdSize);\n                txtVerisignClass3PrimaryCertificationAuthorityHashAlgorithmId.Text = verisignClass3PrimaryCertificationAuthorityAlgorithmIdBytes.ToDisplayByteString();\n            }\n            catch (Exception ex)\n            {\n                MessageBox.Show(\"Error: \" + ex.Message);\n            }\n        }\n    }\n}"
  },
  {
    "path": "MainForm.resx",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"txtVerisignClass3PrimaryCertificationAuthorityModulus.Text\" xml:space=\"preserve\">\n    <value>c95c599ef21b8a0114b410df0440dbe357af6a45408f840c0bd133d9d911cfee02581f25f72aa84405aaec031f787f9e93b99a00aa237dd6ac85a26345c77227ccf44cc67571d239ef4f42f075df0a90c68e206f980ff8ac235f702936a4c986e7b19a20cb53a585e73dbe7d9afe244533dc7615ed0fa271644c652e816845a7</value>\n  </data>\n  <data name=\"txtVerisignClass3PrimaryCertificationAuthoritySignatureValue.Text\" xml:space=\"preserve\">\n    <value>bb4c122bcf2c26004f1413dda6fbfc0a11848cf3281c67922f7cb6c5fadff0e895bc1d8f6c2ca851cc73d8a4c053f04ed626c076015781925e21f1d1b1ffe7d02158cd6917e3441c9c194439895cdc9c000f568d0299eda290454ce4bb10a43df032030ef1cef8e8c9518ce6629fe69fc07db7729cc9363a6b9f4ea8ff640d64</value>\n  </data>\n  <data name=\"txtVersignClass3SecureServerSignedCertificate.Text\" xml:space=\"preserve\">\n    <value>30820405a003020102021075337d9ab0e1233bae2d7de4469162d4300d06092a864886f70d0101050500305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479301e170d3035303131393030303030305a170d3135303131383233353935395a3081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c6173732033205365637572652053657276657220434130820122300d06092a864886f70d01010105000382010f003082010a028201010095c321128e40c50d015f765e6694d9732c581922b8c9fc7a39902a77727c1d3ef7d855e3af42cb873002dc5bac70e6b844b42b35eb93d217057ecb46d65c53a032519d746458f90c9a00ea5e44496472f4cd10e2850af934eeb38866a9a5a45ad00e987f580d2b52bb86a97e2efab2487c8ddb2d5f0175a28d063b8bb46107c9be2299f81bd1b55766044d35f4917196b59908259b97c83af320b1dd9e980c4a63b7a6ceb001cef8936af30c6e9fb1e9847b819841e681dc3d2ce7b46be39efc0816d7b3d5b96612997c6d71c84dbec70fe3fb37add57587216b86d044145a547939966956c9b931cd896158e1d9760505adf7b902afa7fd4791a222345a31d10203010001a38201813082017d30120603551d130101ff040830060101ff02010030440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f72706130310603551d1f042a30283026a024a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726c300e0603551d0f0101ff040403020106301106096086480186f842010104040302010630290603551d1104223020a41e301c311a301806035504031311436c617373334341323034382d312d3435301d0603551d0e041604146fecafa0dd8aa4eff52a10672d3f5582bcd7ef253081800603551d2304793077a163a461305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479821070bae41d10d92934b638ca7b03ccbabf</value>\n  </data>\n  <data name=\"txtVerisignClass3SecureServerModulus.Text\" xml:space=\"preserve\">\n    <value>95c321128e40c50d015f765e6694d9732c581922b8c9fc7a39902a77727c1d3ef7d855e3af42cb873002dc5bac70e6b844b42b35eb93d217057ecb46d65c53a032519d746458f90c9a00ea5e44496472f4cd10e2850af934eeb38866a9a5a45ad00e987f580d2b52bb86a97e2efab2487c8ddb2d5f0175a28d063b8bb46107c9be2299f81bd1b55766044d35f4917196b59908259b97c83af320b1dd9e980c4a63b7a6ceb001cef8936af30c6e9fb1e9847b819841e681dc3d2ce7b46be39efc0816d7b3d5b96612997c6d71c84dbec7\n0fe3fb37add57587216b86d044145a547939966956c9b931cd896158e1d9760505adf7b902afa7fd4791a222345a31d1</value>\n  </data>\n  <data name=\"txtVerisignClass3SecureServerSignatureValue.Text\" xml:space=\"preserve\">\n    <value>c37e08465d9136cf67dcd7a7afafb822c38b0474d3b160bce6feb74412815b3173146356c6722ed11a03435c380a504a4dcddab619a8f4990dafe3f7d8f1752865f66afe9bf4bd52d93fcbda16cba59e2e8e6652783d26fafe9436884a955e2a4c19ef6efa823f2d03efd628b33718cf42b234216447d3206b3a4cdce603900c</value>\n  </data>\n  <data name=\"txtAmazonModulus.Text\" xml:space=\"preserve\">\n    <value>c5176d5880046305c91466c7b7f2ed05d6f3f528212f0e829c86dbf35981cd6f5c669aff9e2d93738e795a347501aa7bb90379fc085405827744914d160f2f3ade9a793413eba875e323e5a82ba577b45d0908be25ccd5fd44916971f9a772533d7edffcf7cc84241cc803cd8e5764ea121169c988670e1c28550351a58b2adb</value>\n  </data>\n  <data name=\"txtAmazonSignatureValue.Text\" xml:space=\"preserve\">\n    <value>3feb3eff141d141d684f6d0c571d2c05e0df6161174a949272d043c6d5f20172193abba420fda6f193312c6d8b91ad6a41c993b2f99cf680d3767049d067447c4b43864f91e2c3c2f6f0703f7d3044e77ec83058ce81634773cdcb019301e9189cba318316a793b5f9f5230ff832d2d661f7c05587666cd757052ce5967ec836743aa68b526903d09db325bb8547892d5c924ae3ff3fa9a854d4d84a9b7af7a8cd8237db964c843a876b8385d955d64fcb2aacf40b15e8a06e0491c3bc6892a420d828af09738ff492fc23b9c521d7cff6175fba59cbd0cdd5b9f99876fad5fa98904a2338330336d66906cd196f8b8b173070aef1d14f8c18c38fefc3286673\n</value>\n  </data>\n  <data name=\"txtAmazonSignedCertificate.Text\" xml:space=\"preserve\">\n    <value>308203dba0030201020210169d041c3130be3d566606f2679ba172300d06092a864886f70d01010505003081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c61737320332053656375726520536572766572204341301e170d3038303832373030303030305a170d3039303832373233353935395a3067310b3009060355040613025553311330110603550408130a57617368696e67746f6e3110300e0603550407140753656174746c6531183016060355040a140f416d617a6f6e2e636f6d20496e632e311730150603550403140e7777772e616d617a6f6e2e636f6d30819f300d06092a864886f70d010101050003818d0030818902818100c5176d5880046305c91466c7b7f2ed05d6f3f528212f0e829c86dbf35981cd6f5c669aff9e2d93738e795a347501aa7bb90379fc085405827744914d160f2f3ade9a793413eba875e323e5a82ba577b45d0908be25ccd5fd44916971f9a772533d7edffcf7cc84241cc803cd8e5764ea121169c988670e1c28550351a58b2adb0203010001a38201d3308201cf30090603551d1304023000300b0603551d0f0404030205a030440603551d1f043d303b3039a037a0358633687474703a2f2f5356525365637572652d63726c2e766572697369676e2e636f6d2f535652536563757265323030352e63726c30440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f727061301d0603551d250416301406082b0601050507030106082b06010505070302301f0603551d230418301680146fecafa0dd8aa4eff52a10672d3f5582bcd7ef25307906082b06010505070101046d306b302406082b060105050730018618687474703a2f2f6f6373702e766572697369676e2e636f6d304306082b060105050730028637687474703a2f2f5356525365637572652d6169612e766572697369676e2e636f6d2f535652536563757265323030352d6169612e636572306e06082b0601050507010c04623060a15ea05c305a305830561609696d6167652f6769663021301f300706052b0e03021a04144b6bb92896060cbbd052389b29ac4b078b21051830261624687474703a2f2f6c6f676f2e766572697369676e2e636f6d2f76736c6f676f312e676966</value>\n  </data>\n</root>"
  },
  {
    "path": "Mono/BigInteger.cs",
    "content": "//\n// BigInteger.cs - Big Integer implementation\n//\n// Authors:\n//\tBen Maurer\n//\tChew Keong TAN\n//\tSebastien Pouliot <sebastien@ximian.com>\n//\tPieter Philippaerts <Pieter@mentalis.org>\n//\n// Copyright (c) 2003 Ben Maurer\n// All rights reserved\n//\n// Copyright (c) 2002 Chew Keong TAN\n// All rights reserved.\n//\n// Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nusing System;\nusing System.Security.Cryptography;\nusing Mono.Math.Prime.Generator;\nusing Mono.Math.Prime;\n\nnamespace Mono.Math {\n\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tclass BigInteger {\n\n\t\t#region Data Storage\n\n\t\t/// <summary>\n\t\t/// The Length of this BigInteger\n\t\t/// </summary>\n\t\tuint length = 1;\n\n\t\t/// <summary>\n\t\t/// The data for this BigInteger\n\t\t/// </summary>\n\t\tuint [] data;\n\n\t\t#endregion\n\n\t\t#region Constants\n\n\t\t/// <summary>\n\t\t/// Default length of a BigInteger in bytes\n\t\t/// </summary>\n\t\tconst uint DEFAULT_LEN = 20;\n\n\t\t/// <summary>\n\t\t///\t\tTable of primes below 2000.\n\t\t/// </summary>\n\t\t/// <remarks>\n\t\t///\t\t<para>\n\t\t///\t\tThis table was generated using Mathematica 4.1 using the following function:\n\t\t///\t\t</para>\n\t\t///\t\t<para>\n\t\t///\t\t\t<code>\n\t\t///\t\t\tPrimeTable [x_] := Prime [Range [1, PrimePi [x]]]\n\t\t///\t\t\tPrimeTable [6000]\n\t\t///\t\t\t</code>\n\t\t///\t\t</para>\n\t\t/// </remarks>\n\t\tinternal static readonly uint [] smallPrimes = {\n\t\t\t2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,\n\t\t\t73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,\n\t\t\t157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233,\n\t\t\t239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317,\n\t\t\t331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419,\n\t\t\t421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,\n\t\t\t509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607,\n\t\t\t613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,\n\t\t\t709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811,\n\t\t\t821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911,\n\t\t\t919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997,\n\n\t\t\t1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087,\n\t\t\t1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181,\n\t\t\t1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279,\n\t\t\t1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373,\n\t\t\t1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471,\n\t\t\t1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559,\n\t\t\t1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637,\n\t\t\t1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747,\n\t\t\t1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867,\n\t\t\t1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973,\n\t\t\t1979, 1987, 1993, 1997, 1999, \n\t\t\n\t\t\t2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089,\n\t\t\t2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207,\n\t\t\t2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297,\n\t\t\t2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389,\n\t\t\t2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503,\n\t\t\t2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621,\n\t\t\t2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707,\n\t\t\t2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797,\n\t\t\t2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903,\n\t\t\t2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999,\n\t\t\t\n\t\t\t3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109,\n\t\t\t3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221,\n\t\t\t3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329,\n\t\t\t3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449,\n\t\t\t3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539,\n\t\t\t3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631,\n\t\t\t3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733,\n\t\t\t3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851,\n\t\t\t3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943,\n\t\t\t3947, 3967, 3989,\n\t\t\t\n\t\t\t4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091,\n\t\t\t4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211,\n\t\t\t4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289,\n\t\t\t4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423,\n\t\t\t4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523,\n\t\t\t4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649,\n\t\t\t4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759,\n\t\t\t4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889,\n\t\t\t4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987,\n\t\t\t4993, 4999,\n\t\t\t\n\t\t\t5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101,\n\t\t\t5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, \n\t\t\t5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351,\n\t\t\t5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449,\n\t\t\t5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563,\n\t\t\t5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669,\n\t\t\t5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791,\n\t\t\t5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869,\n\t\t\t5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987\n\t\t};\n\n\t\tpublic enum Sign : int {\n\t\t\tNegative = -1,\n\t\t\tZero = 0,\n\t\t\tPositive = 1\n\t\t};\n\n\t\t#region Exception Messages\n\t\tconst string WouldReturnNegVal = \"Operation would return a negative value\";\n\t\t#endregion\n\n\t\t#endregion\n\n\t\t#region Constructors\n\n\t\tpublic BigInteger ()\n\t\t{\n\t\t\tdata = new uint [DEFAULT_LEN];\n\t\t\tthis.length = DEFAULT_LEN;\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif          \n\t\tpublic BigInteger (Sign sign, uint len) \n\t\t{\n\t\t\tthis.data = new uint [len];\n\t\t\tthis.length = len;\n\t\t}\n\n\t\tpublic BigInteger (BigInteger bi)\n\t\t{\n\t\t\tthis.data = (uint [])bi.data.Clone ();\n\t\t\tthis.length = bi.length;\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif       \n\t\tpublic BigInteger (BigInteger bi, uint len)\n\t\t{\n\n\t\t\tthis.data = new uint [len];\n\n\t\t\tfor (uint i = 0; i < bi.length; i++)\n\t\t\t\tthis.data [i] = bi.data [i];\n\n\t\t\tthis.length = bi.length;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Conversions\n\t\t\n\t\tpublic BigInteger (byte [] inData)\n\t\t{\n\t\t\tlength = (uint)inData.Length >> 2;\n\t\t\tint leftOver = inData.Length & 0x3;\n\n\t\t\t// length not multiples of 4\n\t\t\tif (leftOver != 0) length++;\n\n\t\t\tdata = new uint [length];\n\n\t\t\tfor (int i = inData.Length - 1, j = 0; i >= 3; i -= 4, j++) {\n\t\t\t\tdata [j] = (uint)(\n\t\t\t\t\t(inData [i-3] << (3*8)) |\n\t\t\t\t\t(inData [i-2] << (2*8)) |\n\t\t\t\t\t(inData [i-1] << (1*8)) |\n\t\t\t\t\t(inData [i])\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tswitch (leftOver) {\n\t\t\tcase 1: data [length-1] = (uint)inData [0]; break;\n\t\t\tcase 2: data [length-1] = (uint)((inData [0] << 8) | inData [1]); break;\n\t\t\tcase 3: data [length-1] = (uint)((inData [0] << 16) | (inData [1] << 8) | inData [2]); break;\n\t\t\t}\n\n\t\t\tthis.Normalize ();\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic BigInteger (uint [] inData)\n\t\t{\n\t\t\tlength = (uint)inData.Length;\n\n\t\t\tdata = new uint [length];\n\n\t\t\tfor (int i = (int)length - 1, j = 0; i >= 0; i--, j++)\n\t\t\t\tdata [j] = inData [i];\n\n\t\t\tthis.Normalize ();\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic BigInteger (uint ui)\n\t\t{\n\t\t\tdata = new uint [] {ui};\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic BigInteger (ulong ul)\n\t\t{\n\t\t\tdata = new uint [2] { (uint)ul, (uint)(ul >> 32)};\n\t\t\tlength = 2;\n\n\t\t\tthis.Normalize ();\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static implicit operator BigInteger (uint value)\n\t\t{\n\t\t\treturn (new BigInteger (value));\n\t\t}\n\n\t\tpublic static implicit operator BigInteger (int value)\n\t\t{\n\t\t\tif (value < 0) throw new ArgumentOutOfRangeException (\"value\");\n\t\t\treturn (new BigInteger ((uint)value));\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static implicit operator BigInteger (ulong value)\n\t\t{\n\t\t\treturn (new BigInteger (value));\n\t\t}\n\n\t\t/* This is the BigInteger.Parse method I use. This method works\n\t\tbecause BigInteger.ToString returns the input I gave to Parse. */\n\t\tpublic static BigInteger Parse (string number) \n\t\t{\n\t\t\tif (number == null)\n\t\t\t\tthrow new ArgumentNullException (\"number\");\n\n\t\t\tint i = 0, len = number.Length;\n\t\t\tchar c;\n\t\t\tbool digits_seen = false;\n\t\t\tBigInteger val = new BigInteger (0);\n\t\t\tif (number [i] == '+') {\n\t\t\t\ti++;\n\t\t\t} \n\t\t\telse if (number [i] == '-') {\n\t\t\t\tthrow new FormatException (WouldReturnNegVal);\n\t\t\t}\n\n\t\t\tfor (; i < len; i++) {\n\t\t\t\tc = number [i];\n\t\t\t\tif (c == '\\0') {\n\t\t\t\t\ti = len;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (c >= '0' && c <= '9') {\n\t\t\t\t\tval = val * 10 + (c - '0');\n\t\t\t\t\tdigits_seen = true;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tif (Char.IsWhiteSpace (c)) {\n\t\t\t\t\t\tfor (i++; i < len; i++) {\n\t\t\t\t\t\t\tif (!Char.IsWhiteSpace (number [i]))\n\t\t\t\t\t\t\t\tthrow new FormatException ();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new FormatException ();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!digits_seen)\n\t\t\t\tthrow new FormatException ();\n\t\t\treturn val;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Operators\n\n\t\tpublic static BigInteger operator + (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\tif (bi1 == 0)\n\t\t\t\treturn new BigInteger (bi2);\n\t\t\telse if (bi2 == 0)\n\t\t\t\treturn new BigInteger (bi1);\n\t\t\telse\n\t\t\t\treturn Kernel.AddSameSign (bi1, bi2);\n\t\t}\n\n\t\tpublic static BigInteger operator - (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\tif (bi2 == 0)\n\t\t\t\treturn new BigInteger (bi1);\n\n\t\t\tif (bi1 == 0)\n\t\t\t\tthrow new ArithmeticException (WouldReturnNegVal);\n\n\t\t\tswitch (Kernel.Compare (bi1, bi2)) {\n\n\t\t\t\tcase Sign.Zero:\n\t\t\t\t\treturn 0;\n\n\t\t\t\tcase Sign.Positive:\n\t\t\t\t\treturn Kernel.Subtract (bi1, bi2);\n\n\t\t\t\tcase Sign.Negative:\n\t\t\t\t\tthrow new ArithmeticException (WouldReturnNegVal);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception ();\n\t\t\t}\n\t\t}\n\n\t\tpublic static int operator % (BigInteger bi, int i)\n\t\t{\n\t\t\tif (i > 0)\n\t\t\t\treturn (int)Kernel.DwordMod (bi, (uint)i);\n\t\t\telse\n\t\t\t\treturn -(int)Kernel.DwordMod (bi, (uint)-i);\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static uint operator % (BigInteger bi, uint ui)\n\t\t{\n\t\t\treturn Kernel.DwordMod (bi, (uint)ui);\n\t\t}\n\n\t\tpublic static BigInteger operator % (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.multiByteDivide (bi1, bi2)[1];\n\t\t}\n\n\t\tpublic static BigInteger operator / (BigInteger bi, int i)\n\t\t{\n\t\t\tif (i > 0)\n\t\t\t\treturn Kernel.DwordDiv (bi, (uint)i);\n\n\t\t\tthrow new ArithmeticException (WouldReturnNegVal);\n\t\t}\n\n\t\tpublic static BigInteger operator / (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.multiByteDivide (bi1, bi2)[0];\n\t\t}\n\n\t\tpublic static BigInteger operator * (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\tif (bi1 == 0 || bi2 == 0) return 0;\n\n\t\t\t//\n\t\t\t// Validate pointers\n\t\t\t//\n\t\t\tif (bi1.data.Length < bi1.length) throw new IndexOutOfRangeException (\"bi1 out of range\");\n\t\t\tif (bi2.data.Length < bi2.length) throw new IndexOutOfRangeException (\"bi2 out of range\");\n\n\t\t\tBigInteger ret = new BigInteger (Sign.Positive, bi1.length + bi2.length);\n\n\t\t\tKernel.Multiply (bi1.data, 0, bi1.length, bi2.data, 0, bi2.length, ret.data, 0);\n\n\t\t\tret.Normalize ();\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic static BigInteger operator * (BigInteger bi, int i)\n\t\t{\n\t\t\tif (i < 0) throw new ArithmeticException (WouldReturnNegVal);\n\t\t\tif (i == 0) return 0;\n\t\t\tif (i == 1) return new BigInteger (bi);\n\n\t\t\treturn Kernel.MultiplyByDword (bi, (uint)i);\n\t\t}\n\n\t\tpublic static BigInteger operator << (BigInteger bi1, int shiftVal)\n\t\t{\n\t\t\treturn Kernel.LeftShift (bi1, shiftVal);\n\t\t}\n\n\t\tpublic static BigInteger operator >> (BigInteger bi1, int shiftVal)\n\t\t{\n\t\t\treturn Kernel.RightShift (bi1, shiftVal);\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Friendly names for operators\n\n\t\t// with names suggested by FxCop 1.30\n\n\t\tpublic static BigInteger Add (BigInteger bi1, BigInteger bi2) \n\t\t{\n\t\t\treturn (bi1 + bi2);\n\t\t}\n\n\t\tpublic static BigInteger Subtract (BigInteger bi1, BigInteger bi2) \n\t\t{\n\t\t\treturn (bi1 - bi2);\n\t\t}\n\n\t\tpublic static int Modulus (BigInteger bi, int i) \n\t\t{\n\t\t\treturn (bi % i);\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static uint Modulus (BigInteger bi, uint ui) \n\t\t{\n\t\t\treturn (bi % ui);\n\t\t}\n\n\t\tpublic static BigInteger Modulus (BigInteger bi1, BigInteger bi2) \n\t\t{\n\t\t\treturn (bi1 % bi2);\n\t\t}\n\n\t\tpublic static BigInteger Divid (BigInteger bi, int i) \n\t\t{\n\t\t\treturn (bi / i);\n\t\t}\n\n\t\tpublic static BigInteger Divid (BigInteger bi1, BigInteger bi2) \n\t\t{\n\t\t\treturn (bi1 / bi2);\n\t\t}\n\n\t\tpublic static BigInteger Multiply (BigInteger bi1, BigInteger bi2) \n\t\t{\n\t\t\treturn (bi1 * bi2);\n\t\t}\n\n\t\tpublic static BigInteger Multiply (BigInteger bi, int i) \n\t\t{\n\t\t\treturn (bi * i);\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Random\n\t\tprivate static RandomNumberGenerator rng;\n\t\tprivate static RandomNumberGenerator Rng {\n\t\t\tget {\n\t\t\t\tif (rng == null)\n\t\t\t\t\trng = RandomNumberGenerator.Create ();\n\t\t\t\treturn rng;\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Generates a new, random BigInteger of the specified length.\n\t\t/// </summary>\n\t\t/// <param name=\"bits\">The number of bits for the new number.</param>\n\t\t/// <param name=\"rng\">A random number generator to use to obtain the bits.</param>\n\t\t/// <returns>A random number of the specified length.</returns>\n\t\tpublic static BigInteger GenerateRandom (int bits, RandomNumberGenerator rng)\n\t\t{\n\t\t\tint dwords = bits >> 5;\n\t\t\tint remBits = bits & 0x1F;\n\n\t\t\tif (remBits != 0)\n\t\t\t\tdwords++;\n\n\t\t\tBigInteger ret = new BigInteger (Sign.Positive, (uint)dwords + 1);\n\t\t\tbyte [] random = new byte [dwords << 2];\n\n\t\t\trng.GetBytes (random);\n\t\t\tBuffer.BlockCopy (random, 0, ret.data, 0, (int)dwords << 2);\n\n\t\t\tif (remBits != 0) {\n\t\t\t\tuint mask = (uint)(0x01 << (remBits-1));\n\t\t\t\tret.data [dwords-1] |= mask;\n\n\t\t\t\tmask = (uint)(0xFFFFFFFF >> (32 - remBits));\n\t\t\t\tret.data [dwords-1] &= mask;\n\t\t\t}\n\t\t\telse\n\t\t\t\tret.data [dwords-1] |= 0x80000000;\n\n\t\t\tret.Normalize ();\n\t\t\treturn ret;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.\n\t\t/// </summary>\n\t\t/// <param name=\"bits\">The number of bits for the new number.</param>\n\t\t/// <returns>A random number of the specified length.</returns>\n\t\tpublic static BigInteger GenerateRandom (int bits)\n\t\t{\n\t\t\treturn GenerateRandom (bits, Rng);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Randomizes the bits in \"this\" from the specified RNG.\n\t\t/// </summary>\n\t\t/// <param name=\"rng\">A RNG.</param>\n\t\tpublic void Randomize (RandomNumberGenerator rng)\n\t\t{\n\t\t\tif (this == 0)\n\t\t\t\treturn;\n\n\t\t\tint bits = this.BitCount ();\n\t\t\tint dwords = bits >> 5;\n\t\t\tint remBits = bits & 0x1F;\n\n\t\t\tif (remBits != 0)\n\t\t\t\tdwords++;\n\n\t\t\tbyte [] random = new byte [dwords << 2];\n\n\t\t\trng.GetBytes (random);\n\t\t\tBuffer.BlockCopy (random, 0, data, 0, (int)dwords << 2);\n\n\t\t\tif (remBits != 0) {\n\t\t\t\tuint mask = (uint)(0x01 << (remBits-1));\n\t\t\t\tdata [dwords-1] |= mask;\n\n\t\t\t\tmask = (uint)(0xFFFFFFFF >> (32 - remBits));\n\t\t\t\tdata [dwords-1] &= mask;\n\t\t\t}\n\n\t\t\telse\n\t\t\t\tdata [dwords-1] |= 0x80000000;\n\n\t\t\tNormalize ();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Randomizes the bits in \"this\" from the default RNG.\n\t\t/// </summary>\n\t\tpublic void Randomize ()\n\t\t{\n\t\t\tRandomize (Rng);\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Bitwise\n\n\t\tpublic int BitCount ()\n\t\t{\n\t\t\tthis.Normalize ();\n\n\t\t\tuint value = data [length - 1];\n\t\t\tuint mask = 0x80000000;\n\t\t\tuint bits = 32;\n\n\t\t\twhile (bits > 0 && (value & mask) == 0) {\n\t\t\t\tbits--;\n\t\t\t\tmask >>= 1;\n\t\t\t}\n\t\t\tbits += ((length - 1) << 5);\n\n\t\t\treturn (int)bits;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Tests if the specified bit is 1.\n\t\t/// </summary>\n\t\t/// <param name=\"bitNum\">The bit to test. The least significant bit is 0.</param>\n\t\t/// <returns>True if bitNum is set to 1, else false.</returns>\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic bool TestBit (uint bitNum)\n\t\t{\n\t\t\tuint bytePos = bitNum >> 5;             // divide by 32\n\t\t\tbyte bitPos = (byte)(bitNum & 0x1F);    // get the lowest 5 bits\n\n\t\t\tuint mask = (uint)1 << bitPos;\n\t\t\treturn ((this.data [bytePos] & mask) != 0);\n\t\t}\n\n\t\tpublic bool TestBit (int bitNum)\n\t\t{\n\t\t\tif (bitNum < 0) throw new IndexOutOfRangeException (\"bitNum out of range\");\n\n\t\t\tuint bytePos = (uint)bitNum >> 5;             // divide by 32\n\t\t\tbyte bitPos = (byte)(bitNum & 0x1F);    // get the lowest 5 bits\n\n\t\t\tuint mask = (uint)1 << bitPos;\n\t\t\treturn ((this.data [bytePos] | mask) == this.data [bytePos]);\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic void SetBit (uint bitNum)\n\t\t{\n\t\t\tSetBit (bitNum, true);\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic void ClearBit (uint bitNum)\n\t\t{\n\t\t\tSetBit (bitNum, false);\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic void SetBit (uint bitNum, bool value)\n\t\t{\n\t\t\tuint bytePos = bitNum >> 5;             // divide by 32\n\n\t\t\tif (bytePos < this.length) {\n\t\t\t\tuint mask = (uint)1 << (int)(bitNum & 0x1F);\n\t\t\t\tif (value)\n\t\t\t\t\tthis.data [bytePos] |= mask;\n\t\t\t\telse\n\t\t\t\t\tthis.data [bytePos] &= ~mask;\n\t\t\t}\n\t\t}\n\n\t\tpublic int LowestSetBit ()\n\t\t{\n\t\t\tif (this == 0) return -1;\n\t\t\tint i = 0;\n\t\t\twhile (!TestBit (i)) i++;\n\t\t\treturn i;\n\t\t}\n\n\t\tpublic byte[] GetBytes ()\n\t\t{\n\t\t\tif (this == 0) return new byte [1];\n\n\t\t\tint numBits = BitCount ();\n\t\t\tint numBytes = numBits >> 3;\n\t\t\tif ((numBits & 0x7) != 0)\n\t\t\t\tnumBytes++;\n\n\t\t\tbyte [] result = new byte [numBytes];\n\n\t\t\tint numBytesInWord = numBytes & 0x3;\n\t\t\tif (numBytesInWord == 0) numBytesInWord = 4;\n\n\t\t\tint pos = 0;\n\t\t\tfor (int i = (int)length - 1; i >= 0; i--) {\n\t\t\t\tuint val = data [i];\n\t\t\t\tfor (int j = numBytesInWord - 1; j >= 0; j--) {\n\t\t\t\t\tresult [pos+j] = (byte)(val & 0xFF);\n\t\t\t\t\tval >>= 8;\n\t\t\t\t}\n\t\t\t\tpos += numBytesInWord;\n\t\t\t\tnumBytesInWord = 4;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Compare\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static bool operator == (BigInteger bi1, uint ui)\n\t\t{\n\t\t\tif (bi1.length != 1) bi1.Normalize ();\n\t\t\treturn bi1.length == 1 && bi1.data [0] == ui;\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic static bool operator != (BigInteger bi1, uint ui)\n\t\t{\n\t\t\tif (bi1.length != 1) bi1.Normalize ();\n\t\t\treturn !(bi1.length == 1 && bi1.data [0] == ui);\n\t\t}\n\n\t\tpublic static bool operator == (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\t// we need to compare with null\n\t\t\tif ((bi1 as object) == (bi2 as object))\n\t\t\t\treturn true;\n\t\t\tif (null == bi1 || null == bi2)\n\t\t\t\treturn false;\n\t\t\treturn Kernel.Compare (bi1, bi2) == 0;\n\t\t}\n\n\t\tpublic static bool operator != (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\t// we need to compare with null\n\t\t\tif ((bi1 as object) == (bi2 as object))\n\t\t\t\treturn false;\n\t\t\tif (null == bi1 || null == bi2)\n\t\t\t\treturn true;\n\t\t\treturn Kernel.Compare (bi1, bi2) != 0;\n\t\t}\n\n\t\tpublic static bool operator > (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.Compare (bi1, bi2) > 0;\n\t\t}\n\n\t\tpublic static bool operator < (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.Compare (bi1, bi2) < 0;\n\t\t}\n\n\t\tpublic static bool operator >= (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.Compare (bi1, bi2) >= 0;\n\t\t}\n\n\t\tpublic static bool operator <= (BigInteger bi1, BigInteger bi2)\n\t\t{\n\t\t\treturn Kernel.Compare (bi1, bi2) <= 0;\n\t\t}\n\n\t\tpublic Sign Compare (BigInteger bi)\n\t\t{\n\t\t\treturn Kernel.Compare (this, bi);\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Formatting\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic string ToString (uint radix)\n\t\t{\n\t\t\treturn ToString (radix, \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n\t\t}\n\n#if !INSIDE_CORLIB\n\t\t[CLSCompliant (false)]\n#endif \n\t\tpublic string ToString (uint radix, string characterSet)\n\t\t{\n\t\t\tif (characterSet.Length < radix)\n\t\t\t\tthrow new ArgumentException (\"charSet length less than radix\", \"characterSet\");\n\t\t\tif (radix == 1)\n\t\t\t\tthrow new ArgumentException (\"There is no such thing as radix one notation\", \"radix\");\n\n\t\t\tif (this == 0) return \"0\";\n\t\t\tif (this == 1) return \"1\";\n\n\t\t\tstring result = \"\";\n\n\t\t\tBigInteger a = new BigInteger (this);\n\n\t\t\twhile (a != 0) {\n\t\t\t\tuint rem = Kernel.SingleByteDivideInPlace (a, radix);\n\t\t\t\tresult = characterSet [(int) rem] + result;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Misc\n\n\t\t/// <summary>\n\t\t///     Normalizes this by setting the length to the actual number of\n\t\t///     uints used in data and by setting the sign to Sign.Zero if the\n\t\t///     value of this is 0.\n\t\t/// </summary>\n\t\tprivate void Normalize ()\n\t\t{\n\t\t\t// Normalize length\n\t\t\twhile (length > 0 && data [length-1] == 0) length--;\n\n\t\t\t// Check for zero\n\t\t\tif (length == 0)\n\t\t\t\tlength++;\n\t\t}\n\n\t\tpublic void Clear () \n\t\t{\n\t\t\tfor (int i=0; i < length; i++)\n\t\t\t\tdata [i] = 0x00;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Object Impl\n\n\t\tpublic override int GetHashCode ()\n\t\t{\n\t\t\tuint val = 0;\n\n\t\t\tfor (uint i = 0; i < this.length; i++)\n\t\t\t\tval ^= this.data [i];\n\n\t\t\treturn (int)val;\n\t\t}\n\n\t\tpublic override string ToString ()\n\t\t{\n\t\t\treturn ToString (10);\n\t\t}\n\n\t\tpublic override bool Equals (object o)\n\t\t{\n\t\t\tif (o == null)\n\t\t\t\treturn false;\n\t\t\tif (o is int)\n\t\t\t\treturn (int)o >= 0 && this == (uint)o;\n\n\t\t\tBigInteger bi = o as BigInteger;\n\t\t\tif (bi == null)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\treturn Kernel.Compare (this, bi) == 0;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Number Theory\n\n\t\tpublic BigInteger GCD (BigInteger bi)\n\t\t{\n\t\t\treturn Kernel.gcd (this, bi);\n\t\t}\n\n\t\tpublic BigInteger ModInverse (BigInteger modulus)\n\t\t{\n\t\t\treturn Kernel.modInverse (this, modulus);\n\t\t}\n\n\t\tpublic BigInteger ModPow (BigInteger exp, BigInteger n)\n\t\t{\n\t\t\tModulusRing mr = new ModulusRing (n);\n\t\t\treturn mr.Pow (this, exp);\n\t\t}\n\t\t\n\t\t#endregion\n\n\t\t#region Prime Testing\n\n\t\tpublic bool IsProbablePrime ()\n\t\t{\n\t\t\t// can we use our small-prime table ?\n\t\t\tif (this <= smallPrimes[smallPrimes.Length - 1]) {\n\t\t\t\tfor (int p = 0; p < smallPrimes.Length; p++) {\n\t\t\t\t\tif (this == smallPrimes[p])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// the list is complete, so it's not a prime\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// otherwise check if we can divide by one of the small primes\n\t\t\tfor (int p = 0; p < smallPrimes.Length; p++) {\n\t\t\t\tif (this % smallPrimes[p] == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// the last step is to confirm the \"large\" prime with the SPP or Miller-Rabin test\n\t\t\treturn PrimalityTests.Test (this, Prime.ConfidenceFactor.Medium);\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Prime Number Generation\n\n\t\t/// <summary>\n\t\t/// Generates the smallest prime >= bi\n\t\t/// </summary>\n\t\t/// <param name=\"bi\">A BigInteger</param>\n\t\t/// <returns>The smallest prime >= bi. More mathematically, if bi is prime: bi, else Prime [PrimePi [bi] + 1].</returns>\n\t\tpublic static BigInteger NextHighestPrime (BigInteger bi)\n\t\t{\n\t\t\tNextPrimeFinder npf = new NextPrimeFinder ();\n\t\t\treturn npf.GenerateNewPrime (0, bi);\n\t\t}\n\n\t\tpublic static BigInteger GeneratePseudoPrime (int bits)\n\t\t{\n\t\t\tSequentialSearchPrimeGeneratorBase sspg = new SequentialSearchPrimeGeneratorBase ();\n\t\t\treturn sspg.GenerateNewPrime (bits);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Increments this by two\n\t\t/// </summary>\n\t\tpublic void Incr2 ()\n\t\t{\n\t\t\tint i = 0;\n\n\t\t\tdata [0] += 2;\n\n\t\t\t// If there was no carry, nothing to do\n\t\t\tif (data [0] < 2) {\n\n\t\t\t\t// Account for the first carry\n\t\t\t\tdata [++i]++;\n\n\t\t\t\t// Keep adding until no carry\n\t\t\t\twhile (data [i++] == 0x0)\n\t\t\t\t\tdata [i]++;\n\n\t\t\t\t// See if we increased the data length\n\t\t\t\tif (length == (uint)i)\n\t\t\t\t\tlength++;\n\t\t\t}\n\t\t}\n\n\t\t#endregion\n\n#if INSIDE_CORLIB\n\t\tinternal\n#else\n\t\tpublic\n#endif\n\t\tsealed class ModulusRing {\n\n\t\t\tBigInteger mod, constant;\n\n\t\t\tpublic ModulusRing (BigInteger modulus)\n\t\t\t{\n\t\t\t\tthis.mod = modulus;\n\n\t\t\t\t// calculate constant = b^ (2k) / m\n\t\t\t\tuint i = mod.length << 1;\n\n\t\t\t\tconstant = new BigInteger (Sign.Positive, i + 1);\n\t\t\t\tconstant.data [i] = 0x00000001;\n\n\t\t\t\tconstant = constant / mod;\n\t\t\t}\n\n\t\t\tpublic void BarrettReduction (BigInteger x)\n\t\t\t{\n\t\t\t\tBigInteger n = mod;\n\t\t\t\tuint k = n.length,\n\t\t\t\t\tkPlusOne = k+1,\n\t\t\t\t\tkMinusOne = k-1;\n\n\t\t\t\t// x < mod, so nothing to do.\n\t\t\t\tif (x.length < k) return;\n\n\t\t\t\tBigInteger q3;\n\n\t\t\t\t//\n\t\t\t\t// Validate pointers\n\t\t\t\t//\n\t\t\t\tif (x.data.Length < x.length) throw new IndexOutOfRangeException (\"x out of range\");\n\n\t\t\t\t// q1 = x / b^ (k-1)\n\t\t\t\t// q2 = q1 * constant\n\t\t\t\t// q3 = q2 / b^ (k+1), Needs to be accessed with an offset of kPlusOne\n\n\t\t\t\t// TODO: We should the method in HAC p 604 to do this (14.45)\n\t\t\t\tq3 = new BigInteger (Sign.Positive, x.length - kMinusOne + constant.length);\n\t\t\t\tKernel.Multiply (x.data, kMinusOne, x.length - kMinusOne, constant.data, 0, constant.length, q3.data, 0);\n\n\t\t\t\t// r1 = x mod b^ (k+1)\n\t\t\t\t// i.e. keep the lowest (k+1) words\n\n\t\t\t\tuint lengthToCopy = (x.length > kPlusOne) ? kPlusOne : x.length;\n\n\t\t\t\tx.length = lengthToCopy;\n\t\t\t\tx.Normalize ();\n\n\t\t\t\t// r2 = (q3 * n) mod b^ (k+1)\n\t\t\t\t// partial multiplication of q3 and n\n\n\t\t\t\tBigInteger r2 = new BigInteger (Sign.Positive, kPlusOne);\n\t\t\t\tKernel.MultiplyMod2p32pmod (q3.data, (int)kPlusOne, (int)q3.length - (int)kPlusOne, n.data, 0, (int)n.length, r2.data, 0, (int)kPlusOne);\n\n\t\t\t\tr2.Normalize ();\n\n\t\t\t\tif (r2 <= x) {\n\t\t\t\t\tKernel.MinusEq (x, r2);\n\t\t\t\t} else {\n\t\t\t\t\tBigInteger val = new BigInteger (Sign.Positive, kPlusOne + 1);\n\t\t\t\t\tval.data [kPlusOne] = 0x00000001;\n\n\t\t\t\t\tKernel.MinusEq (val, r2);\n\t\t\t\t\tKernel.PlusEq (x, val);\n\t\t\t\t}\n\n\t\t\t\twhile (x >= n)\n\t\t\t\t\tKernel.MinusEq (x, n);\n\t\t\t}\n\n\t\t\tpublic BigInteger Multiply (BigInteger a, BigInteger b)\n\t\t\t{\n\t\t\t\tif (a == 0 || b == 0) return 0;\n\n\t\t\t\tif (a > mod)\n\t\t\t\t\ta %= mod;\n\n\t\t\t\tif (b > mod)\n\t\t\t\t\tb %= mod;\n\n\t\t\t\tBigInteger ret = new BigInteger (a * b);\n\t\t\t\tBarrettReduction (ret);\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tpublic BigInteger Difference (BigInteger a, BigInteger b)\n\t\t\t{\n\t\t\t\tSign cmp = Kernel.Compare (a, b);\n\t\t\t\tBigInteger diff;\n\n\t\t\t\tswitch (cmp) {\n\t\t\t\t\tcase Sign.Zero:\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\tcase Sign.Positive:\n\t\t\t\t\t\tdiff = a - b; break;\n\t\t\t\t\tcase Sign.Negative:\n\t\t\t\t\t\tdiff = b - a; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Exception ();\n\t\t\t\t}\n\n\t\t\t\tif (diff >= mod) {\n\t\t\t\t\tif (diff.length >= mod.length << 1)\n\t\t\t\t\t\tdiff %= mod;\n\t\t\t\t\telse\n\t\t\t\t\t\tBarrettReduction (diff);\n\t\t\t\t}\n\t\t\t\tif (cmp == Sign.Negative)\n\t\t\t\t\tdiff = mod - diff;\n\t\t\t\treturn diff;\n\t\t\t}\n#if true\n\t\t\tpublic BigInteger Pow (BigInteger a, BigInteger k)\n\t\t\t{\n\t\t\t\tBigInteger b = new BigInteger (1);\n\t\t\t\tif (k == 0)\n\t\t\t\t\treturn b;\n\n\t\t\t\tBigInteger A = a;\n\t\t\t\tif (k.TestBit (0))\n\t\t\t\t\tb = a;\n\n\t\t\t\tfor (int i = 1; i < k.BitCount (); i++) {\n\t\t\t\t\tA = Multiply (A, A);\n\t\t\t\t\tif (k.TestBit (i))\n\t\t\t\t\t\tb = Multiply (A, b);\n\t\t\t\t}\n\t\t\t\treturn b;\n\t\t\t}\n#else\n\t\t\tpublic BigInteger Pow (BigInteger b, BigInteger exp)\n\t\t\t{\n\t\t\t\tif ((mod.data [0] & 1) == 1) return OddPow (b, exp);\n\t\t\t\telse return EvenPow (b, exp);\n\t\t\t}\n\t\t\t\n\t\t\tpublic BigInteger EvenPow (BigInteger b, BigInteger exp)\n\t\t\t{\n\t\t\t\tBigInteger resultNum = new BigInteger ((BigInteger)1, mod.length << 1);\n\t\t\t\tBigInteger tempNum = new BigInteger (b % mod, mod.length << 1);  // ensures (tempNum * tempNum) < b^ (2k)\n\n\t\t\t\tuint totalBits = (uint)exp.BitCount ();\n\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1];\n\n\t\t\t\t// perform squaring and multiply exponentiation\n\t\t\t\tfor (uint pos = 0; pos < totalBits; pos++) {\n\t\t\t\t\tif (exp.TestBit (pos)) {\n\n\t\t\t\t\t\tArray.Clear (wkspace, 0, wkspace.Length);\n\t\t\t\t\t\tKernel.Multiply (resultNum.data, 0, resultNum.length, tempNum.data, 0, tempNum.length, wkspace, 0);\n\t\t\t\t\t\tresultNum.length += tempNum.length;\n\t\t\t\t\t\tuint [] t = wkspace;\n\t\t\t\t\t\twkspace = resultNum.data;\n\t\t\t\t\t\tresultNum.data = t;\n\n\t\t\t\t\t\tBarrettReduction (resultNum);\n\t\t\t\t\t}\n\n\t\t\t\t\tKernel.SquarePositive (tempNum, ref wkspace);\n\t\t\t\t\tBarrettReduction (tempNum);\n\n\t\t\t\t\tif (tempNum == 1) {\n\t\t\t\t\t\treturn resultNum;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn resultNum;\n\t\t\t}\n\n\t\t\tprivate BigInteger OddPow (BigInteger b, BigInteger exp)\n\t\t\t{\n\t\t\t\tBigInteger resultNum = new BigInteger (Montgomery.ToMont (1, mod), mod.length << 1);\n\t\t\t\tBigInteger tempNum = new BigInteger (Montgomery.ToMont (b, mod), mod.length << 1);  // ensures (tempNum * tempNum) < b^ (2k)\n\t\t\t\tuint mPrime = Montgomery.Inverse (mod.data [0]);\n\t\t\t\tuint totalBits = (uint)exp.BitCount ();\n\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1];\n\n\t\t\t\t// perform squaring and multiply exponentiation\n\t\t\t\tfor (uint pos = 0; pos < totalBits; pos++) {\n\t\t\t\t\tif (exp.TestBit (pos)) {\n\n\t\t\t\t\t\tArray.Clear (wkspace, 0, wkspace.Length);\n\t\t\t\t\t\tKernel.Multiply (resultNum.data, 0, resultNum.length, tempNum.data, 0, tempNum.length, wkspace, 0);\n\t\t\t\t\t\tresultNum.length += tempNum.length;\n\t\t\t\t\t\tuint [] t = wkspace;\n\t\t\t\t\t\twkspace = resultNum.data;\n\t\t\t\t\t\tresultNum.data = t;\n\n\t\t\t\t\t\tMontgomery.Reduce (resultNum, mod, mPrime);\n\t\t\t\t\t}\n\n\t\t\t\t\t// the value of tempNum is required in the last loop\n\t\t\t\t\tif (pos < totalBits - 1) {\n\t\t\t\t\t\tKernel.SquarePositive (tempNum, ref wkspace);\n\t\t\t\t\t\tMontgomery.Reduce (tempNum, mod, mPrime);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tMontgomery.Reduce (resultNum, mod, mPrime);\n\t\t\t\treturn resultNum;\n\t\t\t}\n#endif\n\t\t\t#region Pow Small Base\n\n\t\t\t// TODO: Make tests for this, not really needed b/c prime stuff\n\t\t\t// checks it, but still would be nice\n#if !INSIDE_CORLIB\n                        [CLSCompliant (false)]\n#endif \n#if true\n\t\t\tpublic BigInteger Pow (uint b, BigInteger exp)\n\t\t\t{\n\t\t\t\treturn Pow (new BigInteger (b), exp);\n\t\t\t}\n#else\n\t\t\tpublic BigInteger Pow (uint b, BigInteger exp)\n\t\t\t{\n//\t\t\t\tif (b != 2) {\n\t\t\t\t\tif ((mod.data [0] & 1) == 1)\n\t\t\t\t\t\treturn OddPow (b, exp);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn EvenPow (b, exp);\n/* buggy in some cases (like the well tested primes) \n\t\t\t\t} else {\n\t\t\t\t\tif ((mod.data [0] & 1) == 1)\n\t\t\t\t\t\treturn OddModTwoPow (exp);\n\t\t\t\t\telse \n\t\t\t\t\t\treturn EvenModTwoPow (exp);\n\t\t\t\t}*/\n\t\t\t}\n\n\t\t\tprivate unsafe BigInteger OddPow (uint b, BigInteger exp)\n\t\t\t{\n\t\t\t\texp.Normalize ();\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1 + 1];\n\n\t\t\t\tBigInteger resultNum = Montgomery.ToMont ((BigInteger)b, this.mod);\n\t\t\t\tresultNum = new BigInteger (resultNum, mod.length << 1 +1);\n\n\t\t\t\tuint mPrime = Montgomery.Inverse (mod.data [0]);\n\n\t\t\t\tint bc = exp.BitCount () - 2;\n\t\t\t\tuint pos = (bc > 1 ? (uint) bc : 1);\n\n\t\t\t\t//\n\t\t\t\t// We know that the first itr will make the val b\n\t\t\t\t//\n\n\t\t\t\tdo {\n\t\t\t\t\t//\n\t\t\t\t\t// r = r ^ 2 % m\n\t\t\t\t\t//\n\t\t\t\t\tKernel.SquarePositive (resultNum, ref wkspace);\n\t\t\t\t\tresultNum = Montgomery.Reduce (resultNum, mod, mPrime);\n\n\t\t\t\t\tif (exp.TestBit (pos)) {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// r = r * b % m\n\t\t\t\t\t\t//\n\n\t\t\t\t\t\t// TODO: Is Unsafe really speeding things up?\n\t\t\t\t\t\tfixed (uint* u = resultNum.data) {\n\n\t\t\t\t\t\t\tuint i = 0;\n\t\t\t\t\t\t\tulong mc = 0;\n\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tmc += (ulong)u [i] * (ulong)b;\n\t\t\t\t\t\t\t\tu [i] = (uint)mc;\n\t\t\t\t\t\t\t\tmc >>= 32;\n\t\t\t\t\t\t\t} while (++i < resultNum.length);\n\n\t\t\t\t\t\t\tif (resultNum.length < mod.length) {\n\t\t\t\t\t\t\t\tif (mc != 0) {\n\t\t\t\t\t\t\t\t\tu [i] = (uint)mc;\n\t\t\t\t\t\t\t\t\tresultNum.length++;\n\t\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (mc != 0) {\n\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// First, we estimate the quotient by dividing\n\t\t\t\t\t\t\t\t// the first part of each of the numbers. Then\n\t\t\t\t\t\t\t\t// we correct this, if necessary, with a subtraction.\n\t\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\t\tuint cc = (uint)mc;\n\n\t\t\t\t\t\t\t\t// We would rather have this estimate overshoot,\n\t\t\t\t\t\t\t\t// so we add one to the divisor\n\t\t\t\t\t\t\t\tuint divEstimate;\n\t\t\t\t\t\t\t\tif (mod.data [mod.length - 1] < UInt32.MaxValue) {\n\t\t\t\t\t\t\t\t\tdivEstimate = (uint) ((((ulong)cc << 32) | (ulong) u [i -1]) /\n\t\t\t\t\t\t\t\t\t\t(mod.data [mod.length-1] + 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t// guess but don't divide by 0\n\t\t\t\t\t\t\t\t\tdivEstimate = (uint) ((((ulong)cc << 32) | (ulong) u [i -1]) /\n\t\t\t\t\t\t\t\t\t\t(mod.data [mod.length-1]));\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tuint t;\n\n\t\t\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\t\t\tmc = 0;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tmc += (ulong)mod.data [i] * (ulong)divEstimate;\n\t\t\t\t\t\t\t\t\tt = u [i];\n\t\t\t\t\t\t\t\t\tu [i] -= (uint)mc;\n\t\t\t\t\t\t\t\t\tmc >>= 32;\n\t\t\t\t\t\t\t\t\tif (u [i] > t) mc++;\n\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t} while (i < resultNum.length);\n\t\t\t\t\t\t\t\tcc -= (uint)mc;\n\n\t\t\t\t\t\t\t\tif (cc != 0) {\n\n\t\t\t\t\t\t\t\t\tuint sc = 0, j = 0;\n\t\t\t\t\t\t\t\t\tuint [] s = mod.data;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tuint a = s [j];\n\t\t\t\t\t\t\t\t\t\tif (((a += sc) < sc) | ((u [j] -= a) > ~a)) sc = 1;\n\t\t\t\t\t\t\t\t\t\telse sc = 0;\n\t\t\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\t\t} while (j < resultNum.length);\n\t\t\t\t\t\t\t\t\tcc -= sc;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} while (pos-- > 0);\n\n\t\t\t\tresultNum = Montgomery.Reduce (resultNum, mod, mPrime);\n\t\t\t\treturn resultNum;\n\n\t\t\t}\n\t\t\t\n\t\t\tprivate unsafe BigInteger EvenPow (uint b, BigInteger exp)\n\t\t\t{\n\t\t\t\texp.Normalize ();\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1 + 1];\n\t\t\t\tBigInteger resultNum = new BigInteger ((BigInteger)b, mod.length << 1 + 1);\n\n\t\t\t\tuint pos = (uint)exp.BitCount () - 2;\n\n\t\t\t\t//\n\t\t\t\t// We know that the first itr will make the val b\n\t\t\t\t//\n\n\t\t\t\tdo {\n\t\t\t\t\t//\n\t\t\t\t\t// r = r ^ 2 % m\n\t\t\t\t\t//\n\t\t\t\t\tKernel.SquarePositive (resultNum, ref wkspace);\n\t\t\t\t\tif (!(resultNum.length < mod.length))\n\t\t\t\t\t\tBarrettReduction (resultNum);\n\n\t\t\t\t\tif (exp.TestBit (pos)) {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// r = r * b % m\n\t\t\t\t\t\t//\n\n\t\t\t\t\t\t// TODO: Is Unsafe really speeding things up?\n\t\t\t\t\t\tfixed (uint* u = resultNum.data) {\n\n\t\t\t\t\t\t\tuint i = 0;\n\t\t\t\t\t\t\tulong mc = 0;\n\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tmc += (ulong)u [i] * (ulong)b;\n\t\t\t\t\t\t\t\tu [i] = (uint)mc;\n\t\t\t\t\t\t\t\tmc >>= 32;\n\t\t\t\t\t\t\t} while (++i < resultNum.length);\n\n\t\t\t\t\t\t\tif (resultNum.length < mod.length) {\n\t\t\t\t\t\t\t\tif (mc != 0) {\n\t\t\t\t\t\t\t\t\tu [i] = (uint)mc;\n\t\t\t\t\t\t\t\t\tresultNum.length++;\n\t\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (mc != 0) {\n\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// First, we estimate the quotient by dividing\n\t\t\t\t\t\t\t\t// the first part of each of the numbers. Then\n\t\t\t\t\t\t\t\t// we correct this, if necessary, with a subtraction.\n\t\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\t\tuint cc = (uint)mc;\n\n\t\t\t\t\t\t\t\t// We would rather have this estimate overshoot,\n\t\t\t\t\t\t\t\t// so we add one to the divisor\n\t\t\t\t\t\t\t\tuint divEstimate = (uint) ((((ulong)cc << 32) | (ulong) u [i -1]) /\n\t\t\t\t\t\t\t\t\t(mod.data [mod.length-1] + 1));\n\n\t\t\t\t\t\t\t\tuint t;\n\n\t\t\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\t\t\tmc = 0;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tmc += (ulong)mod.data [i] * (ulong)divEstimate;\n\t\t\t\t\t\t\t\t\tt = u [i];\n\t\t\t\t\t\t\t\t\tu [i] -= (uint)mc;\n\t\t\t\t\t\t\t\t\tmc >>= 32;\n\t\t\t\t\t\t\t\t\tif (u [i] > t) mc++;\n\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t} while (i < resultNum.length);\n\t\t\t\t\t\t\t\tcc -= (uint)mc;\n\n\t\t\t\t\t\t\t\tif (cc != 0) {\n\n\t\t\t\t\t\t\t\t\tuint sc = 0, j = 0;\n\t\t\t\t\t\t\t\t\tuint [] s = mod.data;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tuint a = s [j];\n\t\t\t\t\t\t\t\t\t\tif (((a += sc) < sc) | ((u [j] -= a) > ~a)) sc = 1;\n\t\t\t\t\t\t\t\t\t\telse sc = 0;\n\t\t\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\t\t} while (j < resultNum.length);\n\t\t\t\t\t\t\t\t\tcc -= sc;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twhile (resultNum >= mod)\n\t\t\t\t\t\t\t\t\tKernel.MinusEq (resultNum, mod);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} while (pos-- > 0);\n\n\t\t\t\treturn resultNum;\n\t\t\t}\n#endif\n/* known to be buggy in some cases */\n#if false\n\t\t\tprivate unsafe BigInteger EvenModTwoPow (BigInteger exp)\n\t\t\t{\n\t\t\t\texp.Normalize ();\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1 + 1];\n\n\t\t\t\tBigInteger resultNum = new BigInteger (2, mod.length << 1 +1);\n\n\t\t\t\tuint value = exp.data [exp.length - 1];\n\t\t\t\tuint mask = 0x80000000;\n\n\t\t\t\t// Find the first bit of the exponent\n\t\t\t\twhile ((value & mask) == 0)\n\t\t\t\t\tmask >>= 1;\n\n\t\t\t\t//\n\t\t\t\t// We know that the first itr will make the val 2,\n\t\t\t\t// so eat one bit of the exponent\n\t\t\t\t//\n\t\t\t\tmask >>= 1;\n\n\t\t\t\tuint wPos = exp.length - 1;\n\n\t\t\t\tdo {\n\t\t\t\t\tvalue = exp.data [wPos];\n\t\t\t\t\tdo {\n\t\t\t\t\t\tKernel.SquarePositive (resultNum, ref wkspace);\n\t\t\t\t\t\tif (resultNum.length >= mod.length)\n\t\t\t\t\t\t\tBarrettReduction (resultNum);\n\n\t\t\t\t\t\tif ((value & mask) != 0) {\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// resultNum = (resultNum * 2) % mod\n\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\tfixed (uint* u = resultNum.data) {\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Double\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\tuint* uu = u;\n\t\t\t\t\t\t\t\tuint* uuE = u + resultNum.length;\n\t\t\t\t\t\t\t\tuint x, carry = 0;\n\t\t\t\t\t\t\t\twhile (uu < uuE) {\n\t\t\t\t\t\t\t\t\tx = *uu;\n\t\t\t\t\t\t\t\t\t*uu = (x << 1) | carry;\n\t\t\t\t\t\t\t\t\tcarry = x >> (32 - 1);\n\t\t\t\t\t\t\t\t\tuu++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// subtraction inlined because we know it is square\n\t\t\t\t\t\t\t\tif (carry != 0 || resultNum >= mod) {\n\t\t\t\t\t\t\t\t\tuu = u;\n\t\t\t\t\t\t\t\t\tuint c = 0;\n\t\t\t\t\t\t\t\t\tuint [] s = mod.data;\n\t\t\t\t\t\t\t\t\tuint i = 0;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tuint a = s [i];\n\t\t\t\t\t\t\t\t\t\tif (((a += c) < c) | ((* (uu++) -= a) > ~a))\n\t\t\t\t\t\t\t\t\t\t\tc = 1;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t\t} while (uu < uuE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((mask >>= 1) > 0);\n\t\t\t\t\tmask = 0x80000000;\n\t\t\t\t} while (wPos-- > 0);\n\n\t\t\t\treturn resultNum;\n\t\t\t}\n\n\t\t\tprivate unsafe BigInteger OddModTwoPow (BigInteger exp)\n\t\t\t{\n\n\t\t\t\tuint [] wkspace = new uint [mod.length << 1 + 1];\n\n\t\t\t\tBigInteger resultNum = Montgomery.ToMont ((BigInteger)2, this.mod);\n\t\t\t\tresultNum = new BigInteger (resultNum, mod.length << 1 +1);\n\n\t\t\t\tuint mPrime = Montgomery.Inverse (mod.data [0]);\n\n\t\t\t\t//\n\t\t\t\t// TODO: eat small bits, the ones we can do with no modular reduction\n\t\t\t\t//\n\t\t\t\tuint pos = (uint)exp.BitCount () - 2;\n\n\t\t\t\tdo {\n\t\t\t\t\tKernel.SquarePositive (resultNum, ref wkspace);\n\t\t\t\t\tresultNum = Montgomery.Reduce (resultNum, mod, mPrime);\n\n\t\t\t\t\tif (exp.TestBit (pos)) {\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// resultNum = (resultNum * 2) % mod\n\t\t\t\t\t\t//\n\n\t\t\t\t\t\tfixed (uint* u = resultNum.data) {\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Double\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\tuint* uu = u;\n\t\t\t\t\t\t\tuint* uuE = u + resultNum.length;\n\t\t\t\t\t\t\tuint x, carry = 0;\n\t\t\t\t\t\t\twhile (uu < uuE) {\n\t\t\t\t\t\t\t\tx = *uu;\n\t\t\t\t\t\t\t\t*uu = (x << 1) | carry;\n\t\t\t\t\t\t\t\tcarry = x >> (32 - 1);\n\t\t\t\t\t\t\t\tuu++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// subtraction inlined because we know it is square\n\t\t\t\t\t\t\tif (carry != 0 || resultNum >= mod) {\n\t\t\t\t\t\t\t\tfixed (uint* s = mod.data) {\n\t\t\t\t\t\t\t\t\tuu = u;\n\t\t\t\t\t\t\t\t\tuint c = 0;\n\t\t\t\t\t\t\t\t\tuint* ss = s;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tuint a = *ss++;\n\t\t\t\t\t\t\t\t\t\tif (((a += c) < c) | ((* (uu++) -= a) > ~a))\n\t\t\t\t\t\t\t\t\t\t\tc = 1;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t\t\t} while (uu < uuE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} while (pos-- > 0);\n\n\t\t\t\tresultNum = Montgomery.Reduce (resultNum, mod, mPrime);\n\t\t\t\treturn resultNum;\n\t\t\t}\n#endif\n\t\t\t#endregion\n\t\t}\n\n\t\tinternal sealed class Montgomery {\n\n\t\t\tprivate Montgomery () \n\t\t\t{\n\t\t\t}\n\n\t\t\tpublic static uint Inverse (uint n)\n\t\t\t{\n\t\t\t\tuint y = n, z;\n\n\t\t\t\twhile ((z = n * y) != 1)\n\t\t\t\t\ty *= 2 - z;\n\n\t\t\t\treturn (uint)-y;\n\t\t\t}\n\n\t\t\tpublic static BigInteger ToMont (BigInteger n, BigInteger m)\n\t\t\t{\n\t\t\t\tn.Normalize (); m.Normalize ();\n\n\t\t\t\tn <<= (int)m.length * 32;\n\t\t\t\tn %= m;\n\t\t\t\treturn n;\n\t\t\t}\n\n\t\t\tpublic static unsafe BigInteger Reduce (BigInteger n, BigInteger m, uint mPrime)\n\t\t\t{\n\t\t\t\tBigInteger A = n;\n\t\t\t\tfixed (uint* a = A.data, mm = m.data) {\n\t\t\t\t\tfor (uint i = 0; i < m.length; i++) {\n\t\t\t\t\t\t// The mod here is taken care of by the CPU,\n\t\t\t\t\t\t// since the multiply will overflow.\n\t\t\t\t\t\tuint u_i = a [0] * mPrime /* % 2^32 */;\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// A += u_i * m;\n\t\t\t\t\t\t// A >>= 32\n\t\t\t\t\t\t//\n\n\t\t\t\t\t\t// mP = Position in mod\n\t\t\t\t\t\t// aSP = the source of bits from a\n\t\t\t\t\t\t// aDP = destination for bits\n\t\t\t\t\t\tuint* mP = mm, aSP = a, aDP = a;\n\n\t\t\t\t\t\tulong c = (ulong)u_i * ((ulong)*(mP++)) + *(aSP++);\n\t\t\t\t\t\tc >>= 32;\n\t\t\t\t\t\tuint j = 1;\n\n\t\t\t\t\t\t// Multiply and add\n\t\t\t\t\t\tfor (; j < m.length; j++) {\n\t\t\t\t\t\t\tc += (ulong)u_i * (ulong)*(mP++) + *(aSP++);\n\t\t\t\t\t\t\t*(aDP++) = (uint)c;\n\t\t\t\t\t\t\tc >>= 32;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Account for carry\n\t\t\t\t\t\t// TODO: use a better loop here, we dont need the ulong stuff\n\t\t\t\t\t\tfor (; j < A.length; j++) {\n\t\t\t\t\t\t\tc += *(aSP++);\n\t\t\t\t\t\t\t*(aDP++) = (uint)c;\n\t\t\t\t\t\t\tc >>= 32;\n\t\t\t\t\t\t\tif (c == 0) {j++; break;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Copy the rest\n\t\t\t\t\t\tfor (; j < A.length; j++) {\n\t\t\t\t\t\t\t*(aDP++) = *(aSP++);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t*(aDP++) = (uint)c;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (A.length > 1 && a [A.length-1] == 0) A.length--;\n\n\t\t\t\t}\n\t\t\t\tif (A >= m) Kernel.MinusEq (A, m);\n\n\t\t\t\treturn A;\n\t\t\t}\n#if _NOT_USED_\n\t\t\tpublic static BigInteger Reduce (BigInteger n, BigInteger m)\n\t\t\t{\n\t\t\t\treturn Reduce (n, m, Inverse (m.data [0]));\n\t\t\t}\n#endif\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Low level functions for the BigInteger\n\t\t/// </summary>\n\t\tprivate sealed class Kernel {\n\n\t\t\t#region Addition/Subtraction\n\n\t\t\t/// <summary>\n\t\t\t/// Adds two numbers with the same sign.\n\t\t\t/// </summary>\n\t\t\t/// <param name=\"bi1\">A BigInteger</param>\n\t\t\t/// <param name=\"bi2\">A BigInteger</param>\n\t\t\t/// <returns>bi1 + bi2</returns>\n\t\t\tpublic static BigInteger AddSameSign (BigInteger bi1, BigInteger bi2)\n\t\t\t{\n\t\t\t\tuint [] x, y;\n\t\t\t\tuint yMax, xMax, i = 0;\n\n\t\t\t\t// x should be bigger\n\t\t\t\tif (bi1.length < bi2.length) {\n\t\t\t\t\tx = bi2.data;\n\t\t\t\t\txMax = bi2.length;\n\t\t\t\t\ty = bi1.data;\n\t\t\t\t\tyMax = bi1.length;\n\t\t\t\t} else {\n\t\t\t\t\tx = bi1.data;\n\t\t\t\t\txMax = bi1.length;\n\t\t\t\t\ty = bi2.data;\n\t\t\t\t\tyMax = bi2.length;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBigInteger result = new BigInteger (Sign.Positive, xMax + 1);\n\n\t\t\t\tuint [] r = result.data;\n\n\t\t\t\tulong sum = 0;\n\n\t\t\t\t// Add common parts of both numbers\n\t\t\t\tdo {\n\t\t\t\t\tsum = ((ulong)x [i]) + ((ulong)y [i]) + sum;\n\t\t\t\t\tr [i] = (uint)sum;\n\t\t\t\t\tsum >>= 32;\n\t\t\t\t} while (++i < yMax);\n\n\t\t\t\t// Copy remainder of longer number while carry propagation is required\n\t\t\t\tbool carry = (sum != 0);\n\n\t\t\t\tif (carry) {\n\n\t\t\t\t\tif (i < xMax) {\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t\tcarry = ((r [i] = x [i] + 1) == 0);\n\t\t\t\t\t\twhile (++i < xMax && carry);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry) {\n\t\t\t\t\t\tr [i] = 1;\n\t\t\t\t\t\tresult.length = ++i;\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Copy the rest\n\t\t\t\tif (i < xMax) {\n\t\t\t\t\tdo\n\t\t\t\t\t\tr [i] = x [i];\n\t\t\t\t\twhile (++i < xMax);\n\t\t\t\t}\n\n\t\t\t\tresult.Normalize ();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tpublic static BigInteger Subtract (BigInteger big, BigInteger small)\n\t\t\t{\n\t\t\t\tBigInteger result = new BigInteger (Sign.Positive, big.length);\n\n\t\t\t\tuint [] r = result.data, b = big.data, s = small.data;\n\t\t\t\tuint i = 0, c = 0;\n\n\t\t\t\tdo {\n\n\t\t\t\t\tuint x = s [i];\n\t\t\t\t\tif (((x += c) < c) | ((r [i] = b [i] - x) > ~x))\n\t\t\t\t\t\tc = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tc = 0;\n\n\t\t\t\t} while (++i < small.length);\n\n\t\t\t\tif (i == big.length) goto fixup;\n\n\t\t\t\tif (c == 1) {\n\t\t\t\t\tdo\n\t\t\t\t\t\tr [i] = b [i] - 1;\n\t\t\t\t\twhile (b [i++] == 0 && i < big.length);\n\n\t\t\t\t\tif (i == big.length) goto fixup;\n\t\t\t\t}\n\n\t\t\t\tdo\n\t\t\t\t\tr [i] = b [i];\n\t\t\t\twhile (++i < big.length);\n\n\t\t\t\tfixup:\n\n\t\t\t\t\tresult.Normalize ();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tpublic static void MinusEq (BigInteger big, BigInteger small)\n\t\t\t{\n\t\t\t\tuint [] b = big.data, s = small.data;\n\t\t\t\tuint i = 0, c = 0;\n\n\t\t\t\tdo {\n\t\t\t\t\tuint x = s [i];\n\t\t\t\t\tif (((x += c) < c) | ((b [i] -= x) > ~x))\n\t\t\t\t\t\tc = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tc = 0;\n\t\t\t\t} while (++i < small.length);\n\n\t\t\t\tif (i == big.length) goto fixup;\n\n\t\t\t\tif (c == 1) {\n\t\t\t\t\tdo\n\t\t\t\t\t\tb [i]--;\n\t\t\t\t\twhile (b [i++] == 0 && i < big.length);\n\t\t\t\t}\n\n\t\t\t\tfixup:\n\n\t\t\t\t\t// Normalize length\n\t\t\t\t\twhile (big.length > 0 && big.data [big.length-1] == 0) big.length--;\n\n\t\t\t\t// Check for zero\n\t\t\t\tif (big.length == 0)\n\t\t\t\t\tbig.length++;\n\n\t\t\t}\n\n\t\t\tpublic static void PlusEq (BigInteger bi1, BigInteger bi2)\n\t\t\t{\n\t\t\t\tuint [] x, y;\n\t\t\t\tuint yMax, xMax, i = 0;\n\t\t\t\tbool flag = false;\n\n\t\t\t\t// x should be bigger\n\t\t\t\tif (bi1.length < bi2.length){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tx = bi2.data;\n\t\t\t\t\txMax = bi2.length;\n\t\t\t\t\ty = bi1.data;\n\t\t\t\t\tyMax = bi1.length;\n\t\t\t\t} else {\n\t\t\t\t\tx = bi1.data;\n\t\t\t\t\txMax = bi1.length;\n\t\t\t\t\ty = bi2.data;\n\t\t\t\t\tyMax = bi2.length;\n\t\t\t\t}\n\n\t\t\t\tuint [] r = bi1.data;\n\n\t\t\t\tulong sum = 0;\n\n\t\t\t\t// Add common parts of both numbers\n\t\t\t\tdo {\n\t\t\t\t\tsum += ((ulong)x [i]) + ((ulong)y [i]);\n\t\t\t\t\tr [i] = (uint)sum;\n\t\t\t\t\tsum >>= 32;\n\t\t\t\t} while (++i < yMax);\n\n\t\t\t\t// Copy remainder of longer number while carry propagation is required\n\t\t\t\tbool carry = (sum != 0);\n\n\t\t\t\tif (carry){\n\n\t\t\t\t\tif (i < xMax) {\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t\tcarry = ((r [i] = x [i] + 1) == 0);\n\t\t\t\t\t\twhile (++i < xMax && carry);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry) {\n\t\t\t\t\t\tr [i] = 1;\n\t\t\t\t\t\tbi1.length = ++i;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Copy the rest\n\t\t\t\tif (flag && i < xMax - 1) {\n\t\t\t\t\tdo\n\t\t\t\t\t\tr [i] = x [i];\n\t\t\t\t\twhile (++i < xMax);\n\t\t\t\t}\n\n\t\t\t\tbi1.length = xMax + 1;\n\t\t\t\tbi1.Normalize ();\n\t\t\t}\n\n\t\t\t#endregion\n\n\t\t\t#region Compare\n\n\t\t\t/// <summary>\n\t\t\t/// Compares two BigInteger\n\t\t\t/// </summary>\n\t\t\t/// <param name=\"bi1\">A BigInteger</param>\n\t\t\t/// <param name=\"bi2\">A BigInteger</param>\n\t\t\t/// <returns>The sign of bi1 - bi2</returns>\n\t\t\tpublic static Sign Compare (BigInteger bi1, BigInteger bi2)\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Step 1. Compare the lengths\n\t\t\t\t//\n\t\t\t\tuint l1 = bi1.length, l2 = bi2.length;\n\n\t\t\t\twhile (l1 > 0 && bi1.data [l1-1] == 0) l1--;\n\t\t\t\twhile (l2 > 0 && bi2.data [l2-1] == 0) l2--;\n\n\t\t\t\tif (l1 == 0 && l2 == 0) return Sign.Zero;\n\n\t\t\t\t// bi1 len < bi2 len\n\t\t\t\tif (l1 < l2) return Sign.Negative;\n\t\t\t\t// bi1 len > bi2 len\n\t\t\t\telse if (l1 > l2) return Sign.Positive;\n\n\t\t\t\t//\n\t\t\t\t// Step 2. Compare the bits\n\t\t\t\t//\n\n\t\t\t\tuint pos = l1 - 1;\n\n\t\t\t\twhile (pos != 0 && bi1.data [pos] == bi2.data [pos]) pos--;\n\t\t\t\t\n\t\t\t\tif (bi1.data [pos] < bi2.data [pos])\n\t\t\t\t\treturn Sign.Negative;\n\t\t\t\telse if (bi1.data [pos] > bi2.data [pos])\n\t\t\t\t\treturn Sign.Positive;\n\t\t\t\telse\n\t\t\t\t\treturn Sign.Zero;\n\t\t\t}\n\n\t\t\t#endregion\n\n\t\t\t#region Division\n\n\t\t\t#region Dword\n\n\t\t\t/// <summary>\n\t\t\t/// Performs n / d and n % d in one operation.\n\t\t\t/// </summary>\n\t\t\t/// <param name=\"n\">A BigInteger, upon exit this will hold n / d</param>\n\t\t\t/// <param name=\"d\">The divisor</param>\n\t\t\t/// <returns>n % d</returns>\n\t\t\tpublic static uint SingleByteDivideInPlace (BigInteger n, uint d)\n\t\t\t{\n\t\t\t\tulong r = 0;\n\t\t\t\tuint i = n.length;\n\n\t\t\t\twhile (i-- > 0) {\n\t\t\t\t\tr <<= 32;\n\t\t\t\t\tr |= n.data [i];\n\t\t\t\t\tn.data [i] = (uint)(r / d);\n\t\t\t\t\tr %= d;\n\t\t\t\t}\n\t\t\t\tn.Normalize ();\n\n\t\t\t\treturn (uint)r;\n\t\t\t}\n\n\t\t\tpublic static uint DwordMod (BigInteger n, uint d)\n\t\t\t{\n\t\t\t\tulong r = 0;\n\t\t\t\tuint i = n.length;\n\n\t\t\t\twhile (i-- > 0) {\n\t\t\t\t\tr <<= 32;\n\t\t\t\t\tr |= n.data [i];\n\t\t\t\t\tr %= d;\n\t\t\t\t}\n\n\t\t\t\treturn (uint)r;\n\t\t\t}\n\n\t\t\tpublic static BigInteger DwordDiv (BigInteger n, uint d)\n\t\t\t{\n\t\t\t\tBigInteger ret = new BigInteger (Sign.Positive, n.length);\n\n\t\t\t\tulong r = 0;\n\t\t\t\tuint i = n.length;\n\n\t\t\t\twhile (i-- > 0) {\n\t\t\t\t\tr <<= 32;\n\t\t\t\t\tr |= n.data [i];\n\t\t\t\t\tret.data [i] = (uint)(r / d);\n\t\t\t\t\tr %= d;\n\t\t\t\t}\n\t\t\t\tret.Normalize ();\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tpublic static BigInteger [] DwordDivMod (BigInteger n, uint d)\n\t\t\t{\n\t\t\t\tBigInteger ret = new BigInteger (Sign.Positive , n.length);\n\n\t\t\t\tulong r = 0;\n\t\t\t\tuint i = n.length;\n\n\t\t\t\twhile (i-- > 0) {\n\t\t\t\t\tr <<= 32;\n\t\t\t\t\tr |= n.data [i];\n\t\t\t\t\tret.data [i] = (uint)(r / d);\n\t\t\t\t\tr %= d;\n\t\t\t\t}\n\t\t\t\tret.Normalize ();\n\n\t\t\t\tBigInteger rem = (uint)r;\n\n\t\t\t\treturn new BigInteger [] {ret, rem};\n\t\t\t}\n\n\t\t\t\t#endregion\n\n\t\t\t#region BigNum\n\n\t\t\tpublic static BigInteger [] multiByteDivide (BigInteger bi1, BigInteger bi2)\n\t\t\t{\n\t\t\t\tif (Kernel.Compare (bi1, bi2) == Sign.Negative)\n\t\t\t\t\treturn new BigInteger [2] { 0, new BigInteger (bi1) };\n\n\t\t\t\tbi1.Normalize (); bi2.Normalize ();\n\n\t\t\t\tif (bi2.length == 1)\n\t\t\t\t\treturn DwordDivMod (bi1, bi2.data [0]);\n\n\t\t\t\tuint remainderLen = bi1.length + 1;\n\t\t\t\tint divisorLen = (int)bi2.length + 1;\n\n\t\t\t\tuint mask = 0x80000000;\n\t\t\t\tuint val = bi2.data [bi2.length - 1];\n\t\t\t\tint shift = 0;\n\t\t\t\tint resultPos = (int)bi1.length - (int)bi2.length;\n\n\t\t\t\twhile (mask != 0 && (val & mask) == 0) {\n\t\t\t\t\tshift++; mask >>= 1;\n\t\t\t\t}\n\n\t\t\t\tBigInteger quot = new BigInteger (Sign.Positive, bi1.length - bi2.length + 1);\n\t\t\t\tBigInteger rem = (bi1 << shift);\n\n\t\t\t\tuint [] remainder = rem.data;\n\n\t\t\t\tbi2 = bi2 << shift;\n\n\t\t\t\tint j = (int)(remainderLen - bi2.length);\n\t\t\t\tint pos = (int)remainderLen - 1;\n\n\t\t\t\tuint firstDivisorByte = bi2.data [bi2.length-1];\n\t\t\t\tulong secondDivisorByte = bi2.data [bi2.length-2];\n\n\t\t\t\twhile (j > 0) {\n\t\t\t\t\tulong dividend = ((ulong)remainder [pos] << 32) + (ulong)remainder [pos-1];\n\n\t\t\t\t\tulong q_hat = dividend / (ulong)firstDivisorByte;\n\t\t\t\t\tulong r_hat = dividend % (ulong)firstDivisorByte;\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tif (q_hat == 0x100000000 ||\n\t\t\t\t\t\t\t(q_hat * secondDivisorByte) > ((r_hat << 32) + remainder [pos-2])) {\n\t\t\t\t\t\t\tq_hat--;\n\t\t\t\t\t\t\tr_hat += (ulong)firstDivisorByte;\n\n\t\t\t\t\t\t\tif (r_hat < 0x100000000)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} while (true);\n\n\t\t\t\t\t//\n\t\t\t\t\t// At this point, q_hat is either exact, or one too large\n\t\t\t\t\t// (more likely to be exact) so, we attempt to multiply the\n\t\t\t\t\t// divisor by q_hat, if we get a borrow, we just subtract\n\t\t\t\t\t// one from q_hat and add the divisor back.\n\t\t\t\t\t//\n\n\t\t\t\t\tuint t;\n\t\t\t\t\tuint dPos = 0;\n\t\t\t\t\tint nPos = pos - divisorLen + 1;\n\t\t\t\t\tulong mc = 0;\n\t\t\t\t\tuint uint_q_hat = (uint)q_hat;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tmc += (ulong)bi2.data [dPos] * (ulong)uint_q_hat;\n\t\t\t\t\t\tt = remainder [nPos];\n\t\t\t\t\t\tremainder [nPos] -= (uint)mc;\n\t\t\t\t\t\tmc >>= 32;\n\t\t\t\t\t\tif (remainder [nPos] > t) mc++;\n\t\t\t\t\t\tdPos++; nPos++;\n\t\t\t\t\t} while (dPos < divisorLen);\n\n\t\t\t\t\tnPos = pos - divisorLen + 1;\n\t\t\t\t\tdPos = 0;\n\n\t\t\t\t\t// Overestimate\n\t\t\t\t\tif (mc != 0) {\n\t\t\t\t\t\tuint_q_hat--;\n\t\t\t\t\t\tulong sum = 0;\n\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tsum = ((ulong)remainder [nPos]) + ((ulong)bi2.data [dPos]) + sum;\n\t\t\t\t\t\t\tremainder [nPos] = (uint)sum;\n\t\t\t\t\t\t\tsum >>= 32;\n\t\t\t\t\t\t\tdPos++; nPos++;\n\t\t\t\t\t\t} while (dPos < divisorLen);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tquot.data [resultPos--] = (uint)uint_q_hat;\n\n\t\t\t\t\tpos--;\n\t\t\t\t\tj--;\n\t\t\t\t}\n\n\t\t\t\tquot.Normalize ();\n\t\t\t\trem.Normalize ();\n\t\t\t\tBigInteger [] ret = new BigInteger [2] { quot, rem };\n\n\t\t\t\tif (shift != 0)\n\t\t\t\t\tret [1] >>= shift;\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t#endregion\n\n\t\t\t#endregion\n\n\t\t\t#region Shift\n\t\t\tpublic static BigInteger LeftShift (BigInteger bi, int n)\n\t\t\t{\n\t\t\t\tif (n == 0) return new BigInteger (bi, bi.length + 1);\n\n\t\t\t\tint w = n >> 5;\n\t\t\t\tn &= ((1 << 5) - 1);\n\n\t\t\t\tBigInteger ret = new BigInteger (Sign.Positive, bi.length + 1 + (uint)w);\n\n\t\t\t\tuint i = 0, l = bi.length;\n\t\t\t\tif (n != 0) {\n\t\t\t\t\tuint x, carry = 0;\n\t\t\t\t\twhile (i < l) {\n\t\t\t\t\t\tx = bi.data [i];\n\t\t\t\t\t\tret.data [i + w] = (x << n) | carry;\n\t\t\t\t\t\tcarry = x >> (32 - n);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tret.data [i + w] = carry;\n\t\t\t\t} else {\n\t\t\t\t\twhile (i < l) {\n\t\t\t\t\t\tret.data [i + w] = bi.data [i];\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tret.Normalize ();\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tpublic static BigInteger RightShift (BigInteger bi, int n)\n\t\t\t{\n\t\t\t\tif (n == 0) return new BigInteger (bi);\n\n\t\t\t\tint w = n >> 5;\n\t\t\t\tint s = n & ((1 << 5) - 1);\n\n\t\t\t\tBigInteger ret = new BigInteger (Sign.Positive, bi.length - (uint)w + 1);\n\t\t\t\tuint l = (uint)ret.data.Length - 1;\n\n\t\t\t\tif (s != 0) {\n\n\t\t\t\t\tuint x, carry = 0;\n\n\t\t\t\t\twhile (l-- > 0) {\n\t\t\t\t\t\tx = bi.data [l + w];\n\t\t\t\t\t\tret.data [l] = (x >> n) | carry;\n\t\t\t\t\t\tcarry = x << (32 - n);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twhile (l-- > 0)\n\t\t\t\t\t\tret.data [l] = bi.data [l + w];\n\n\t\t\t\t}\n\t\t\t\tret.Normalize ();\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t#endregion\n\n\t\t\t#region Multiply\n\n\t\t\tpublic static BigInteger MultiplyByDword (BigInteger n, uint f)\n\t\t\t{\n\t\t\t\tBigInteger ret = new BigInteger (Sign.Positive, n.length + 1);\n\n\t\t\t\tuint i = 0;\n\t\t\t\tulong c = 0;\n\n\t\t\t\tdo {\n\t\t\t\t\tc += (ulong)n.data [i] * (ulong)f;\n\t\t\t\t\tret.data [i] = (uint)c;\n\t\t\t\t\tc >>= 32;\n\t\t\t\t} while (++i < n.length);\n\t\t\t\tret.data [i] = (uint)c;\n\t\t\t\tret.Normalize ();\n\t\t\t\treturn ret;\n\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Multiplies the data in x [xOffset:xOffset+xLen] by\n\t\t\t/// y [yOffset:yOffset+yLen] and puts it into\n\t\t\t/// d [dOffset:dOffset+xLen+yLen].\n\t\t\t/// </summary>\n\t\t\t/// <remarks>\n\t\t\t/// This code is unsafe! It is the caller's responsibility to make\n\t\t\t/// sure that it is safe to access x [xOffset:xOffset+xLen],\n\t\t\t/// y [yOffset:yOffset+yLen], and d [dOffset:dOffset+xLen+yLen].\n\t\t\t/// </remarks>\n\t\t\tpublic static unsafe void Multiply (uint [] x, uint xOffset, uint xLen, uint [] y, uint yOffset, uint yLen, uint [] d, uint dOffset)\n\t\t\t{\n\t\t\t\tfixed (uint* xx = x, yy = y, dd = d) {\n\t\t\t\t\tuint* xP = xx + xOffset,\n\t\t\t\t\t\txE = xP + xLen,\n\t\t\t\t\t\tyB = yy + yOffset,\n\t\t\t\t\t\tyE = yB + yLen,\n\t\t\t\t\t\tdB = dd + dOffset;\n\n\t\t\t\t\tfor (; xP < xE; xP++, dB++) {\n\n\t\t\t\t\t\tif (*xP == 0) continue;\n\n\t\t\t\t\t\tulong mcarry = 0;\n\n\t\t\t\t\t\tuint* dP = dB;\n\t\t\t\t\t\tfor (uint* yP = yB; yP < yE; yP++, dP++) {\n\t\t\t\t\t\t\tmcarry += ((ulong)*xP * (ulong)*yP) + (ulong)*dP;\n\n\t\t\t\t\t\t\t*dP = (uint)mcarry;\n\t\t\t\t\t\t\tmcarry >>= 32;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (mcarry != 0)\n\t\t\t\t\t\t\t*dP = (uint)mcarry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Multiplies the data in x [xOffset:xOffset+xLen] by\n\t\t\t/// y [yOffset:yOffset+yLen] and puts the low mod words into\n\t\t\t/// d [dOffset:dOffset+mod].\n\t\t\t/// </summary>\n\t\t\t/// <remarks>\n\t\t\t/// This code is unsafe! It is the caller's responsibility to make\n\t\t\t/// sure that it is safe to access x [xOffset:xOffset+xLen],\n\t\t\t/// y [yOffset:yOffset+yLen], and d [dOffset:dOffset+mod].\n\t\t\t/// </remarks>\n\t\t\tpublic static unsafe void MultiplyMod2p32pmod (uint [] x, int xOffset, int xLen, uint [] y, int yOffest, int yLen, uint [] d, int dOffset, int mod)\n\t\t\t{\n\t\t\t\tfixed (uint* xx = x, yy = y, dd = d) {\n\t\t\t\t\tuint* xP = xx + xOffset,\n\t\t\t\t\t\txE = xP + xLen,\n\t\t\t\t\t\tyB = yy + yOffest,\n\t\t\t\t\t\tyE = yB + yLen,\n\t\t\t\t\t\tdB = dd + dOffset,\n\t\t\t\t\t\tdE = dB + mod;\n\n\t\t\t\t\tfor (; xP < xE; xP++, dB++) {\n\n\t\t\t\t\t\tif (*xP == 0) continue;\n\n\t\t\t\t\t\tulong mcarry = 0;\n\t\t\t\t\t\tuint* dP = dB;\n\t\t\t\t\t\tfor (uint* yP = yB; yP < yE && dP < dE; yP++, dP++) {\n\t\t\t\t\t\t\tmcarry += ((ulong)*xP * (ulong)*yP) + (ulong)*dP;\n\n\t\t\t\t\t\t\t*dP = (uint)mcarry;\n\t\t\t\t\t\t\tmcarry >>= 32;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (mcarry != 0 && dP < dE)\n\t\t\t\t\t\t\t*dP = (uint)mcarry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic static unsafe void SquarePositive (BigInteger bi, ref uint [] wkSpace)\n\t\t\t{\n\t\t\t\tuint [] t = wkSpace;\n\t\t\t\twkSpace = bi.data;\n\t\t\t\tuint [] d = bi.data;\n\t\t\t\tuint dl = bi.length;\n\t\t\t\tbi.data = t;\n\n\t\t\t\tfixed (uint* dd = d, tt = t) {\n\n\t\t\t\t\tuint* ttE = tt + t.Length;\n\t\t\t\t\t// Clear the dest\n\t\t\t\t\tfor (uint* ttt = tt; ttt < ttE; ttt++)\n\t\t\t\t\t\t*ttt = 0;\n\n\t\t\t\t\tuint* dP = dd, tP = tt;\n\n\t\t\t\t\tfor (uint i = 0; i < dl; i++, dP++) {\n\t\t\t\t\t\tif (*dP == 0)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tulong mcarry = 0;\n\t\t\t\t\t\tuint bi1val = *dP;\n\n\t\t\t\t\t\tuint* dP2 = dP + 1, tP2 = tP + 2*i + 1;\n\n\t\t\t\t\t\tfor (uint j = i + 1; j < dl; j++, tP2++, dP2++) {\n\t\t\t\t\t\t\t// k = i + j\n\t\t\t\t\t\t\tmcarry += ((ulong)bi1val * (ulong)*dP2) + *tP2;\n\n\t\t\t\t\t\t\t*tP2 = (uint)mcarry;\n\t\t\t\t\t\t\tmcarry >>= 32;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (mcarry != 0)\n\t\t\t\t\t\t\t*tP2 = (uint)mcarry;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Double t. Inlined for speed.\n\n\t\t\t\t\ttP = tt;\n\n\t\t\t\t\tuint x, carry = 0;\n\t\t\t\t\twhile (tP < ttE) {\n\t\t\t\t\t\tx = *tP;\n\t\t\t\t\t\t*tP = (x << 1) | carry;\n\t\t\t\t\t\tcarry = x >> (32 - 1);\n\t\t\t\t\t\ttP++;\n\t\t\t\t\t}\n\t\t\t\t\tif (carry != 0) *tP = carry;\n\n\t\t\t\t\t// Add in the diagnals\n\n\t\t\t\t\tdP = dd;\n\t\t\t\t\ttP = tt;\n\t\t\t\t\tfor (uint* dE = dP + dl; (dP < dE); dP++, tP++) {\n\t\t\t\t\t\tulong val = (ulong)*dP * (ulong)*dP + *tP;\n\t\t\t\t\t\t*tP = (uint)val;\n\t\t\t\t\t\tval >>= 32;\n\t\t\t\t\t\t*(++tP) += (uint)val;\n\t\t\t\t\t\tif (*tP < (uint)val) {\n\t\t\t\t\t\t\tuint* tP3 = tP;\n\t\t\t\t\t\t\t// Account for the first carry\n\t\t\t\t\t\t\t(*++tP3)++;\n\n\t\t\t\t\t\t\t// Keep adding until no carry\n\t\t\t\t\t\t\twhile ((*tP3++) == 0)\n\t\t\t\t\t\t\t\t(*tP3)++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbi.length <<= 1;\n\n\t\t\t\t\t// Normalize length\n\t\t\t\t\twhile (tt [bi.length-1] == 0 && bi.length > 1) bi.length--;\n\n\t\t\t\t}\n\t\t\t}\n\n/* \n * Never called in BigInteger (and part of a private class)\n * \t\t\tpublic static bool Double (uint [] u, int l)\n\t\t\t{\n\t\t\t\tuint x, carry = 0;\n\t\t\t\tuint i = 0;\n\t\t\t\twhile (i < l) {\n\t\t\t\t\tx = u [i];\n\t\t\t\t\tu [i] = (x << 1) | carry;\n\t\t\t\t\tcarry = x >> (32 - 1);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (carry != 0) u [l] = carry;\n\t\t\t\treturn carry != 0;\n\t\t\t}*/\n\n\t\t\t#endregion\n\n\t\t\t#region Number Theory\n\n\t\t\tpublic static BigInteger gcd (BigInteger a, BigInteger b)\n\t\t\t{\n\t\t\t\tBigInteger x = a;\n\t\t\t\tBigInteger y = b;\n\n\t\t\t\tBigInteger g = y;\n\n\t\t\t\twhile (x.length > 1) {\n\t\t\t\t\tg = x;\n\t\t\t\t\tx = y % x;\n\t\t\t\t\ty = g;\n\n\t\t\t\t}\n\t\t\t\tif (x == 0) return g;\n\n\t\t\t\t// TODO: should we have something here if we can convert to long?\n\n\t\t\t\t//\n\t\t\t\t// Now we can just do it with single precision. I am using the binary gcd method,\n\t\t\t\t// as it should be faster.\n\t\t\t\t//\n\n\t\t\t\tuint yy = x.data [0];\n\t\t\t\tuint xx = y % yy;\n\n\t\t\t\tint t = 0;\n\n\t\t\t\twhile (((xx | yy) & 1) == 0) {\n\t\t\t\t\txx >>= 1; yy >>= 1; t++;\n\t\t\t\t}\n\t\t\t\twhile (xx != 0) {\n\t\t\t\t\twhile ((xx & 1) == 0) xx >>= 1;\n\t\t\t\t\twhile ((yy & 1) == 0) yy >>= 1;\n\t\t\t\t\tif (xx >= yy)\n\t\t\t\t\t\txx = (xx - yy) >> 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tyy = (yy - xx) >> 1;\n\t\t\t\t}\n\n\t\t\t\treturn yy << t;\n\t\t\t}\n\n\t\t\tpublic static uint modInverse (BigInteger bi, uint modulus)\n\t\t\t{\n\t\t\t\tuint a = modulus, b = bi % modulus;\n\t\t\t\tuint p0 = 0, p1 = 1;\n\n\t\t\t\twhile (b != 0) {\n\t\t\t\t\tif (b == 1)\n\t\t\t\t\t\treturn p1;\n\t\t\t\t\tp0 += (a / b) * p1;\n\t\t\t\t\ta %= b;\n\n\t\t\t\t\tif (a == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (a == 1)\n\t\t\t\t\t\treturn modulus-p0;\n\n\t\t\t\t\tp1 += (b / a) * p0;\n\t\t\t\t\tb %= a;\n\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t\tpublic static BigInteger modInverse (BigInteger bi, BigInteger modulus)\n\t\t\t{\n\t\t\t\tif (modulus.length == 1) return modInverse (bi, modulus.data [0]);\n\n\t\t\t\tBigInteger [] p = { 0, 1 };\n\t\t\t\tBigInteger [] q = new BigInteger [2];    // quotients\n\t\t\t\tBigInteger [] r = { 0, 0 };             // remainders\n\n\t\t\t\tint step = 0;\n\n\t\t\t\tBigInteger a = modulus;\n\t\t\t\tBigInteger b = bi;\n\n\t\t\t\tModulusRing mr = new ModulusRing (modulus);\n\n\t\t\t\twhile (b != 0) {\n\n\t\t\t\t\tif (step > 1) {\n\n\t\t\t\t\t\tBigInteger pval = mr.Difference (p [0], p [1] * q [0]);\n\t\t\t\t\t\tp [0] = p [1]; p [1] = pval;\n\t\t\t\t\t}\n\n\t\t\t\t\tBigInteger [] divret = multiByteDivide (a, b);\n\n\t\t\t\t\tq [0] = q [1]; q [1] = divret [0];\n\t\t\t\t\tr [0] = r [1]; r [1] = divret [1];\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = divret [1];\n\n\t\t\t\t\tstep++;\n\t\t\t\t}\n\n\t\t\t\tif (r [0] != 1)\n\t\t\t\t\tthrow (new ArithmeticException (\"No inverse!\"));\n\n\t\t\t\treturn mr.Difference (p [0], p [1] * q [0]);\n\n\t\t\t}\n\t\t\t#endregion\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Mono/ConfidenceFactor.cs",
    "content": "//\n// Mono.Math.Prime.ConfidenceFactor.cs - Confidence factor for prime generation\n//\n// Authors:\n//\tBen Maurer\n//\n// Copyright (c) 2003 Ben Maurer. All rights reserved\n//\n\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nusing System;\n\nnamespace Mono.Math.Prime {\n\t/// <summary>\n\t/// A factor of confidence.\n\t/// </summary>\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tenum ConfidenceFactor {\n\t\t/// <summary>\n\t\t/// Only suitable for development use, probability of failure may be greater than 1/2^20.\n\t\t/// </summary>\n\t\tExtraLow,\n\t\t/// <summary>\n\t\t/// Suitable only for transactions which do not require forward secrecy.  Probability of failure about 1/2^40\n\t\t/// </summary>\n\t\tLow,\n\t\t/// <summary>\n\t\t/// Designed for production use. Probability of failure about 1/2^80.\n\t\t/// </summary>\n\t\tMedium,\n\t\t/// <summary>\n\t\t/// Suitable for sensitive data. Probability of failure about 1/2^160.\n\t\t/// </summary>\n\t\tHigh,\n\t\t/// <summary>\n\t\t/// Use only if you have lots of time! Probability of failure about 1/2^320.\n\t\t/// </summary>\n\t\tExtraHigh,\n\t\t/// <summary>\n\t\t/// Only use methods which generate provable primes. Not yet implemented.\n\t\t/// </summary>\n\t\tProvable\n\t}\n}\n"
  },
  {
    "path": "Mono/NextPrimeFinder.cs",
    "content": "//\n// Mono.Math.Prime.Generator.NextPrimeFinder.cs - Prime Generator\n//\n// Authors:\n//\tBen Maurer\n//\n// Copyright (c) 2003 Ben Maurer. All rights reserved\n//\n\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nusing System;\n\nnamespace Mono.Math.Prime.Generator {\n\n\t/// <summary>\n\t/// Finds the next prime after a given number.\n\t/// </summary>\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tclass NextPrimeFinder : SequentialSearchPrimeGeneratorBase {\n\t\t\n\t\tprotected override BigInteger GenerateSearchBase (int bits, object Context) \n\t\t{\n\t\t\tif (Context == null) \n\t\t\t\tthrow new ArgumentNullException (\"Context\");\n\n\t\t\tBigInteger ret = new BigInteger ((BigInteger)Context);\n\t\t\tret.SetBit (0);\n\t\t\treturn ret;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Mono/PrimalityTests.cs",
    "content": "//\n// Mono.Math.Prime.PrimalityTests.cs - Test for primality\n//\n// Authors:\n//\tBen Maurer\n//\n// Copyright (c) 2003 Ben Maurer. All rights reserved\n//\n\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nusing System;\n\nnamespace Mono.Math.Prime {\n\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tdelegate bool PrimalityTest (BigInteger bi, ConfidenceFactor confidence);\n\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tsealed class PrimalityTests {\n\n\t\tprivate PrimalityTests ()\n\t\t{\n\t\t}\n\n\t\t#region SPP Test\n\t\t\n\t\tprivate static int GetSPPRounds (BigInteger bi, ConfidenceFactor confidence)\n\t\t{\n\t\t\tint bc = bi.BitCount();\n\n\t\t\tint Rounds;\n\n\t\t\t// Data from HAC, 4.49\n\t\t\tif      (bc <= 100 ) Rounds = 27;\n\t\t\telse if (bc <= 150 ) Rounds = 18;\n\t\t\telse if (bc <= 200 ) Rounds = 15;\n\t\t\telse if (bc <= 250 ) Rounds = 12;\n\t\t\telse if (bc <= 300 ) Rounds =  9;\n\t\t\telse if (bc <= 350 ) Rounds =  8;\n\t\t\telse if (bc <= 400 ) Rounds =  7;\n\t\t\telse if (bc <= 500 ) Rounds =  6;\n\t\t\telse if (bc <= 600 ) Rounds =  5;\n\t\t\telse if (bc <= 800 ) Rounds =  4;\n\t\t\telse if (bc <= 1250) Rounds =  3;\n\t\t\telse\t\t     Rounds =  2;\n\n\t\t\tswitch (confidence) {\n\t\t\t\tcase ConfidenceFactor.ExtraLow:\n\t\t\t\t\tRounds >>= 2;\n\t\t\t\t\treturn Rounds != 0 ? Rounds : 1;\n\t\t\t\tcase ConfidenceFactor.Low:\n\t\t\t\t\tRounds >>= 1;\n\t\t\t\t\treturn Rounds != 0 ? Rounds : 1;\n\t\t\t\tcase ConfidenceFactor.Medium:\n\t\t\t\t\treturn Rounds;\n\t\t\t\tcase ConfidenceFactor.High:\n\t\t\t\t\treturn Rounds << 1;\n\t\t\t\tcase ConfidenceFactor.ExtraHigh:\n\t\t\t\t\treturn Rounds << 2;\n\t\t\t\tcase ConfidenceFactor.Provable:\n\t\t\t\t\tthrow new Exception (\"The Rabin-Miller test can not be executed in a way such that its results are provable\");\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new ArgumentOutOfRangeException (\"confidence\");\n\t\t\t}\n\t\t}\n\n\t\tpublic static bool Test (BigInteger n, ConfidenceFactor confidence)\n\t\t{\n\t\t\t// Rabin-Miller fails with smaller primes (at least with our BigInteger code)\n\t\t\tif (n.BitCount () < 33)\n\t\t\t\treturn SmallPrimeSppTest (n, confidence);\n\t\t\telse\n\t\t\t\treturn RabinMillerTest (n, confidence);\n\t\t}\n\n\t\t/// <summary>\n\t\t///     Probabilistic prime test based on Rabin-Miller's test\n\t\t/// </summary>\n\t\t/// <param name=\"n\" type=\"BigInteger.BigInteger\">\n\t\t///     <para>\n\t\t///         The number to test.\n\t\t///     </para>\n\t\t/// </param>\n\t\t/// <param name=\"confidence\" type=\"int\">\n\t\t///     <para>\n\t\t///\tThe number of chosen bases. The test has at least a\n\t\t///\t1/4^confidence chance of falsely returning True.\n\t\t///     </para>\n\t\t/// </param>\n\t\t/// <returns>\n\t\t///\t<para>\n\t\t///\t\tTrue if \"this\" is a strong pseudoprime to randomly chosen bases.\n\t\t///\t</para>\n\t\t///\t<para>\n\t\t///\t\tFalse if \"this\" is definitely NOT prime.\n\t\t///\t</para>\n\t\t/// </returns>\n\t\tpublic static bool RabinMillerTest (BigInteger n, ConfidenceFactor confidence)\n\t\t{\n\t\t\tint bits = n.BitCount ();\n\t\t\tint t = GetSPPRounds (bits, confidence);\n\n\t\t\t// n - 1 == 2^s * r, r is odd\n\t\t\tBigInteger n_minus_1 = n - 1;\n\t\t\tint s = n_minus_1.LowestSetBit ();\n\t\t\tBigInteger r = n_minus_1 >> s;\n\n\t\t\tBigInteger.ModulusRing mr = new BigInteger.ModulusRing (n);\n\t\t\t\n\t\t\t// Applying optimization from HAC section 4.50 (base == 2)\n\t\t\t// not a really random base but an interesting (and speedy) one\n\t\t\tBigInteger y = null;\n\t\t\t// FIXME - optimization disable for small primes due to bug #81857\n\t\t\tif (n.BitCount () > 100)\n\t\t\t\ty = mr.Pow (2, r);\n\n\t\t\t// still here ? start at round 1 (round 0 was a == 2)\n\t\t\tfor (int round = 0; round < t; round++) {\n\n\t\t\t\tif ((round > 0) || (y == null)) {\n\t\t\t\t\tBigInteger a = null;\n\n\t\t\t\t\t// check for 2 <= a <= n - 2\n\t\t\t\t\t// ...but we already did a == 2 previously as an optimization\n\t\t\t\t\tdo {\n\t\t\t\t\t\ta = BigInteger.GenerateRandom (bits);\n\t\t\t\t\t} while ((a <= 2) && (a >= n_minus_1));\n\n\t\t\t\t\ty = mr.Pow (a, r);\n\t\t\t\t}\n\n\t\t\t\tif (y == 1)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfor (int j = 0; ((j < s) && (y != n_minus_1)); j++) {\n\n\t\t\t\t\ty = mr.Pow (y, 2);\n\t\t\t\t\tif (y == 1)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (y != n_minus_1)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic static bool SmallPrimeSppTest (BigInteger bi, ConfidenceFactor confidence)\n\t\t{\n\t\t\tint Rounds = GetSPPRounds (bi, confidence);\n\n\t\t\t// calculate values of s and t\n\t\t\tBigInteger p_sub1 = bi - 1;\n\t\t\tint s = p_sub1.LowestSetBit ();\n\n\t\t\tBigInteger t = p_sub1 >> s;\n\n\n\t\t\tBigInteger.ModulusRing mr = new BigInteger.ModulusRing (bi);\n\n\t\t\tfor (int round = 0; round < Rounds; round++) {\n\n\t\t\t\tBigInteger b = mr.Pow (BigInteger.smallPrimes [round], t);\n\n\t\t\t\tif (b == 1) continue;              // a^t mod p = 1\n\n\t\t\t\tbool result = false;\n\t\t\t\tfor (int j = 0; j < s; j++) {\n\n\t\t\t\t\tif (b == p_sub1) {         // a^((2^j)*t) mod p = p-1 for some 0 <= j <= s-1\n\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tb = (b * b) % bi;\n\t\t\t\t}\n\n\t\t\t\tif (result == false)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t#endregion\n\n\t\t// TODO: Implement the Lucus test\n\t\t// TODO: Implement other new primality tests\n\t\t// TODO: Implement primality proving\n\t}\n}\n"
  },
  {
    "path": "Mono/PrimeGeneratorBase.cs",
    "content": "//\n// Mono.Math.Prime.Generator.PrimeGeneratorBase.cs - Abstract Prime Generator\n//\n// Authors:\n//\tBen Maurer\n//\n// Copyright (c) 2003 Ben Maurer. All rights reserved\n//\n\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nusing System;\n\nnamespace Mono.Math.Prime.Generator {\n\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tabstract class PrimeGeneratorBase {\n\n\t\tpublic virtual ConfidenceFactor Confidence {\n\t\t\tget {\n#if DEBUG\n\t\t\t\treturn ConfidenceFactor.ExtraLow;\n#else\n\t\t\t\treturn ConfidenceFactor.Medium;\n#endif\n\t\t\t}\n\t\t}\n\n\t\tpublic virtual Prime.PrimalityTest PrimalityTest {\n\t\t\tget {\n\t\t\t\treturn new Prime.PrimalityTest (PrimalityTests.RabinMillerTest);\n\t\t\t}\n\t\t}\n\n\t\tpublic virtual int TrialDivisionBounds {\n\t\t\tget { return 4000; }\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Performs primality tests on bi, assumes trial division has been done.\n\t\t/// </summary>\n\t\t/// <param name=\"bi\">A BigInteger that has been subjected to and passed trial division</param>\n\t\t/// <returns>False if bi is composite, true if it may be prime.</returns>\n\t\t/// <remarks>The speed of this method is dependent on Confidence</remarks>\n\t\tprotected bool PostTrialDivisionTests (BigInteger bi)\n\t\t{\n\t\t\treturn PrimalityTest (bi, this.Confidence);\n\t\t}\n\n\t\tpublic abstract BigInteger GenerateNewPrime (int bits);\n\t}\n}\n"
  },
  {
    "path": "Mono/SequentialSearchPrimeGeneratorBase.cs",
    "content": "//\n// Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase.cs - Prime Generator\n//\n// Authors:\n//\tBen Maurer\n//\n// Copyright (c) 2003 Ben Maurer. All rights reserved\n// Copyright (C) 2004 Novell, Inc (http://www.novell.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining\n// a copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to\n// the following conditions:\n// \n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nnamespace Mono.Math.Prime.Generator {\n\n#if INSIDE_CORLIB\n\tinternal\n#else\n\tpublic\n#endif\n\tclass SequentialSearchPrimeGeneratorBase : PrimeGeneratorBase {\n\n\t\tprotected virtual BigInteger GenerateSearchBase (int bits, object context)\n\t\t{\n\t\t\tBigInteger ret = BigInteger.GenerateRandom (bits);\n\t\t\tret.SetBit (0);\n\t\t\treturn ret;\n\t\t}\n\n\n\t\tpublic override BigInteger GenerateNewPrime (int bits)\n\t\t{\n\t\t\treturn GenerateNewPrime (bits, null);\n\t\t}\n\n\n\t\tpublic virtual BigInteger GenerateNewPrime (int bits, object context)\n\t\t{\n\t\t\t//\n\t\t\t// STEP 1. Find a place to do a sequential search\n\t\t\t//\n\t\t\tBigInteger curVal = GenerateSearchBase (bits, context);\n\n\t\t\tconst uint primeProd1 = 3u* 5u * 7u * 11u * 13u * 17u * 19u * 23u * 29u;\n\n\t\t\tuint pMod1 = curVal % primeProd1;\n\n\t\t\tint DivisionBound = TrialDivisionBounds;\n\t\t\tuint[] SmallPrimes = BigInteger.smallPrimes;\n\t\t\t//\n\t\t\t// STEP 2. Search for primes\n\t\t\t//\n\t\t\twhile (true) {\n\n\t\t\t\t//\n\t\t\t\t// STEP 2.1 Sieve out numbers divisible by the first 9 primes\n\t\t\t\t//\n\t\t\t\tif (pMod1 %  3 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 %  5 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 %  7 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 11 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 13 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 17 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 19 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 23 == 0) goto biNotPrime;\n\t\t\t\tif (pMod1 % 29 == 0) goto biNotPrime;\n\n\t\t\t\t//\n\t\t\t\t// STEP 2.2 Sieve out all numbers divisible by the primes <= DivisionBound\n\t\t\t\t//\n\t\t\t\tfor (int p = 10; p < SmallPrimes.Length && SmallPrimes [p] <= DivisionBound; p++) {\n\t\t\t\t\tif (curVal % SmallPrimes [p] == 0)\n\t\t\t\t\t\tgoto biNotPrime;\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// STEP 2.3 Is the potential prime acceptable?\n\t\t\t\t//\n\t\t\t\tif (!IsPrimeAcceptable (curVal, context))\n\t\t\t\t\tgoto biNotPrime;\n\n\t\t\t\t//\n\t\t\t\t// STEP 2.4 Filter out all primes that pass this step with a primality test\n\t\t\t\t//\n\t\t\t\tif (PrimalityTest (curVal, Confidence))\n\t\t\t\t\treturn curVal;\n\n\t\t\t\t//\n\t\t\t\t// STEP 2.4\n\t\t\t\t//\n\t\t\tbiNotPrime:\n\t\t\t\tpMod1 += 2;\n\t\t\t\tif (pMod1 >= primeProd1)\n\t\t\t\t\tpMod1 -= primeProd1;\n\t\t\t\tcurVal.Incr2 ();\n\t\t\t}\n\t\t}\n\n\t\tprotected virtual bool IsPrimeAcceptable (BigInteger bi, object context)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "Prf10.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Security.Cryptography;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Implements the TLS 1.0 Pseudorandom Function (PRF)\n    /// </summary>\n    /// <remarks>\n    /// The bulk of comments come from Section 5 of RFC 2246.\n    /// Note that the PRF changed notably between TLS 1.0 and TLS 1.2. Only the 1.0 version is\n    /// implemented here.\n    /// </remarks>\n    public static class Prf10\n    {\n        // PRF(secret, label, seed) = P_MD5(S1, label + seed) XOR\n        //                            P_SHA-1(S2, label + seed);\n\n        /// <summary>\n        /// Generates bytes using the TLS 1.0 Pseudo-Random Function\n        /// </summary>\n        /// <param name=\"secret\">The secret used for deriving bytes.</param>\n        /// <param name=\"label\">The ASCII label to use for deriving bytes.</param>\n        /// <param name=\"seed\">The seed used to derive bytes.</param>\n        /// <param name=\"bytesToGenerate\">The total number of bytes to generate.</param>\n        /// <returns><paramref name=\"bytesToGenerate\"/> derived bytes using the TLS 1.0 PRF function.</returns>\n        public static byte[] GenerateBytes(byte[] secret, string label, byte[] seed, int bytesToGenerate)\n        {            \n            byte[] labelBytes = label.ToAsciiBytes();\n            byte[] labelAndSeed = new byte[labelBytes.Length + seed.Length];\n\n            // labelAndSeed = label + seed\n            Buffer.BlockCopy(labelBytes, 0, labelAndSeed, 0, labelBytes.Length);\n            Buffer.BlockCopy(seed, 0, labelAndSeed, labelBytes.Length, seed.Length);\n\n            byte[] s1;\n            byte[] s2;\n            Split(secret, out s1, out s2);\n\n            byte[] pMD5 = PMD5(s1, labelAndSeed, bytesToGenerate);\n            byte[] pSHA1 = PSHA1(s2, labelAndSeed, bytesToGenerate);\n\n            byte[] result = new byte[pMD5.Length];\n\n            for (int i = 0; i < result.Length; i++)\n            {\n                result[i] = (byte) (pMD5[i] ^ pSHA1[i]);\n            }\n\n            return result;\n        }\n\n        // (from Section 5 of RFC 2246)\n        // TLS's PRF is created by splitting the secret into two halves and\n        // using one half to generate data with P_MD5 and the other half to\n        // generate data with P_SHA-1, then exclusive-or'ing the outputs of\n        // these two expansion functions together.\n\n        // S1 and S2 are the two halves of the secret and each is the same\n        // length. S1 is taken from the first half of the secret, S2 from the\n        // second half. Their length is created by rounding up the length of the\n        // overall secret divided by two; thus, if the original secret is an odd\n        // number of bytes long, the last byte of S1 will be the same as the\n        // first byte of S2.\n\n        //    L_S = length in bytes of secret;\n        //    L_S1 = L_S2 = ceil(L_S / 2);\n\n        internal static void Split(byte[] input, out byte[] s1, out byte[] s2)\n        {\n            int padding = (input.Length % 2);\n            int halfSize = (input.Length / 2) + padding;\n\n            s1 = new byte[halfSize];\n            Buffer.BlockCopy(input, 0, s1, 0, halfSize);\n\n            s2 = new byte[halfSize];\n            Buffer.BlockCopy(input, input.Length - halfSize, s2, 0, halfSize);\n        }\n\n        // From section 5 of RFC 2246\n        // P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +\n        //                        HMAC_hash(secret, A(2) + seed) +\n        //                        HMAC_hash(secret, A(3) + seed) + ...\n\n        //   A() is defined as:\n        //       A(0) = seed\n        //       A(i) = HMAC_hash(secret, A(i-1))\n\n        private static byte[] PHash(HMAC hmac, byte[] seed, int bytesToGenerate)\n        {\n            using(MemoryStream bytesToHashBuffer = new MemoryStream())\n            using (MemoryStream output = new MemoryStream())\n            {\n                byte[] previousA = seed;\n\n                while (output.Length < bytesToGenerate)\n                {\n                    bytesToHashBuffer.SetLength(0);\n\n                    byte[] currentA = A(hmac, previousA);\n                    bytesToHashBuffer.Write(currentA, 0, currentA.Length);\n                    bytesToHashBuffer.Write(seed, 0, seed.Length);\n\n                    byte[] currentBuffer = bytesToHashBuffer.GetBuffer();\n\n                    byte[] currentRoundResult = hmac.ComputeHash(currentBuffer, 0, (int) bytesToHashBuffer.Length);\n                    output.Write(currentRoundResult, 0, currentRoundResult.Length);\n                    previousA = currentA;\n                }\n\n                output.SetLength(bytesToGenerate);\n\n                return output.ToArray();\n            }            \n        }\n\n        private static byte[] A(HMAC hmac, byte[] aMinus1Result)\n        {            \n            return hmac.ComputeHash(aMinus1Result);\n        }\n\n        private static byte[] PMD5(byte[] secret, byte[] seed, int bytesDesired)\n        {\n            return PHash(new HMACMD5(secret), seed, bytesDesired);\n        }\n\n        private static byte[] PSHA1(byte[] secret, byte[] seed, int bytesDesired)\n        {\n            return PHash(new HMACSHA1(secret), seed, bytesDesired);            \n        }        \n    }\n}\n"
  },
  {
    "path": "Program.cs",
    "content": "﻿using System;\nusing System.Windows.Forms;\n\nnamespace Moserware.TlsAnalyzer\n{\n    static class Program\n    {\n        /// <summary>\n        /// The main entry point for the application.\n        /// </summary>\n        [STAThread]\n        static void Main()\n        {\n            Application.EnableVisualStyles();\n            Application.SetCompatibleTextRenderingDefault(false);\n            Application.Run(new MainForm());\n        }\n    }\n}\n"
  },
  {
    "path": "Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"TlsAnalyzer\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Moserware\")]\n[assembly: AssemblyProduct(\"TlsAnalyzer\")]\n[assembly: AssemblyCopyright(\"Copyright © Jeff Moser 2009\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"ec6f55e1-1d54-45c5-bfdc-a49fa3cf7f7d\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n\n[assembly: InternalsVisibleTo(\"TlsAnalyzer.UnitTests\")]\n"
  },
  {
    "path": "Properties/Settings.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:2.0.50727.3074\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace Moserware.TlsAnalyzer.Properties {\n    \n    \n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"9.0.0.0\")]\n    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n        \n        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n        \n        public static Settings Default {\n            get {\n                return defaultInstance;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"ABABABABABABABABABABABABABABABAB ABABABABABABABABABABABABABABABAB ABABABABABABABA\" +\n            \"BABABABABABABABAB\")]\n        public string PrfSecretBytes {\n            get {\n                return ((string)(this[\"PrfSecretBytes\"]));\n            }\n            set {\n                this[\"PrfSecretBytes\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"PRF Testvector\")]\n        public string PrfLabel {\n            get {\n                return ((string)(this[\"PrfLabel\"]));\n            }\n            set {\n                this[\"PrfLabel\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDC\" +\n            \"DCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD\")]\n        public string PrfSeedBytes {\n            get {\n                return ((string)(this[\"PrfSeedBytes\"]));\n            }\n            set {\n                this[\"PrfSeedBytes\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"104\")]\n        public decimal PrfBytesToGenerate {\n            get {\n                return ((decimal)(this[\"PrfBytesToGenerate\"]));\n            }\n            set {\n                this[\"PrfBytesToGenerate\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"Jefe\")]\n        public string HmacKey {\n            get {\n                return ((string)(this[\"HmacKey\"]));\n            }\n            set {\n                this[\"HmacKey\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"what do ya want for nothing?\")]\n        public string HmacData {\n            get {\n                return ((string)(this[\"HmacData\"]));\n            }\n            set {\n                this[\"HmacData\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"4456: SSL[131491792]: Pre-Master Secret [Len: 48]\n   03 01 bb 7b 08 98 a7 49 de e8 e9 b8 91 52 ec 81   ...{...I.....R..\n   4c c2 39 7b f6 ba 1c 0a b1 95 50 29 be 02 ad e6   L.9{......P)....\n   ad 6e 11 3f 20 c4 66 f0 64 22 57 7e e1 06 7a 3b   .n.? .f.d\"\"W~..z;\n\")]\n        public string PreMasterSecret {\n            get {\n                return ((string)(this[\"PreMasterSecret\"]));\n            }\n            set {\n                this[\"PreMasterSecret\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"4a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982\")]\n        public string ClientRandomBytes {\n            get {\n                return ((string)(this[\"ClientRandomBytes\"]));\n            }\n            set {\n                this[\"ClientRandomBytes\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"4a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c13\")]\n        public string ServerRandomBytes {\n            get {\n                return ((string)(this[\"ServerRandomBytes\"]));\n            }\n            set {\n                this[\"ServerRandomBytes\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"0100009a03014a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982000044c00ac0140088008700390038c00fc00500840035c007c009c011c0130045004400330032c00cc00ec002c004004100040005002fc008c01200160013c00dc003feff000a0100002d00000013001100000e7777772e616d617a6f6e2e636f6d000a00080006001700180019000b0002010000230000\")]\n        public string ClientHello {\n            get {\n                return ((string)(this[\"ClientHello\"]));\n            }\n            set {\n                this[\"ClientHello\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"0200004603014a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c1320acd\" +\n            \"07167996609e3584d15c2d43596d8ab93cfa9e899a82aa1652b8ab667a12b000400\")]\n        public string ServerHello {\n            get {\n                return ((string)(this[\"ServerHello\"]));\n            }\n            set {\n                this[\"ServerHello\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"0b0009a000099d0004f7308204f3308203dba0030201020210169d041c3130be3d566606f2679ba17\" +\n            \"2300d06092a864886f70d01010505003081b0310b300906035504061302555331173015060355040\" +\n            \"a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757\" +\n            \"374204e6574776f726b313b3039060355040b13325465726d73206f6620757365206174206874747\" +\n            \"0733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031\" +\n            \"321566572695369676e20436c61737320332053656375726520536572766572204341301e170d303\" +\n            \"8303832373030303030305a170d3039303832373233353935395a3067310b3009060355040613025\" +\n            \"553311330110603550408130a57617368696e67746f6e3110300e0603550407140753656174746c6\" +\n            \"531183016060355040a140f416d617a6f6e2e636f6d20496e632e311730150603550403140e77777\" +\n            \"72e616d617a6f6e2e636f6d30819f300d06092a864886f70d010101050003818d003081890281810\" +\n            \"0c5176d5880046305c91466c7b7f2ed05d6f3f528212f0e829c86dbf35981cd6f5c669aff9e2d937\" +\n            \"38e795a347501aa7bb90379fc085405827744914d160f2f3ade9a793413eba875e323e5a82ba577b\" +\n            \"45d0908be25ccd5fd44916971f9a772533d7edffcf7cc84241cc803cd8e5764ea121169c988670e1\" +\n            \"c28550351a58b2adb0203010001a38201d3308201cf30090603551d1304023000300b0603551d0f0\" +\n            \"404030205a030440603551d1f043d303b3039a037a0358633687474703a2f2f53565253656375726\" +\n            \"52d63726c2e766572697369676e2e636f6d2f535652536563757265323030352e63726c304406035\" +\n            \"51d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747\" +\n            \"470733a2f2f7777772e766572697369676e2e636f6d2f727061301d0603551d250416301406082b0\" +\n            \"601050507030106082b06010505070302301f0603551d230418301680146fecafa0dd8aa4eff52a1\" +\n            \"0672d3f5582bcd7ef25307906082b06010505070101046d306b302406082b0601050507300186186\" +\n            \"87474703a2f2f6f6373702e766572697369676e2e636f6d304306082b06010505073002863768747\" +\n            \"4703a2f2f5356525365637572652d6169612e766572697369676e2e636f6d2f53565253656375726\" +\n            \"5323030352d6169612e636572306e06082b0601050507010c04623060a15ea05c305a30583056160\" +\n            \"9696d6167652f6769663021301f300706052b0e03021a04144b6bb92896060cbbd052389b29ac4b0\" +\n            \"78b21051830261624687474703a2f2f6c6f676f2e766572697369676e2e636f6d2f76736c6f676f3\" +\n            \"12e676966300d06092a864886f70d010105050003820101003feb3eff141d141d684f6d0c571d2c0\" +\n            \"5e0df6161174a949272d043c6d5f20172193abba420fda6f193312c6d8b91ad6a41c993b2f99cf68\" +\n            \"0d3767049d067447c4b43864f91e2c3c2f6f0703f7d3044e77ec83058ce81634773cdcb019301e91\" +\n            \"89cba318316a793b5f9f5230ff832d2d661f7c05587666cd757052ce5967ec836743aa68b526903d\" +\n            \"09db325bb8547892d5c924ae3ff3fa9a854d4d84a9b7af7a8cd8237db964c843a876b8385d955d64\" +\n            \"fcb2aacf40b15e8a06e0491c3bc6892a420d828af09738ff492fc23b9c521d7cff6175fba59cbd0c\" +\n            \"dd5b9f99876fad5fa98904a2338330336d66906cd196f8b8b173070aef1d14f8c18c38fefc328667\" +\n            \"30004a03082049c30820405a003020102021075337d9ab0e1233bae2d7de4469162d4300d06092a8\" +\n            \"64886f70d0101050500305f310b300906035504061302555331173015060355040a130e566572695\" +\n            \"369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6\" +\n            \"172792043657274696669636174696f6e20417574686f72697479301e170d3035303131393030303\" +\n            \"030305a170d3135303131383233353935395a3081b0310b300906035504061302555331173015060\" +\n            \"355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205\" +\n            \"472757374204e6574776f726b313b3039060355040b13325465726d73206f6620757365206174206\" +\n            \"8747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035\" +\n            \"504031321566572695369676e20436c6173732033205365637572652053657276657220434130820\" +\n            \"122300d06092a864886f70d01010105000382010f003082010a028201010095c321128e40c50d015\" +\n            \"f765e6694d9732c581922b8c9fc7a39902a77727c1d3ef7d855e3af42cb873002dc5bac70e6b844b\" +\n            \"42b35eb93d217057ecb46d65c53a032519d746458f90c9a00ea5e44496472f4cd10e2850af934eeb\" +\n            \"38866a9a5a45ad00e987f580d2b52bb86a97e2efab2487c8ddb2d5f0175a28d063b8bb46107c9be2\" +\n            \"299f81bd1b55766044d35f4917196b59908259b97c83af320b1dd9e980c4a63b7a6ceb001cef8936\" +\n            \"af30c6e9fb1e9847b819841e681dc3d2ce7b46be39efc0816d7b3d5b96612997c6d71c84dbec70fe\" +\n            \"3fb37add57587216b86d044145a547939966956c9b931cd896158e1d9760505adf7b902afa7fd479\" +\n            \"1a222345a31d10203010001a38201813082017d30120603551d130101ff040830060101ff0201003\" +\n            \"0440603551d20043d303b3039060b6086480186f84501071703302a302806082b060105050702011\" +\n            \"61c68747470733a2f2f7777772e766572697369676e2e636f6d2f72706130310603551d1f042a302\" +\n            \"83026a024a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726\" +\n            \"c300e0603551d0f0101ff040403020106301106096086480186f8420101040403020106302906035\" +\n            \"51d1104223020a41e301c311a301806035504031311436c617373334341323034382d312d3435301\" +\n            \"d0603551d0e041604146fecafa0dd8aa4eff52a10672d3f5582bcd7ef253081800603551d2304793\" +\n            \"077a163a461305f310b300906035504061302555331173015060355040a130e566572695369676e2\" +\n            \"c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d617279204\" +\n            \"3657274696669636174696f6e20417574686f72697479821070bae41d10d92934b638ca7b03ccbab\" +\n            \"f300d06092a864886f70d010105050003818100c37e08465d9136cf67dcd7a7afafb822c38b0474d\" +\n            \"3b160bce6feb74412815b3173146356c6722ed11a03435c380a504a4dcddab619a8f4990dafe3f7d\" +\n            \"8f1752865f66afe9bf4bd52d93fcbda16cba59e2e8e6652783d26fafe9436884a955e2a4c19ef6ef\" +\n            \"a823f2d03efd628b33718cf42b234216447d3206b3a4cdce603900c\")]\n        public string ServerHelloCertificate {\n            get {\n                return ((string)(this[\"ServerHelloCertificate\"]));\n            }\n            set {\n                this[\"ServerHelloCertificate\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"0e000000\")]\n        public string ServerHelloDone {\n            get {\n                return ((string)(this[\"ServerHelloDone\"]));\n            }\n            set {\n                this[\"ServerHelloDone\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"1000008200808c0863cc016cd036efa22889e1611a8a03304366ebb04da1cb918548e024f488a155cd85030b5bd7e67a9da2019089ceba571100051cafceeff42b3fe630f26e7d55e6d6c80976851da2517e28bf831ebe0bed601c9b00c52ea62238eda3fb7edd689ac2addc2341ba30f0cd95604885ed448e828346c3b71206ae48114eb2da\")]\n        public string ClientEncryptedKeyExchange {\n            get {\n                return ((string)(this[\"ClientEncryptedKeyExchange\"]));\n            }\n            set {\n                this[\"ClientEncryptedKeyExchange\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"6a207a41660bd66cf7be3f41ded028c24a612db5301673c1e6317a42222c2f96\")]\n        public string ClientEncryptedFinishedMessage {\n            get {\n                return ((string)(this[\"ClientEncryptedFinishedMessage\"]));\n            }\n            set {\n                this[\"ClientEncryptedFinishedMessage\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(\"4c95745d193fd3d4645d95280a49b80e02d4d479b44475cae3527b9e808ecc69\")]\n        public string ServerEncryptedFinishedMessage {\n            get {\n                return ((string)(this[\"ServerEncryptedFinishedMessage\"]));\n            }\n            set {\n                this[\"ServerEncryptedFinishedMessage\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"183AF27ABF7AE61392D03958A7D4CC9D7B37CF30A52DFD2DD9546538FE2E9DB30A49AF7AB7265E56F12E07D12359DDE4456F222E8F135187A095817D4CDE3C66A54AEE91F9F347D076E81C1C6D533CB11BD3193EBDC5E5F711DC42B099559E287A7FA0867AEB830B6CC076A7E6665BBD341BA0E31CBCF3D9A067AD7B4038A1F3BDB3BCE7790E27E2FFF67E5D3518405E37D6A66A76F6E1DBA32DB9A69BDCDE33002627051E1BDBFBF64F6D3FB33EE301139ADA7D03F5F00AC193D3EB05D83198D2EB722848E8ABBC97FE529863E54A098621E6DE5F00DA7BC70DB6FDCD11F9DDE3C33AB15DFBFADD8F8D90E564B2D4DB1E25F5FE28E4D748AD01E42CEE5B30745404C4324C1CC4A421F85C65019B87A9C5CFCCB34D90D45195E28E6E30686D77B4F2F727DB2F583F7137BC0F1D22D59DF897C2B14C77B4C50BA97F88C7CB38B3478FE825970250851A95C9D546D6BB39B265CBBF944F35D0F0924D8D9F4BC05A7D7C55165F81D81B52F0B0BF92D6FDB67C35079B286E0886ACC380C047A031FC6FB5B46DA45D81EBC440CD34229282FDE09FCFCA8E28C0C11DFF664CB486C11BA64A70E73192A66951E206492713173CDDC988515D973E1531155C548E6D8FF5AD623F6C009D2916F1B45E9A0FE80EED21B29A200975EAFAFC982104482A8BEB4DCA45B605E3B2F9984B6E51FEFE86C5B82FC0C9CBA092070450A14D\")]\n        public string ClientApplicationData {\n            get {\n                return ((string)(this[\"ClientApplicationData\"]));\n            }\n            set {\n                this[\"ClientApplicationData\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"7FEF3541D25C5F37F46461988729B6EF873D59F35C844B1BFA23D1F257C670FB2E26E6FD5F5162849401E966D1E65EE39FAFB65D1B882F6E3284B1B473B00749F00AA656C8496C9FB09FD62E6D5A09ABA51BB474A63B521A28702A74B24E658065DAA1793D971FD5DD7B433BC9EBBFA1E3B92A4FF35A496740EA9691C1F4A57CAA28213DB2CAEF38E4D94CFEE4102FF34EC669280F0303A24025581E281F4F421917F169329F730B5C62CF68EF3CCEBCDCCE3E9DF78652F1A43E4986B9DE9CC2F7DA5563A34CF417EFD045EF46DAAD8CA3D72E50E4F3B0D4323399AE647DF8A7B9A12E103E0C79A222F798BC9C2317D85929C6E73C96EE03CC63B0FF2F4C94E411B9A6F536AFD7BDBAD279171CD6C39B2018161889A18998BCB92B4D250CD6249F6763BCAF1E03ED12DA38D5D71C79CAAFDB0BA823E702645852D923577F35CC82F59A5AF91B13901042F9AB4CAAD09CFD6226FA4AA92F14D96698E639245BF2F247927EE92466395A16EF31949EBD75428E57D43848E15C66F44E207A69AD301F9CE5826ABFEBCA4927D1BED3331CEEFB9E8C959C97245CB65EDF7EA24F31FC59BC312DA9A3AE81E3C34418ED69FAC2FFAC61D90BE93521633CD10266334F6AE59A69B6B733CE1A6E01D119B91FCAC2571062C0EB2FC79601405D1F349213AED9E9D520DAD50F9FE6E39CE9B96607D6934CBF1C0870F1761A7421BCBCED09D3896012B92281D1E1CB92\n4939489ACA4CB1FFE5D096AA9F944746\")]\n        public string ServerApplicationData {\n            get {\n                return ((string)(this[\"ServerApplicationData\"]));\n            }\n            set {\n                this[\"ServerApplicationData\"] = value;\n            }\n        }\n        \n        [global::System.Configuration.UserScopedSettingAttribute()]\n        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n        [global::System.Configuration.DefaultSettingValueAttribute(@\"00 02 12 A3 EA B1 65 D6 81 6C 13 14 13 62 10 53 23 B3 96 85 FF 24 FA CC 46 11 21 24 A4 81 EA 30 63 95 D4 DC BF 9C CC D0 2E DD 5A A6 41 6A 4E 82 65 7D 70 7D 50 09 17 CD 10 55 97 B9 C1 A1 84 F2 A9 AB EA 7D F4 CC 54 E4 64 6E 3A E5 91 A0 06 00 03 01 BB 7B 08 98 A7 49 DE E8 E9 B8 91 52 EC 81 4C C2 39 7B F6 BA 1C 0A B1 95 50 29 BE 02 AD E6 AD 6E 11 3F 20 C4 66 F0 64 22 57 7E E1 06 7A 3B\")]\n        public string DecryptedClientKeyExchange {\n            get {\n                return ((string)(this[\"DecryptedClientKeyExchange\"]));\n            }\n            set {\n                this[\"DecryptedClientKeyExchange\"] = value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Properties/Settings.settings",
    "content": "﻿<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\" CurrentProfile=\"(Default)\" GeneratedClassNamespace=\"Moserware.TlsAnalyzer.Properties\" GeneratedClassName=\"Settings\">\n  <Profiles />\n  <Settings>\n    <Setting Name=\"PrfSecretBytes\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">ABABABABABABABABABABABABABABABAB ABABABABABABABABABABABABABABABAB ABABABABABABABABABABABABABABABAB</Value>\n    </Setting>\n    <Setting Name=\"PrfLabel\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">PRF Testvector</Value>\n    </Setting>\n    <Setting Name=\"PrfSeedBytes\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD</Value>\n    </Setting>\n    <Setting Name=\"PrfBytesToGenerate\" Type=\"System.Decimal\" Scope=\"User\">\n      <Value Profile=\"(Default)\">104</Value>\n    </Setting>\n    <Setting Name=\"HmacKey\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">Jefe</Value>\n    </Setting>\n    <Setting Name=\"HmacData\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">what do ya want for nothing?</Value>\n    </Setting>\n    <Setting Name=\"PreMasterSecret\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">4456: SSL[131491792]: Pre-Master Secret [Len: 48]\n   03 01 bb 7b 08 98 a7 49 de e8 e9 b8 91 52 ec 81   ...{...I.....R..\n   4c c2 39 7b f6 ba 1c 0a b1 95 50 29 be 02 ad e6   L.9{......P)....\n   ad 6e 11 3f 20 c4 66 f0 64 22 57 7e e1 06 7a 3b   .n.? .f.d\"W~..z;\n</Value>\n    </Setting>\n    <Setting Name=\"ClientRandomBytes\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">4a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982</Value>\n    </Setting>\n    <Setting Name=\"ServerRandomBytes\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">4a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c13</Value>\n    </Setting>\n    <Setting Name=\"ClientHello\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">0100009a03014a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982000044c00ac0140088008700390038c00fc00500840035c007c009c011c0130045004400330032c00cc00ec002c004004100040005002fc008c01200160013c00dc003feff000a0100002d00000013001100000e7777772e616d617a6f6e2e636f6d000a00080006001700180019000b0002010000230000</Value>\n    </Setting>\n    <Setting Name=\"ServerHello\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">0200004603014a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c1320acd07167996609e3584d15c2d43596d8ab93cfa9e899a82aa1652b8ab667a12b000400</Value>\n    </Setting>\n    <Setting Name=\"ServerHelloCertificate\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">0b0009a000099d0004f7308204f3308203dba0030201020210169d041c3130be3d566606f2679ba172300d06092a864886f70d01010505003081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c61737320332053656375726520536572766572204341301e170d3038303832373030303030305a170d3039303832373233353935395a3067310b3009060355040613025553311330110603550408130a57617368696e67746f6e3110300e0603550407140753656174746c6531183016060355040a140f416d617a6f6e2e636f6d20496e632e311730150603550403140e7777772e616d617a6f6e2e636f6d30819f300d06092a864886f70d010101050003818d0030818902818100c5176d5880046305c91466c7b7f2ed05d6f3f528212f0e829c86dbf35981cd6f5c669aff9e2d93738e795a347501aa7bb90379fc085405827744914d160f2f3ade9a793413eba875e323e5a82ba577b45d0908be25ccd5fd44916971f9a772533d7edffcf7cc84241cc803cd8e5764ea121169c988670e1c28550351a58b2adb0203010001a38201d3308201cf30090603551d1304023000300b0603551d0f0404030205a030440603551d1f043d303b3039a037a0358633687474703a2f2f5356525365637572652d63726c2e766572697369676e2e636f6d2f535652536563757265323030352e63726c30440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f727061301d0603551d250416301406082b0601050507030106082b06010505070302301f0603551d230418301680146fecafa0dd8aa4eff52a10672d3f5582bcd7ef25307906082b06010505070101046d306b302406082b060105050730018618687474703a2f2f6f6373702e766572697369676e2e636f6d304306082b060105050730028637687474703a2f2f5356525365637572652d6169612e766572697369676e2e636f6d2f535652536563757265323030352d6169612e636572306e06082b0601050507010c04623060a15ea05c305a305830561609696d6167652f6769663021301f300706052b0e03021a04144b6bb92896060cbbd052389b29ac4b078b21051830261624687474703a2f2f6c6f676f2e766572697369676e2e636f6d2f76736c6f676f312e676966300d06092a864886f70d010105050003820101003feb3eff141d141d684f6d0c571d2c05e0df6161174a949272d043c6d5f20172193abba420fda6f193312c6d8b91ad6a41c993b2f99cf680d3767049d067447c4b43864f91e2c3c2f6f0703f7d3044e77ec83058ce81634773cdcb019301e9189cba318316a793b5f9f5230ff832d2d661f7c05587666cd757052ce5967ec836743aa68b526903d09db325bb8547892d5c924ae3ff3fa9a854d4d84a9b7af7a8cd8237db964c843a876b8385d955d64fcb2aacf40b15e8a06e0491c3bc6892a420d828af09738ff492fc23b9c521d7cff6175fba59cbd0cdd5b9f99876fad5fa98904a2338330336d66906cd196f8b8b173070aef1d14f8c18c38fefc32866730004a03082049c30820405a003020102021075337d9ab0e1233bae2d7de4469162d4300d06092a864886f70d0101050500305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479301e170d3035303131393030303030305a170d3135303131383233353935395a3081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c6173732033205365637572652053657276657220434130820122300d06092a864886f70d01010105000382010f003082010a028201010095c321128e40c50d015f765e6694d9732c581922b8c9fc7a39902a77727c1d3ef7d855e3af42cb873002dc5bac70e6b844b42b35eb93d217057ecb46d65c53a032519d746458f90c9a00ea5e44496472f4cd10e2850af934eeb38866a9a5a45ad00e987f580d2b52bb86a97e2efab2487c8ddb2d5f0175a28d063b8bb46107c9be2299f81bd1b55766044d35f4917196b59908259b97c83af320b1dd9e980c4a63b7a6ceb001cef8936af30c6e9fb1e9847b819841e681dc3d2ce7b46be39efc0816d7b3d5b96612997c6d71c84dbec70fe3fb37add57587216b86d044145a547939966956c9b931cd896158e1d9760505adf7b902afa7fd4791a222345a31d10203010001a38201813082017d30120603551d130101ff040830060101ff02010030440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f72706130310603551d1f042a30283026a024a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726c300e0603551d0f0101ff040403020106301106096086480186f842010104040302010630290603551d1104223020a41e301c311a301806035504031311436c617373334341323034382d312d3435301d0603551d0e041604146fecafa0dd8aa4eff52a10672d3f5582bcd7ef253081800603551d2304793077a163a461305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479821070bae41d10d92934b638ca7b03ccbabf300d06092a864886f70d010105050003818100c37e08465d9136cf67dcd7a7afafb822c38b0474d3b160bce6feb74412815b3173146356c6722ed11a03435c380a504a4dcddab619a8f4990dafe3f7d8f1752865f66afe9bf4bd52d93fcbda16cba59e2e8e6652783d26fafe9436884a955e2a4c19ef6efa823f2d03efd628b33718cf42b234216447d3206b3a4cdce603900c</Value>\n    </Setting>\n    <Setting Name=\"ServerHelloDone\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">0e000000</Value>\n    </Setting>\n    <Setting Name=\"ClientEncryptedKeyExchange\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">1000008200808c0863cc016cd036efa22889e1611a8a03304366ebb04da1cb918548e024f488a155cd85030b5bd7e67a9da2019089ceba571100051cafceeff42b3fe630f26e7d55e6d6c80976851da2517e28bf831ebe0bed601c9b00c52ea62238eda3fb7edd689ac2addc2341ba30f0cd95604885ed448e828346c3b71206ae48114eb2da</Value>\n    </Setting>\n    <Setting Name=\"ClientEncryptedFinishedMessage\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">6a207a41660bd66cf7be3f41ded028c24a612db5301673c1e6317a42222c2f96</Value>\n    </Setting>\n    <Setting Name=\"ServerEncryptedFinishedMessage\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">4c95745d193fd3d4645d95280a49b80e02d4d479b44475cae3527b9e808ecc69</Value>\n    </Setting>\n    <Setting Name=\"ClientApplicationData\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">183AF27ABF7AE61392D03958A7D4CC9D7B37CF30A52DFD2DD9546538FE2E9DB30A49AF7AB7265E56F12E07D12359DDE4456F222E8F135187A095817D4CDE3C66A54AEE91F9F347D076E81C1C6D533CB11BD3193EBDC5E5F711DC42B099559E287A7FA0867AEB830B6CC076A7E6665BBD341BA0E31CBCF3D9A067AD7B4038A1F3BDB3BCE7790E27E2FFF67E5D3518405E37D6A66A76F6E1DBA32DB9A69BDCDE33002627051E1BDBFBF64F6D3FB33EE301139ADA7D03F5F00AC193D3EB05D83198D2EB722848E8ABBC97FE529863E54A098621E6DE5F00DA7BC70DB6FDCD11F9DDE3C33AB15DFBFADD8F8D90E564B2D4DB1E25F5FE28E4D748AD01E42CEE5B30745404C4324C1CC4A421F85C65019B87A9C5CFCCB34D90D45195E28E6E30686D77B4F2F727DB2F583F7137BC0F1D22D59DF897C2B14C77B4C50BA97F88C7CB38B3478FE825970250851A95C9D546D6BB39B265CBBF944F35D0F0924D8D9F4BC05A7D7C55165F81D81B52F0B0BF92D6FDB67C35079B286E0886ACC380C047A031FC6FB5B46DA45D81EBC440CD34229282FDE09FCFCA8E28C0C11DFF664CB486C11BA64A70E73192A66951E206492713173CDDC988515D973E1531155C548E6D8FF5AD623F6C009D2916F1B45E9A0FE80EED21B29A200975EAFAFC982104482A8BEB4DCA45B605E3B2F9984B6E51FEFE86C5B82FC0C9CBA092070450A14D</Value>\n    </Setting>\n    <Setting Name=\"ServerApplicationData\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">7FEF3541D25C5F37F46461988729B6EF873D59F35C844B1BFA23D1F257C670FB2E26E6FD5F5162849401E966D1E65EE39FAFB65D1B882F6E3284B1B473B00749F00AA656C8496C9FB09FD62E6D5A09ABA51BB474A63B521A28702A74B24E658065DAA1793D971FD5DD7B433BC9EBBFA1E3B92A4FF35A496740EA9691C1F4A57CAA28213DB2CAEF38E4D94CFEE4102FF34EC669280F0303A24025581E281F4F421917F169329F730B5C62CF68EF3CCEBCDCCE3E9DF78652F1A43E4986B9DE9CC2F7DA5563A34CF417EFD045EF46DAAD8CA3D72E50E4F3B0D4323399AE647DF8A7B9A12E103E0C79A222F798BC9C2317D85929C6E73C96EE03CC63B0FF2F4C94E411B9A6F536AFD7BDBAD279171CD6C39B2018161889A18998BCB92B4D250CD6249F6763BCAF1E03ED12DA38D5D71C79CAAFDB0BA823E702645852D923577F35CC82F59A5AF91B13901042F9AB4CAAD09CFD6226FA4AA92F14D96698E639245BF2F247927EE92466395A16EF31949EBD75428E57D43848E15C66F44E207A69AD301F9CE5826ABFEBCA4927D1BED3331CEEFB9E8C959C97245CB65EDF7EA24F31FC59BC312DA9A3AE81E3C34418ED69FAC2FFAC61D90BE93521633CD10266334F6AE59A69B6B733CE1A6E01D119B91FCAC2571062C0EB2FC79601405D1F349213AED9E9D520DAD50F9FE6E39CE9B96607D6934CBF1C0870F1761A7421BCBCED09D3896012B92281D1E1CB92\n4939489ACA4CB1FFE5D096AA9F944746</Value>\n    </Setting>\n    <Setting Name=\"DecryptedClientKeyExchange\" Type=\"System.String\" Scope=\"User\">\n      <Value Profile=\"(Default)\">00 02 12 A3 EA B1 65 D6 81 6C 13 14 13 62 10 53 23 B3 96 85 FF 24 FA CC 46 11 21 24 A4 81 EA 30 63 95 D4 DC BF 9C CC D0 2E DD 5A A6 41 6A 4E 82 65 7D 70 7D 50 09 17 CD 10 55 97 B9 C1 A1 84 F2 A9 AB EA 7D F4 CC 54 E4 64 6E 3A E5 91 A0 06 00 03 01 BB 7B 08 98 A7 49 DE E8 E9 B8 91 52 EC 81 4C C2 39 7B F6 BA 1C 0A B1 95 50 29 BE 02 AD E6 AD 6E 11 3F 20 C4 66 F0 64 22 57 7E E1 06 7A 3B</Value>\n    </Setting>\n  </Settings>\n</SettingsFile>"
  },
  {
    "path": "RsaUtilities.cs",
    "content": "﻿using Mono.Math;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Utility methods for working with the RSA algorithm.\n    /// </summary>\n    public static class RsaUtilities\n    {\n        /// <summary>\n        /// Performs the RSA operation Result = <paramref name=\"message\"/>^<paramref name=\"exponent\"/> (mod <paramref name=\"modulus\"/>).\n        /// </summary>\n        /// <param name=\"message\">The message to perform the operation on.</param>\n        /// <param name=\"exponent\">The exponent value to raise the message by.</param>\n        /// <param name=\"modulus\">The modulus to divide the results by.</param>\n        /// <returns>The value C, such that C = <paramref name=\"message\"/>^<paramref name=\"exponent\"/> (mod <paramref name=\"modulus\"/>).</returns>\n        public static byte[] PublicKeyOperation(byte[] message, byte[] exponent, byte[] modulus)\n        {\n            var m = new BigInteger(message);\n            var e = new BigInteger(exponent);\n            var n = new BigInteger(modulus);\n            var c = m.ModPow(e, n);\n            var resultBytes = c.GetBytes();\n            \n            return resultBytes;\n        }\n\n        // Redundant functions whose name sounds better and have better IntelliSense...\n\n        /// <summary>\n        /// Encrypts a message using the RSA algorithm.\n        /// </summary>\n        /// <param name=\"plainText\">The message to encrypt.</param>\n        /// <param name=\"publicExponent\">The public exponent of the recipient.</param>\n        /// <param name=\"modulus\">The modulus of the recipient.</param>\n        /// <returns>The value C, such that C = <paramref name=\"plainText\"/>^<paramref name=\"publicExponent\"/> (mod <paramref name=\"modulus\"/>).</returns>\n        public static byte[] Encrypt(byte[] plainText, byte[] publicExponent, byte[] modulus)\n        {\n            return PublicKeyOperation(plainText, publicExponent, modulus);\n        }\n\n        /// <summary>\n        /// Gets the original signed value using the RSA algorithm.\n        /// </summary>\n        /// <param name=\"signedValue\">The encrypted signed value.</param>\n        /// <param name=\"publicExponent\">The signer's public key.</param>\n        /// <param name=\"modulus\">The signer's modulus.</param>\n        /// <returns>The value M, such that M = <paramref name=\"signedValue\"/>^<paramref name=\"publicExponent\"/> (mod <paramref name=\"modulus\"/>).</returns>\n        public static byte[] GetSignedOriginalValue(byte[] signedValue, byte[] publicExponent, byte[] modulus)\n        {\n            return PublicKeyOperation(signedValue, publicExponent, modulus);            \n        }\n    }\n}\n"
  },
  {
    "path": "Settings.cs",
    "content": "﻿namespace Moserware.TlsAnalyzer.Properties {\n    \n    \n    // This class allows you to handle specific events on the settings class:\n    //  The SettingChanging event is raised before a setting's value is changed.\n    //  The PropertyChanged event is raised after a setting's value is changed.\n    //  The SettingsLoaded event is raised after the setting values are loaded.\n    //  The SettingsSaving event is raised before the setting values are saved.\n    internal sealed partial class Settings {\n        \n        public Settings() {\n            // // To add event handlers for saving and changing settings, uncomment the lines below:\n            //\n            // this.SettingChanging += this.SettingChangingEventHandler;\n            //\n            // this.SettingsSaving += this.SettingsSavingEventHandler;\n            //\n        }\n        \n        private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {\n            // Add code to handle the SettingChangingEvent event here.\n        }\n        \n        private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {\n            // Add code to handle the SettingsSaving event here.\n        }\n    }\n}\n"
  },
  {
    "path": "TlsAnalyzer.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>9.0.21022</ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{A7697B31-D46D-4701-AF82-FA40CCA788FE}</ProjectGuid>\n    <OutputType>WinExe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Moserware.TlsAnalyzer</RootNamespace>\n    <AssemblyName>TlsAnalyzer</AssemblyName>\n    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <StartupObject>\n    </StartupObject>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Xml.Linq\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data.DataSetExtensions\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Arc4.cs\" />\n    <Compile Include=\"BigIntegerUtilities.cs\" />\n    <Compile Include=\"ByteUtilities.cs\" />\n    <Compile Include=\"FirefoxSslDebugFileUtilities.cs\" />\n    <Compile Include=\"Hasher.cs\" />\n    <Compile Include=\"MainForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"MainForm.Designer.cs\">\n      <DependentUpon>MainForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"Mono\\BigInteger.cs\" />\n    <Compile Include=\"Mono\\ConfidenceFactor.cs\" />\n    <Compile Include=\"Mono\\NextPrimeFinder.cs\" />\n    <Compile Include=\"Mono\\PrimalityTests.cs\" />\n    <Compile Include=\"Mono\\PrimeGeneratorBase.cs\" />\n    <Compile Include=\"Mono\\SequentialSearchPrimeGeneratorBase.cs\" />\n    <Compile Include=\"Prf10.cs\" />\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Properties\\Settings.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DesignTimeSharedInput>True</DesignTimeSharedInput>\n      <DependentUpon>Settings.settings</DependentUpon>\n    </Compile>\n    <Compile Include=\"RsaUtilities.cs\" />\n    <Compile Include=\"Settings.cs\" />\n    <Compile Include=\"WiresharkClipboardUtilities.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"MainForm.resx\">\n      <DependentUpon>MainForm.cs</DependentUpon>\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"app.config\" />\n    <None Include=\"Properties\\Settings.settings\">\n      <Generator>SettingsSingleFileGenerator</Generator>\n      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\n    </None>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "TlsAnalyzer.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 10.00\n# Visual Studio 2008\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TlsAnalyzer\", \"TlsAnalyzer.csproj\", \"{A7697B31-D46D-4701-AF82-FA40CCA788FE}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"UnitTests\", \"UnitTests\\UnitTests.csproj\", \"{E72B8416-D948-48AF-AA0A-93F08F43500C}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{A7697B31-D46D-4701-AF82-FA40CCA788FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{A7697B31-D46D-4701-AF82-FA40CCA788FE}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{A7697B31-D46D-4701-AF82-FA40CCA788FE}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{A7697B31-D46D-4701-AF82-FA40CCA788FE}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{E72B8416-D948-48AF-AA0A-93F08F43500C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{E72B8416-D948-48AF-AA0A-93F08F43500C}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{E72B8416-D948-48AF-AA0A-93F08F43500C}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{E72B8416-D948-48AF-AA0A-93F08F43500C}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "UnitTests/Arc4Tests.cs",
    "content": "﻿using System.Text;\nusing NUnit.Framework;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class Arc4Tests\n    {\n        [Test]\n        public void WikipediaTestVectors()\n        {\n            // See http://en.wikipedia.org/wiki/RC4#Test_vectors for 25 May 2009\n            AssertWikipediaVector(\"Key\", \"Plaintext\", 0xBB, 0xF3, 0x16, 0xE8, 0xD9, 0x40, 0xAF, 0x0A, 0xD3);\n            AssertWikipediaVector(\"Wiki\", \"pedia\", 0x10, 0x21, 0xBF, 0x04, 0x20);\n            AssertWikipediaVector(\"Secret\", \"Attack at dawn\", 0x45, 0xA0, 0x1F, 0x64, 0x5F, 0xC3, 0x5B, 0x38, 0x35, 0x52, 0x54, 0x4B, 0x9B, 0xF5);\n        }\n\n        private static void AssertWikipediaVector(string key, string plainText, params byte[] expected)\n        {\n            byte[] keyBytes = Encoding.ASCII.GetBytes(key);\n            byte[] result = Encoding.ASCII.GetBytes(plainText);\n            var arc4 = new Arc4(keyBytes);\n            var encryptedResult = arc4.Encrypt(result);\n\n            CollectionAssert.AreEqual(expected, encryptedResult);\n        }\n    }\n}\n"
  },
  {
    "path": "UnitTests/BigIntegerTests.cs",
    "content": "﻿using System;\nusing System.Text;\nusing Mono.Math;\nusing NUnit.Framework;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class BigIntegerTests\n    {\n        [Test]\n        public void WikipediaSanityChecks()\n        {\n            // http://en.wikipedia.org/wiki/RSA on 25 May 2009\n            var c = new BigInteger(855);\n            var d = new BigInteger(2753);\n            var n = new BigInteger(3233);\n            var m = c.ModPow(d, n);\n            Assert.AreEqual(\"123\", m.ToString());           \n        }\n\n        [Test]\n        public void AppliedCryptographySanityChecks()\n        {\n            // Sanity checks from Applied Cryptography, 2nd Edition p467 - 468\n            var p = new BigInteger(47);\n            var q = new BigInteger(71);\n            var n = p * q;\n            var e = new BigInteger(79);\n            var d = e.ModInverse((p - 1) * (q - 1));\n            Func<int, string> encryptor = m => (new BigInteger(m).ModPow(e, n)).ToString();\n            Assert.AreEqual(\"1570\", encryptor(688));\n            Assert.AreEqual(\"2756\", encryptor(232));\n            Assert.AreEqual(\"2091\", encryptor(687));\n            Assert.AreEqual(\"2276\", encryptor(966));\n            Assert.AreEqual(\"2423\", encryptor(668));\n            Assert.AreEqual(\"158\", encryptor(3));            \n        }\n    }\n}\n"
  },
  {
    "path": "UnitTests/ByteUtilitiesTest.cs",
    "content": "﻿using NUnit.Framework;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class ByteUtilitiesTest\n    {\n        [Test]\n        public void ToDisplayByteStringTest()\n        {\n            Assert.AreEqual(\"01 23 45 67\", (new byte[] { 0x01, 0x23, 0x45, 0x67 }).ToDisplayByteString());\n            Assert.AreEqual(\"0123 4567\", (new byte[] { 0x01, 0x23, 0x45, 0x67}).ToDisplayByteString(2));\n            Assert.AreEqual(\"00000000000000000000000001234567\", (new byte[] { 0x01, 0x23, 0x45, 0x67 }).ToDisplayByteString(16));            \n        }\n    }\n}\n"
  },
  {
    "path": "UnitTests/FirefoxSslDebugFileUtilitiesTest.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing NUnit.Framework;\nusing System.Security.Cryptography;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class FirefoxSslDebugFileUtilitiesTest\n    {\n        [Test]\n        public void GetPremasterSecretKeyTest()\n        {            \n            string input = @\"5140: SSL[75821480]: Pre-Master Secret [Len: 48]\n                             03 01 97 01 9e aa 3c 3c e1 ef 7f 39 5d be 88 1e   ......<<...9]...\n                             60 51 e7 f5 94 db fd 62 b2 b5 26 be b5 3d 7c 16   `Q.....b..&..=|.\n                             4d ff 79 73 8e cb c8 aa 9c 70 f2 5d 29 91 72 50   M.ys.....p.]).rP\";\n            byte[] result = FirefoxSslDebugFileUtilities.GetPremasterSecretKey(input);\n            CollectionAssert.AreEqual(new byte[] { \n                                      0x03, 0x01, 0x97, 0x01, 0x9e, 0xaa, 0x3c, 0x3c, \n                                      0xe1, 0xef, 0x7f, 0x39, 0x5d, 0xbe, 0x88, 0x1e,\n                                      0x60, 0x51, 0xe7, 0xf5, 0x94, 0xdb, 0xfd, 0x62, \n                                      0xb2, 0xb5, 0x26, 0xbe, 0xb5, 0x3d, 0x7c, 0x16,\n                                      0x4d, 0xff, 0x79, 0x73, 0x8e, 0xcb, 0xc8, 0xaa, \n                                      0x9c, 0x70, 0xf2, 0x5d, 0x29, 0x91, 0x72, 0x50 }\n                                      , result);\n        }\n    }\n}\n"
  },
  {
    "path": "UnitTests/Prf10Tests.cs",
    "content": "﻿using System.Security.Cryptography;\nusing System.Text;\nusing NUnit.Framework;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class Prf10Tests\n    {\n        [Test]\n        public void CheckTestVector()\n        {\n            // Test Vector as defined in\n            // http://www.imc.org/ietf-tls/mail-archive/msg01589.html \n            byte[] secret = new byte[48];\n            \n            for (int i = 0; i < secret.Length; i++)\n            {\n                secret[i] = 0xab;\n            }\n\n            string label = \"PRF Testvector\";\n\n            byte[] seed = new byte[64];\n            for (int i = 0; i < seed.Length; i++)\n            {\n                seed[i] = 0xcd;\n            }\n\n            int bytesToGenerate = 104;\n\n            byte[] result = Prf10.GenerateBytes(secret, label, seed, bytesToGenerate);\n\n            Assert.AreEqual(bytesToGenerate, result.Length);\n            \n            CollectionAssert.AreEqual(result, new byte[] {\n                                      0xD3, 0xD4, 0xD1, 0xE3, 0x49, 0xB5, 0xD5, 0x15,\n                                      0x04, 0x46, 0x66, 0xD5, 0x1D, 0xE3, 0x2B, 0xAB,\n                                      0x25, 0x8C, 0xB5, 0x21, 0xB6, 0xB0, 0x53, 0x46, \n                                      0x3E, 0x35, 0x48, 0x32, 0xFD, 0x97, 0x67, 0x54,\n                                      0x44, 0x3B, 0xCF, 0x9A, 0x29, 0x65, 0x19, 0xBC, \n                                      0x28, 0x9A, 0xBC, 0xBC, 0x11, 0x87, 0xE4, 0xEB,\n                                      0xD3, 0x1E, 0x60, 0x23, 0x53, 0x77, 0x6C, 0x40, \n                                      0x8A, 0xAF, 0xB7, 0x4C, 0xBC, 0x85, 0xEF, 0xF6,\n                                      0x92, 0x55, 0xF9, 0x78, 0x8F, 0xAA, 0x18, 0x4C, \n                                      0xBB, 0x95, 0x7A, 0x98, 0x19, 0xD8, 0x4A, 0x5D,\n                                      0x7E, 0xB0, 0x06, 0xEB, 0x45, 0x9D, 0x3A, 0xE8, \n                                      0xDE, 0x98, 0x10, 0x45, 0x4B, 0x8B, 0x2D, 0x8F,\n                                      0x1A, 0xFB, 0xC6, 0x55, 0xA8, 0xC9, 0xA0, 0x13});\n\n            var md5 = new MD5CryptoServiceProvider();\n            var hashedVector = md5.ComputeHash(result);\n\n            CollectionAssert.AreEqual(new byte[] {\n                                      0xCD, 0x7C, 0xA2, 0xCB, 0x9A, 0x6A, 0x3C, 0x6F,\n                                      0x34, 0x5C, 0x46, 0x65, 0xA8, 0xB6, 0x81, 0x6B },\n                                      hashedVector);\n        }\n\n        [Test]\n        public void SplitTest()\n        {\n            byte[] deadBeef = new byte[] { 0xDE, 0xAD, 0xBE, 0xEF };\n\n            byte[] deadBeefS1;\n            byte[] deadBeefS2;\n\n            Prf10.Split(deadBeef, out deadBeefS1, out deadBeefS2);\n            CollectionAssert.AreEqual(new byte[] { 0xDE, 0xAD }, deadBeefS1);\n            CollectionAssert.AreEqual(new byte[] { 0xBE, 0xEF }, deadBeefS2);\n\n            // Get an odd one\n            byte[] firstFive = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 };\n\n            byte[] firstFiveS1;\n            byte[] firstFiveS2;\n\n            Prf10.Split(firstFive, out firstFiveS1, out firstFiveS2);\n            CollectionAssert.AreEqual(new byte[] { 0x01, 0x02, 0x03 }, firstFiveS1);\n            CollectionAssert.AreEqual(new byte[] { 0x03, 0x04, 0x05 }, firstFiveS2);\n\n            // And an empty one for good measure\n            byte[] empty = new byte[0];\n            byte[] emptyS1;\n            byte[] emptyS2;\n\n            Prf10.Split(empty, out emptyS1, out emptyS2);\n            Assert.AreEqual(0, emptyS1.Length);\n            Assert.AreEqual(0, emptyS2.Length);\n        }\n                \n\n        // HMAC Sanity checks from RFC 2202\n        [Test]\n        public void HMACMD5SanityCheck()\n        {\n            HMACSanityCheck(new HMACMD5(), \n                            0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,\n                            0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38);\n        }\n\n        [Test]\n        public void HMACSHA1SanityCheck()\n        {\n            HMACSanityCheck(new HMACSHA1(),\n                            0xef, 0xfc, 0xdf, 0x6a, 0xe5,\n                            0xeb, 0x2f, 0xa2, 0xd2, 0x74,\n                            0x16, 0xd5, 0xf1, 0x84, 0xdf,\n                            0x9c, 0x25, 0x9a, 0x7c, 0x79);\n        }\n\n        private void HMACSanityCheck(HMAC hmac, params byte[] expected)\n        {\n            // test_case = 2\n            string key = \"Jefe\";\n            byte[] keyBytes = Encoding.ASCII.GetBytes(key);\n\n            string data = \"what do ya want for nothing?\";\n            byte[] dataBytes = Encoding.ASCII.GetBytes(data);\n\n            hmac.Key = keyBytes;\n            byte[] digest = hmac.ComputeHash(dataBytes);\n\n            CollectionAssert.AreEqual(expected, digest);\n        }\n    }\n}\n"
  },
  {
    "path": "UnitTests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"UnitTests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Microsoft\")]\n[assembly: AssemblyProduct(\"UnitTests\")]\n[assembly: AssemblyCopyright(\"Copyright © Microsoft 2009\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"e6e281d1-4354-4d27-8873-d723ab0f09cc\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "UnitTests/UnitTests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"3.5\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>9.0.21022</ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{E72B8416-D948-48AF-AA0A-93F08F43500C}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Moserware.TlsAnalyzer.UnitTests</RootNamespace>\n    <AssemblyName>TlsAnalyzer.UnitTests</AssemblyName>\n    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <StartupObject>\n    </StartupObject>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Xml.Linq\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data.DataSetExtensions\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Arc4Tests.cs\" />\n    <Compile Include=\"BigIntegerTests.cs\" />\n    <Compile Include=\"ByteUtilitiesTest.cs\" />\n    <Compile Include=\"FirefoxSslDebugFileUtilitiesTest.cs\" />\n    <Compile Include=\"Prf10Tests.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"WiresharkClipboardUtilitiesTests.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\TlsAnalyzer.csproj\">\n      <Project>{A7697B31-D46D-4701-AF82-FA40CCA788FE}</Project>\n      <Name>TlsAnalyzer</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "UnitTests/UnitTests.csproj.user",
    "content": "﻿<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <StartAction>Program</StartAction>\n    <StartProgram>C:\\Program Files (x86)\\NUnit 2.5\\bin\\net-2.0\\nunit.exe</StartProgram>\n    <StartArguments>TlsAnalyzer.UnitTests.dll</StartArguments>\n    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "UnitTests/WiresharkClipboardUtilitiesTests.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing NUnit.Framework;\n\nnamespace Moserware.TlsAnalyzer.UnitTests\n{\n    [TestFixture]\n    public class WiresharkClipboardUtilitiesTests\n    {\n        [Test]\n        public void FromWiresharkTest()\n        {\n            // eg. \"160301\"\n            var result = \"160301\".FromWireshark();\n            CollectionAssert.AreEqual(new byte[] { 0x16, 0x03, 0x01 }, result);\n        }\n    }\n}\n"
  },
  {
    "path": "WiresharkClipboardUtilities.cs",
    "content": "﻿using System;\nusing System.Text.RegularExpressions;\n\nnamespace Moserware.TlsAnalyzer\n{\n    /// <summary>\n    /// Extension methods for working with Wireshark\n    /// </summary>\n    public static class WiresharkClipboardUtilities\n    {\n        /// <summary>\n        /// Creates a byte array from a string that was created using the copy \"Bytes (Hex Stream)\" method in Wireshark.\n        /// </summary>\n        /// <param name=\"clipboardValue\">A string that was created using the copy \"Bytes (Hex Stream)\" method in Wireshark.</param>\n        /// <returns>A byte array derived from the hex stream <paramref name=\"clipboardValue\"/>.</returns>\n        public static byte[] FromWireshark(this string clipboardValue)\n        {\n            clipboardValue = Regex.Replace(clipboardValue, @\"\\s\", \"\");\n            // like \"160301\"            \n            byte[] result = new byte[clipboardValue.Length / 2];\n\n            for (int i = 0; i < clipboardValue.Length; i += 2)\n            {\n                string currentStringByte = clipboardValue.Substring(i, 2);\n                byte currentByte = Convert.ToByte(currentStringByte, 16);\n                result[i / 2] = currentByte;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "app.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n    <configSections>\n        <sectionGroup name=\"userSettings\" type=\"System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" >\n            <section name=\"Moserware.TlsAnalyzer.Properties.Settings\" type=\"System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" allowExeDefinition=\"MachineToLocalUser\" requirePermission=\"false\" />\n        </sectionGroup>\n    </configSections>\n    <userSettings>\n        <Moserware.TlsAnalyzer.Properties.Settings>\n            <setting name=\"PrfSecretBytes\" serializeAs=\"String\">\n                <value>ABABABABABABABABABABABABABABABAB ABABABABABABABABABABABABABABABAB ABABABABABABABABABABABABABABABAB</value>\n            </setting>\n            <setting name=\"PrfLabel\" serializeAs=\"String\">\n                <value>PRF Testvector</value>\n            </setting>\n            <setting name=\"PrfSeedBytes\" serializeAs=\"String\">\n                <value>CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD</value>\n            </setting>\n            <setting name=\"PrfBytesToGenerate\" serializeAs=\"String\">\n                <value>104</value>\n            </setting>\n            <setting name=\"HmacKey\" serializeAs=\"String\">\n                <value>Jefe</value>\n            </setting>\n            <setting name=\"HmacData\" serializeAs=\"String\">\n                <value>what do ya want for nothing?</value>\n            </setting>\n            <setting name=\"PreMasterSecret\" serializeAs=\"String\">\n                <value>4456: SSL[131491792]: Pre-Master Secret [Len: 48]\n   03 01 bb 7b 08 98 a7 49 de e8 e9 b8 91 52 ec 81   ...{...I.....R..\n   4c c2 39 7b f6 ba 1c 0a b1 95 50 29 be 02 ad e6   L.9{......P)....\n   ad 6e 11 3f 20 c4 66 f0 64 22 57 7e e1 06 7a 3b   .n.? .f.d\"W~..z;\n</value>\n            </setting>\n            <setting name=\"ClientRandomBytes\" serializeAs=\"String\">\n                <value>4a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982</value>\n            </setting>\n            <setting name=\"ServerRandomBytes\" serializeAs=\"String\">\n                <value>4a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c13</value>\n            </setting>\n            <setting name=\"ClientHello\" serializeAs=\"String\">\n                <value>0100009a03014a2f07cab94fb3067a06567fcec9f737bd5270f7002bb0d6723e551a0d57d982000044c00ac0140088008700390038c00fc00500840035c007c009c011c0130045004400330032c00cc00ec002c004004100040005002fc008c01200160013c00dc003feff000a0100002d00000013001100000e7777772e616d617a6f6e2e636f6d000a00080006001700180019000b0002010000230000</value>\n            </setting>\n            <setting name=\"ServerHello\" serializeAs=\"String\">\n                <value>0200004603014a2f07ca986be7a3acdd547d038235895aba467eed6eb07cd46e5e8a199e0c1320acd07167996609e3584d15c2d43596d8ab93cfa9e899a82aa1652b8ab667a12b000400</value>\n            </setting>\n            <setting name=\"ServerHelloCertificate\" serializeAs=\"String\">\n                <value>0b0009a000099d0004f7308204f3308203dba0030201020210169d041c3130be3d566606f2679ba172300d06092a864886f70d01010505003081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c61737320332053656375726520536572766572204341301e170d3038303832373030303030305a170d3039303832373233353935395a3067310b3009060355040613025553311330110603550408130a57617368696e67746f6e3110300e0603550407140753656174746c6531183016060355040a140f416d617a6f6e2e636f6d20496e632e311730150603550403140e7777772e616d617a6f6e2e636f6d30819f300d06092a864886f70d010101050003818d0030818902818100c5176d5880046305c91466c7b7f2ed05d6f3f528212f0e829c86dbf35981cd6f5c669aff9e2d93738e795a347501aa7bb90379fc085405827744914d160f2f3ade9a793413eba875e323e5a82ba577b45d0908be25ccd5fd44916971f9a772533d7edffcf7cc84241cc803cd8e5764ea121169c988670e1c28550351a58b2adb0203010001a38201d3308201cf30090603551d1304023000300b0603551d0f0404030205a030440603551d1f043d303b3039a037a0358633687474703a2f2f5356525365637572652d63726c2e766572697369676e2e636f6d2f535652536563757265323030352e63726c30440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f727061301d0603551d250416301406082b0601050507030106082b06010505070302301f0603551d230418301680146fecafa0dd8aa4eff52a10672d3f5582bcd7ef25307906082b06010505070101046d306b302406082b060105050730018618687474703a2f2f6f6373702e766572697369676e2e636f6d304306082b060105050730028637687474703a2f2f5356525365637572652d6169612e766572697369676e2e636f6d2f535652536563757265323030352d6169612e636572306e06082b0601050507010c04623060a15ea05c305a305830561609696d6167652f6769663021301f300706052b0e03021a04144b6bb92896060cbbd052389b29ac4b078b21051830261624687474703a2f2f6c6f676f2e766572697369676e2e636f6d2f76736c6f676f312e676966300d06092a864886f70d010105050003820101003feb3eff141d141d684f6d0c571d2c05e0df6161174a949272d043c6d5f20172193abba420fda6f193312c6d8b91ad6a41c993b2f99cf680d3767049d067447c4b43864f91e2c3c2f6f0703f7d3044e77ec83058ce81634773cdcb019301e9189cba318316a793b5f9f5230ff832d2d661f7c05587666cd757052ce5967ec836743aa68b526903d09db325bb8547892d5c924ae3ff3fa9a854d4d84a9b7af7a8cd8237db964c843a876b8385d955d64fcb2aacf40b15e8a06e0491c3bc6892a420d828af09738ff492fc23b9c521d7cff6175fba59cbd0cdd5b9f99876fad5fa98904a2338330336d66906cd196f8b8b173070aef1d14f8c18c38fefc32866730004a03082049c30820405a003020102021075337d9ab0e1233bae2d7de4469162d4300d06092a864886f70d0101050500305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479301e170d3035303131393030303030305a170d3135303131383233353935395a3081b0310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e311f301d060355040b1316566572695369676e205472757374204e6574776f726b313b3039060355040b13325465726d73206f66207573652061742068747470733a2f2f7777772e766572697369676e2e636f6d2f727061202863293035312a302806035504031321566572695369676e20436c6173732033205365637572652053657276657220434130820122300d06092a864886f70d01010105000382010f003082010a028201010095c321128e40c50d015f765e6694d9732c581922b8c9fc7a39902a77727c1d3ef7d855e3af42cb873002dc5bac70e6b844b42b35eb93d217057ecb46d65c53a032519d746458f90c9a00ea5e44496472f4cd10e2850af934eeb38866a9a5a45ad00e987f580d2b52bb86a97e2efab2487c8ddb2d5f0175a28d063b8bb46107c9be2299f81bd1b55766044d35f4917196b59908259b97c83af320b1dd9e980c4a63b7a6ceb001cef8936af30c6e9fb1e9847b819841e681dc3d2ce7b46be39efc0816d7b3d5b96612997c6d71c84dbec70fe3fb37add57587216b86d044145a547939966956c9b931cd896158e1d9760505adf7b902afa7fd4791a222345a31d10203010001a38201813082017d30120603551d130101ff040830060101ff02010030440603551d20043d303b3039060b6086480186f84501071703302a302806082b06010505070201161c68747470733a2f2f7777772e766572697369676e2e636f6d2f72706130310603551d1f042a30283026a024a0228620687474703a2f2f63726c2e766572697369676e2e636f6d2f706361332e63726c300e0603551d0f0101ff040403020106301106096086480186f842010104040302010630290603551d1104223020a41e301c311a301806035504031311436c617373334341323034382d312d3435301d0603551d0e041604146fecafa0dd8aa4eff52a10672d3f5582bcd7ef253081800603551d2304793077a163a461305f310b300906035504061302555331173015060355040a130e566572695369676e2c20496e632e31373035060355040b132e436c6173732033205075626c6963205072696d6172792043657274696669636174696f6e20417574686f72697479821070bae41d10d92934b638ca7b03ccbabf300d06092a864886f70d010105050003818100c37e08465d9136cf67dcd7a7afafb822c38b0474d3b160bce6feb74412815b3173146356c6722ed11a03435c380a504a4dcddab619a8f4990dafe3f7d8f1752865f66afe9bf4bd52d93fcbda16cba59e2e8e6652783d26fafe9436884a955e2a4c19ef6efa823f2d03efd628b33718cf42b234216447d3206b3a4cdce603900c</value>\n            </setting>\n            <setting name=\"ServerHelloDone\" serializeAs=\"String\">\n                <value>0e000000</value>\n            </setting>\n            <setting name=\"ClientEncryptedKeyExchange\" serializeAs=\"String\">\n                <value>1000008200808c0863cc016cd036efa22889e1611a8a03304366ebb04da1cb918548e024f488a155cd85030b5bd7e67a9da2019089ceba571100051cafceeff42b3fe630f26e7d55e6d6c80976851da2517e28bf831ebe0bed601c9b00c52ea62238eda3fb7edd689ac2addc2341ba30f0cd95604885ed448e828346c3b71206ae48114eb2da</value>\n            </setting>\n            <setting name=\"ClientEncryptedFinishedMessage\" serializeAs=\"String\">\n                <value>6a207a41660bd66cf7be3f41ded028c24a612db5301673c1e6317a42222c2f96</value>\n            </setting>\n            <setting name=\"ServerEncryptedFinishedMessage\" serializeAs=\"String\">\n                <value>4c95745d193fd3d4645d95280a49b80e02d4d479b44475cae3527b9e808ecc69</value>\n            </setting>\n            <setting name=\"ClientApplicationData\" serializeAs=\"String\">\n                <value>183AF27ABF7AE61392D03958A7D4CC9D7B37CF30A52DFD2DD9546538FE2E9DB30A49AF7AB7265E56F12E07D12359DDE4456F222E8F135187A095817D4CDE3C66A54AEE91F9F347D076E81C1C6D533CB11BD3193EBDC5E5F711DC42B099559E287A7FA0867AEB830B6CC076A7E6665BBD341BA0E31CBCF3D9A067AD7B4038A1F3BDB3BCE7790E27E2FFF67E5D3518405E37D6A66A76F6E1DBA32DB9A69BDCDE33002627051E1BDBFBF64F6D3FB33EE301139ADA7D03F5F00AC193D3EB05D83198D2EB722848E8ABBC97FE529863E54A098621E6DE5F00DA7BC70DB6FDCD11F9DDE3C33AB15DFBFADD8F8D90E564B2D4DB1E25F5FE28E4D748AD01E42CEE5B30745404C4324C1CC4A421F85C65019B87A9C5CFCCB34D90D45195E28E6E30686D77B4F2F727DB2F583F7137BC0F1D22D59DF897C2B14C77B4C50BA97F88C7CB38B3478FE825970250851A95C9D546D6BB39B265CBBF944F35D0F0924D8D9F4BC05A7D7C55165F81D81B52F0B0BF92D6FDB67C35079B286E0886ACC380C047A031FC6FB5B46DA45D81EBC440CD34229282FDE09FCFCA8E28C0C11DFF664CB486C11BA64A70E73192A66951E206492713173CDDC988515D973E1531155C548E6D8FF5AD623F6C009D2916F1B45E9A0FE80EED21B29A200975EAFAFC982104482A8BEB4DCA45B605E3B2F9984B6E51FEFE86C5B82FC0C9CBA092070450A14D</value>\n            </setting>\n            <setting name=\"ServerApplicationData\" serializeAs=\"String\">\n                <value>7FEF3541D25C5F37F46461988729B6EF873D59F35C844B1BFA23D1F257C670FB2E26E6FD5F5162849401E966D1E65EE39FAFB65D1B882F6E3284B1B473B00749F00AA656C8496C9FB09FD62E6D5A09ABA51BB474A63B521A28702A74B24E658065DAA1793D971FD5DD7B433BC9EBBFA1E3B92A4FF35A496740EA9691C1F4A57CAA28213DB2CAEF38E4D94CFEE4102FF34EC669280F0303A24025581E281F4F421917F169329F730B5C62CF68EF3CCEBCDCCE3E9DF78652F1A43E4986B9DE9CC2F7DA5563A34CF417EFD045EF46DAAD8CA3D72E50E4F3B0D4323399AE647DF8A7B9A12E103E0C79A222F798BC9C2317D85929C6E73C96EE03CC63B0FF2F4C94E411B9A6F536AFD7BDBAD279171CD6C39B2018161889A18998BCB92B4D250CD6249F6763BCAF1E03ED12DA38D5D71C79CAAFDB0BA823E702645852D923577F35CC82F59A5AF91B13901042F9AB4CAAD09CFD6226FA4AA92F14D96698E639245BF2F247927EE92466395A16EF31949EBD75428E57D43848E15C66F44E207A69AD301F9CE5826ABFEBCA4927D1BED3331CEEFB9E8C959C97245CB65EDF7EA24F31FC59BC312DA9A3AE81E3C34418ED69FAC2FFAC61D90BE93521633CD10266334F6AE59A69B6B733CE1A6E01D119B91FCAC2571062C0EB2FC79601405D1F349213AED9E9D520DAD50F9FE6E39CE9B96607D6934CBF1C0870F1761A7421BCBCED09D3896012B92281D1E1CB92\n4939489ACA4CB1FFE5D096AA9F944746</value>\n            </setting>\n            <setting name=\"DecryptedClientKeyExchange\" serializeAs=\"String\">\n                <value>00 02 12 A3 EA B1 65 D6 81 6C 13 14 13 62 10 53 23 B3 96 85 FF 24 FA CC 46 11 21 24 A4 81 EA 30 63 95 D4 DC BF 9C CC D0 2E DD 5A A6 41 6A 4E 82 65 7D 70 7D 50 09 17 CD 10 55 97 B9 C1 A1 84 F2 A9 AB EA 7D F4 CC 54 E4 64 6E 3A E5 91 A0 06 00 03 01 BB 7B 08 98 A7 49 DE E8 E9 B8 91 52 EC 81 4C C2 39 7B F6 BA 1C 0A B1 95 50 29 BE 02 AD E6 AD 6E 11 3F 20 C4 66 F0 64 22 57 7E E1 06 7A 3B</value>\n            </setting>\n        </Moserware.TlsAnalyzer.Properties.Settings>\n    </userSettings>\n</configuration>"
  }
]