Json Web Token JWT have performance overhead?
I wanted to find out if using jwt token during authentication of a web application creates any performance issue.
But what are Jwt Tokens you may ask?
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA.
jwt.io
Additionally Jwt tokens are:
- Compact: Small size means transmission is fast, JWT can be sent through a URL, POST parameter, or inside an HTTP header. Note usually JWT have a size limit of 7k to 8k in size.
- Self-contained: The payload contains all the required information about the user, and avoids the need to query the database more than once
Task with this I wrote a sample C# console application to find out if different size of keys made any significant performance issue when validating a jwt token.
Below is the sample code I wrote to test this out.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
class Program { static void Main(string[] args) { EncodeJwt(2048, SecurityAlgorithms.RsaSha256Signature); EncodeJwt(2048, SecurityAlgorithms.RsaSha512Signature); EncodeJwt(4096, SecurityAlgorithms.RsaSha256Signature); EncodeJwt(4096, SecurityAlgorithms.RsaSha512Signature); Console.WriteLine("**************************Complete********************************"); Console.ReadKey(); } private static void EncodeJwt(int bits, string sha) { var jwtIssuer = "myIdP"; var jwtAudience = "no_audience"; Console.WriteLine("JWT tests - Key length: {0}bits, signature algo: {1})", bits, sha); Console.WriteLine("--Generate KeyPair--"); Stopwatch watch = new Stopwatch(); watch.Start(); using (var rsa = new RSACryptoServiceProvider(bits)) { #region RSA Key string publicOnlyKeyXML = rsa.ToXmlString(false); string privateKey = rsa.ToXmlString(true); watch.Stop(); Console.WriteLine("KeyPair generated in {0}ms {1} ticks", watch.ElapsedMilliseconds, watch.ElapsedTicks); RSACryptoServiceProvider publicOnly = new RSACryptoServiceProvider(); publicOnly.FromXmlString(publicOnlyKeyXML); //info Console.WriteLine("Public key: {0} bits", bits); Console.WriteLine(publicOnlyKeyXML); var bytes = Encoding.UTF8.GetBytes(publicOnlyKeyXML); var base64 = Convert.ToBase64String(bytes); Console.WriteLine("Public key (encoded): {0}", base64); #endregion watch.Reset(); #region JWT Token Console.WriteLine("-- Create and sign JWT ({0}) --", sha); JwtSecurityToken jwtToken = new JwtSecurityToken(issuer: jwtAudience, audience: jwtAudience, claims: new List<Claim> { new Claim(ClaimTypes.Name, "SAS") }, expires: DateTime.UtcNow.AddHours(1), signingCredentials: new SigningCredentials(new RsaSecurityKey(rsa), sha)); JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler(); watch.Start(); string tokenString = tokenHandler.WriteToken(jwtToken); watch.Stop(); Console.WriteLine("JWT generated in {0}ms {1} ticks", watch.ElapsedMilliseconds, watch.ElapsedTicks); Console.WriteLine("JWT: {0}", tokenString); #endregion watch.Reset(); #region Jwt Token Verfication Console.WriteLine("--JWT token verification with JwtSecurityTokenHandler --"); SecurityToken securityToken; TokenValidationParameters validationParameters = new TokenValidationParameters { ValidateIssuerSigningKey = true, IssuerSigningKey = new RsaSecurityKey(publicOnly), ValidateAudience = false, ValidateIssuer = false, ValidIssuer = jwtIssuer, ValidAudience = jwtAudience }; var watch2 = new Stopwatch(); JwtSecurityTokenHandler recipientTokenHandler = new JwtSecurityTokenHandler(); watch2.Start(); recipientTokenHandler.ValidateToken(tokenString, validationParameters, out securityToken); watch2.Stop(); Console.WriteLine("JWT signature successfully verified in {0}ms {1} ticks", watch2.ElapsedMilliseconds, watch2.ElapsedTicks); #endregion Console.WriteLine("------------------------------------------------------------------------------------------"); } } } |
Here are some results of the first test run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 1609ms 3605831 ticks Public key: 2048 bits <RSAKeyValue><Modulus>xZiWrQYMzU74ggA6Qy144Gxq3OlnkSVQ/xBHHaW5t3NM+douuw0PMHbBNzG5Z9eCYSiAD7kYqOPM0rAhzILE+WwdtS/QauJaAt/VwQWd0OTbM7rMvxqctsDhPS1A6IRe9ysILYN84eoTDAuSQZy5SYwfdY+zZHnt8EPeUy/9wNoulwLz/sQULXO6/o4i+3AP7s8co+Lwb3OFVTHpMmPQcJluV6Mqv/6BnHwxmbsttBDqwitcxepSA2naXIi6myADi7gTodhsuJxaDb9RkoqRh96dbDFN9V0CvNTwMEkHRibqOS83HkGy2FTinEkVuLCzdtZyKsCsC09UWKlpuhkDLQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPnhaaVdyUVlNelU3NGdnQTZReTE0NEd4cTNPbG5rU1ZRL3hCSEhhVzV0M05NK2RvdXV3MFBNSGJCTnpHNVo5ZUNZU2lBRDdrWXFPUE0wckFoeklMRStXd2R0Uy9RYXVKYUF0L1Z3UVdkME9UYk03ck12eHFjdHNEaFBTMUE2SVJlOXlzSUxZTjg0ZW9UREF1U1FaeTVTWXdmZFkrelpIbnQ4RVBlVXkvOXdOb3Vsd0x6L3NRVUxYTzYvbzRpKzNBUDdzOGNvK0x3YjNPRlZUSHBNbVBRY0psdVY2TXF2LzZCbkh3eG1ic3R0QkRxd2l0Y3hlcFNBMm5hWElpNm15QURpN2dUb2Roc3VKeGFEYjlSa29xUmg5NmRiREZOOVYwQ3ZOVHdNRWtIUmlicU9TODNIa0d5MkZUaW5Fa1Z1TEN6ZHRaeUtzQ3NDMDlVV0tscHVoa0RMUT09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) -- JWT generated in 869ms 1947867 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhMjU2IiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDg4ODc0LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.Xd6C5qapi0R-z2YwPBuMt-V-65wegS0PHyge9WYbgvl8vCsU1Zxno7NllPi4HKSFvhrGzlQ_QsmAyITVTijVgeowLFMmUergHZGYQXC3JGPfTHwEU4JomM646PVcJ5ShsUTAMh7kYleSrQSEcbXDacuUusx6baJlfiKKtQpsivUCmUtkifPhsbAwBsWDMFebxa9IDd6BHBjZkcQKV84khbs1ykmDcz1e_u8HS_ZxkXpTlyAvv6pjEt7-kddx8TyI2VDcpx7L0Cdy3BjgXyOPz1Y7zbOqb3wkgCJRVI5NAQ2auqQpGuyXK9CQJ91PMOlQid8s8hs_43fjzd5ym1OUqQ --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 176ms 395559 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 2022ms 4531592 ticks Public key: 2048 bits <RSAKeyValue><Modulus>7BLeRIaQ3LnIbOQjaCDP1Os2pye05Ls3FCOnLZs8p8Fr/2Yt8bFp+wAy4fZNJCbhOiQR6jYoJUONlWs9/jAk+Szf9jDdDBsYgff2EpxZtsf4Iw706nteF/B6z+lD1Q35c7W812QUrweZ1L2BIyDnXNmYYJ/kSwlSd1SL3GjOTEkXwtkKxTB24YdgZ37HI+V9o201yCD7zFk+AeeL/FnHujZqD85WgJbm5ZoAwUZY15Z47OvmAg2+rXETSVkX6/JQ00r8ZAMkzmDLQhUxmFKsDLieTOX/us5gU+3UZuBOjp482Z4CE3iT93hl9XUyg+IVgWf5FXx8h4f99jGuR5Z2JQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPjdCTGVSSWFRM0xuSWJPUWphQ0RQMU9zMnB5ZTA1THMzRkNPbkxaczhwOEZyLzJZdDhiRnArd0F5NGZaTkpDYmhPaVFSNmpZb0pVT05sV3M5L2pBaytTemY5akRkREJzWWdmZjJFcHhadHNmNEl3NzA2bnRlRi9CNnorbEQxUTM1YzdXODEyUVVyd2VaMUwyQkl5RG5YTm1ZWUova1N3bFNkMVNMM0dqT1RFa1h3dGtLeFRCMjRZZGdaMzdISStWOW8yMDF5Q0Q3ekZrK0FlZUwvRm5IdWpacUQ4NVdnSmJtNVpvQXdVWlkxNVo0N092bUFnMityWEVUU1ZrWDYvSlEwMHI4WkFNa3ptRExRaFV4bUZLc0RMaWVUT1gvdXM1Z1UrM1VadUJPanA0ODJaNENFM2lUOTNobDlYVXlnK0lWZ1dmNUZYeDhoNGY5OWpHdVI1WjJKUT09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) -- JWT generated in 34ms 77952 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhNTEyIiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDg4ODc3LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.58j5GnCvvKCHsOLtvd2_z3V1lYCWfCzVqFZI2PrdVkJG0-3gWe0ehPMxXPZAhU_O6nfbro9m0If-NyUseKzv_sY9YimB1u0lJEkuKGjPXms-L1_87baXFkX2FOV9JiS6A-XeRwoKLIwiD0h47C_tALxcfsAJj5T7rVM6QrybQeUWd8-GhdR3BHU5ZkfV6ZGVAxaTeU9Chsl27xV1TKGlh48FCk510RdOFvugtniu85Qv7RBQOYOwExNEhdM2YMBPWKB_LwJ4Qw2ZOOkMcgttjZGc6IDv4KaTjnoM39Sn2wQ5ulaxjYmoc41sWsIMSZ3uiqeGWR5yx11Pv_2t6oasEQ --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 0ms 2055 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 19122ms 42852279 ticks Public key: 4096 bits <RSAKeyValue><Modulus>22TMU9bcFR3XtjkuStlrkh2RyxsEcbQv0tUM/q25twhLZoaYIilnXqMp0zrHuaSh0aayP+sggQlly0Znykhr7bHBCFsUKkUPCxkuT9lDAo7yuGdOk870lW0cBOUGeZ6JY8ybmbNQTvMTAxzZmpiStaMhxfu3d5vY8AAGO9NlYz5LDe64RlcC6S2OEq9uoWFnPDo55wmcJt92SpCxsN0RcEueeFhjlgj6a/RNxKKrICGrJ/z+qj2/LhpErb5ctpPShTk4XIGYTewh75JVs4+eL3klw7rP1DqQFEm1Vp6GOwMxph6Ml1fFk63WP+pxGNj6jPKzd+b7EQHvX0KTpxNUzOyL64lVpqPD3xsLmERfebal57UE94j7BXmL8VSD3xLIa3FmpKcBrMGjWA8qFKMV2eo5DSKdn8sq6W9qPask8cD25w2MkBVrKup1jnvERCjDbBfaP6aGYdb8nzXfJ8f51emGEH99R4hm28T6zUI4QltyF6OFw3J88Vcohm2gm7d1VQBjPRIwIYJdu0YHKAoKZqiVf15KlUJB66HOnZct/DnxWInVh+36T1tsPuGN3JfJ8Fdhq/6nEfCUgpp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VHTjy3Q42OTE6XZe-ey-rEqcvW8o6dCu_k --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 3ms 7037 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 25865ms 57962299 ticks Public key: 4096 bits <RSAKeyValue><Modulus>m4CI0k+/mAF7x9yyN5DMa2SiI1yszkstY4ovuZmDceuS3l07HgGzFe5P8R6rT9nGxwEOPyOC5/y4PaIeeX8jslWw50zZEuxRekX1SA64nr7ClGO0XUkaQ44fTsqvfJItYZCZ0dyY7xEag1QeHknZpiuXMY9XVzwPxAczMx2/5/3vMc9v5vutS1Yx8fsa8chAcigW8VGF4S6qLKGXbN8xOGwWKmpJsjCcoQUTiK9GVTSoD6dyYqEjsEFGVOGp/mI7es26iJ+VhRoh3JRwwQWDtVaIeE4xaNfq/6tPvd9YuUFz87XLcYs97aryli6Gv9B80O+ty5H1Q2eoK3sylt+ozgm0zjcQWOz2XDXaAR44TOPs9oPAvFPt+evfAnhTcmeh3yR9+OIFrzyj1yjAId7jIAcrEBz7z46E3xG+DMGRkb9qIpD87HWfjfqZr57I4PUBlkffjKeYmszu5j6RjkOhYkTjQ4SUwp9ApEFpjJaxWmfwcmuQD7BpLtqCX8X+/EyHwUf1cbdpH0EI5ft5HgaWZ+2JMPIQHHFbVFVvjiNBUEVLu3W7GKFugsyzgkMNrOcTM2MzXlctOsG8rU3vzVs4/rRQx9NmadROfoFp97lgmZZhG4k2xH2n5QfoXkmBM1Tofv1dc4byO1glufgWGck2togkqlPR7gJ2kZXnHYFF6ZE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPm00Q0kwaysvbUFGN3g5eXlONURNYTJTaUkxeXN6a3N0WTRvdnVabURjZXVTM2wwN0hnR3pGZTVQOFI2clQ5bkd4d0VPUHlPQzUveTRQYUllZVg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cy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDg4OTIzLCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.HwxIyigT91z7Zvcx6S2epWIIBSB0a_yId5tiOwH4qqiyl_6Oz125q_pRMBbleccpX2feFe4t2Wp1_-rbZJDcyLRni_6ginzqdPbtLt_L9GSWRzlBAagC9T8IO02YVQgjDOgjBmNGSTU2ur3Wzs7d1ZN77x2BynD1hdRssFeEUJ4DLDKCTifNGt1LpPkRz7megmX16rFMSW2A8HplNrJFOzTma57gcn0kYi4HYqttH7ui_XdQBJ9jFY4XZPBsrFxo71m64kLZ5fwa29yc68U5DPxrf8JPkzKGeU_xEjjYgJ1DbVIv9hmSr2TYc72cckczqgo6lkcoOnnr6SKx4pGBjqJ1wD0w0zrriEfhWPRSXaaB84QlfvQCLAWqOhsMkp-U5LGBR3cCwsPayFNqU1TbPKbvc9BJRPiPWkSOVNLH2uUxsb5u6EjGDBf1nomDsyprxjoNkOxMKHRu-w7bGReRpK4OPaLdT3Hh2M_gOA946LPUAxiVSdFJbdRxioKxqtyanx5yW5AVOCsPRHPqaalAoz5ZDHd4TaUGtP7wpEYqjXveU3FpJ6wlKGR0Kh9Zeacidwg9sl7ikQDyHZuZIO23LwaBZDBCizpGTBPngZBtgArZHn5nXpZJf9IWe1T9KJMGC3MirSI_phVnFlJu__mPFbbpTt29ULg1xEwPpOnr2XM --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 13ms 29662 ticks ------------------------------------------------------------------------------------------ **************************Complete******************************** |
Test Run 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 2268ms 5082521 ticks Public key: 2048 bits <RSAKeyValue><Modulus>0GsbzFtPdhM17LeYStBJXLEwY/iB9jlVODhFK5bJlZE5paIfudV3iqYub5qiEiYC+5fm87Fy+TkldpWYGJrxX6uHpOwjlLf00+nWYWKb8uDOgbAL57WzY5rqf23iIFJ3pc5JQncgQeB/b53pejGBQyE83BUBokrdGtdO/kpr+4PzsZB+zwMVKGlCAMMR0agYWMRwYr1CwoKNry+GVbjAbbDOjuUyjJoHd8QyN4tLleeKiz++Ulz0t+XNsK1hT5Cc1CuabinWxtM9XPnETnRcdDa8M8+ZUrQhb4Q0dQohIr6fflWYsMhjxKCpSHv/RdiFG2DoBW5DRv+Gx+hy3Ax9gw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPjBHc2J6RnRQZGhNMTdMZVlTdEJKWExFd1kvaUI5amxWT0RoRks1YkpsWkU1cGFJZnVkVjNpcVl1YjVxaUVpWUMrNWZtODdGeStUa2xkcFdZR0pyeFg2dUhwT3dqbExmMDArbldZV0tiOHVET2diQUw1N1d6WTVycWYyM2lJRkozcGM1SlFuY2dRZUIvYjUzcGVqR0JReUU4M0JVQm9rcmRHdGRPL2twcis0UHpzWkIrendNVktHbENBTU1SMGFnWVdNUndZcjFDd29LTnJ5K0dWYmpBYmJET2p1VXlqSm9IZDhReU40dExsZWVLaXorK1VsejB0K1hOc0sxaFQ1Q2MxQ3VhYmluV3h0TTlYUG5FVG5SY2REYThNOCtaVXJRaGI0UTBkUW9oSXI2ZmZsV1lzTWhqeEtDcFNIdi9SZGlGRzJEb0JXNURSditHeCtoeTNBeDlndz09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) -- JWT generated in 357ms 801439 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhMjU2IiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MjE2LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.Bmp2qCfirkQye1Jh-bwDInFmORA1WxRIVNlIld31S1Ee7DEh7AJkLHuYYHkSOMIysnz69hlM2HfAo6vl-5HKIzIl9ZddvEaPjlSePNLKZOkSCkASjOufQou8myyAYWzaunywDoPjjA0luTV7Qz6lD5LVgMdOjTE-lLLE0gVpW0urhcket1ZNqIzl5uURpCiSIGILmoEirNsfjCPW85qKzWrTpI02gIv46FWuoWKmApnfnFvYjB7UnOTyQ7Zdzn0LSuZ8de6JzxHDUE2GtyzMW6HIY3Ax6yb6kgU9Vg_DC8rZ-GNuaSjGzFi9oAL3DA6w4bweRgREtS5g_TY0ISvLEg --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 146ms 328370 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 1181ms 2647221 ticks Public key: 2048 bits <RSAKeyValue><Modulus>7JmMp7/o2BehP0x7mlEIuQB5zZ+PT9DiGJz6ux5IeHIompV1ilLkSH1pniSf/Px+4RG9pKOe/A5rO++PcPCbEBKgpXHRQ3vdTQCk5h+CyW+icf/jy7NZwF+cTnPr6sBw4bNBNruFMgaWxoR4WUVQhZofkhqN9cyV3tSSnb6gLscaqL5WBWuP01oFlLwvrY+Ly0bZYsqQOwJj2OZe1m+BN6lzcwX13zOir7r58O2OIicF02Yiu78iwwWfzF5Tti9pstb46kCAjgy27K3yDYYa8pMPdfOu1adokOkxehN9+5Gexjng19swUjWY442NAadfa11i8vW0Ex2OKoh1lWITbw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPjdKbU1wNy9vMkJlaFAweDdtbEVJdVFCNXpaK1BUOURpR0p6NnV4NUllSElvbXBWMWlsTGtTSDFwbmlTZi9QeCs0Ukc5cEtPZS9BNXJPKytQY1BDYkVCS2dwWEhSUTN2ZFRRQ2s1aCtDeVcraWNmL2p5N05ad0YrY1RuUHI2c0J3NGJOQk5ydUZNZ2FXeG9SNFdVVlFoWm9ma2hxTjljeVYzdFNTbmI2Z0xzY2FxTDVXQld1UDAxb0ZsTHd2clkrTHkwYlpZc3FRT3dKajJPWmUxbStCTjZsemN3WDEzek9pcjdyNThPMk9JaWNGMDJZaXU3OGl3d1dmekY1VHRpOXBzdGI0NmtDQWpneTI3SzN5RFlZYThwTVBkZk91MWFkb2tPa3hlaE45KzVHZXhqbmcxOXN3VWpXWTQ0Mk5BYWRmYTExaTh2VzBFeDJPS29oMWxXSVRidz09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) -- JWT generated in 47ms 105861 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhNTEyIiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MjE4LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.MHoqriY26hdtSpGcRtP-6evpirnq5ke2ujV6jVqZKDPT9t1iRXEGTwGnFW-nMLwjj_LHDSj_3h_5OwWLC7jhzh4fjFaL6bBE09IByPaKlzu5OXH-EeCR16o9IXKPNhhQTZJPKuS8FRU9sGX9DdJsyYBm-HDslUAzTHpSRK7uh-EUpcYT5yfM4KzmynZsl3Lkj-9PEkWMz3yyInql0qSNbc11VebnAUQ8hV7dYuFxYdOaPApM2AJsZsAbQzdKM5MgcPZ7gKZ92jlnk_g1Pv_ANMjdWyWSUHZ70f42K1YtEuZvEOHV80ludEUYGLjRCaCz0-kc4MfGG--6LFFAMadMRA --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 1ms 2796 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 16609ms 37220778 ticks Public key: 4096 bits <RSAKeyValue><Modulus>xfAWQnW7FZFy8ADC993Kisk8nUy4HC4i/gxJ2iIgTJRQ3dlOtVkj79YtwgwKPexjgoLig+T/VXruxRPfIlnmGGQp/Eyrp9KYgGhr7HasT4RBztHthUdxWmh8LoH40t9b9bUq6LaGhQHIjb2ayjAx+SQHlB8HcMi/cMyP7fwD4A1/izgI63IGOVa64ZVjYzeAqZojw4+YCg5H/73FusgOGNJVegYy80DM1J3MUGSTzDZGL80eoX9T5LCNW8o9UKYSowuvk+vUwd0MD99i+f2oAQw+mo/FaEdm8mM3I43xP11Re6eFpqPfZu3O5JCvfaiAp6ulG/1HEujaikgQKDau/CZSTUIkGO7kxw8FqDmnKw5KuFbsFF+OhcgJCEei7sMrpdI+JZqLOnXugt4+eQ1m6U1qPgoc0AtZEH65eHPFd7Q05NoacL+ndjvOVCyyEBzeQfhLODlL6NblPYk340oxAt11mza+Wp/iliuUZzQlcvKhk4bKWpDTioPAx5AYx0eK/7dlRByzqtaHq2WToVRVw5Na0wqrjKDvUNy6RNrqeEeeB0RSfiXVtdsg9vDydNKx4HuDU7omZFMRWYwCny5GLmbFaS2qaPjJRrky+7/D4SqL4EZY7knBy6ubEmYHtNdsc1MpSR61RhCWrCTasn0GCOokf7PSBU5kf51UodhDOsE=</Modulus><Expon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www.w3.org/2001/04/xmldsig-more#rsa-sha256) -- JWT generated in 322ms 723444 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhMjU2IiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MjM0LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.bf9lzG8X4rAL5r2jKCHbc-W8vnO0GuQmjquusPl5HEwMeu9MDMp3fM_d2gP9ASzeQNX3FachyfKyygasBUW8nLZ0mOxexwnLqDErQFywb18Ca23y3yxDpSd7FxvhvreSVm6NvU12yqBfSKZHKWFykHR9P5FUkMaQDAUcHDXdzYTKhchPcQR-E972Hu59bHWzbrKWNx1S99NEUbIBh_cBUTUKkaOnTwORX9Q2Fca07q_KB5dn0raeHlfqznJhPktmDO3zoIi7n-4MBV_V6HvynmVlVh7SnJ9q1tbMuBko3lPdzzwYKoilNfZVaq_7kLk-qypI86j93SKxSCI3hHzFSyDXrQfMZ6U_xOqamckDRJujpCowTJH_AEpVyHbmm1JhqCInlUTx19vvs6mV1pc24H_9aq-DMt-kBU3LhvNDFY31Y5HitBiFhMSlsy002AgAZLgcT-QVSBNtjsVKK66aDqGl2_qlIDGBDa9-6BNs5zi8o2icEJOfYtDoJ0SBuXNlnN4nsAWTMpiFBiQ8BJU56qjHCzSEhdxSTKOMXexYe1E_2lnfLKR6BHjfXEWKTXPQf8F9iXxFqzOLkA9sUV7GzxK87WheeoE21Ka4JqR5UHiJXXsSYk6o2zN5sFpRbMAJtO30YEbma91VLrBxL0hXQcEiEfLN0hfHrcmvDmnaHZ8 --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 2ms 5547 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 9955ms 22308566 ticks Public key: 4096 bits <RSAKeyValue><Modulus>2G3imbPXoaMrUfNfFYdTbGYIuJ1kdUmgCDwHh3iAEK0jNLY3Swu1PfFuWPZqjUI2W2VNZZLJO7rQrHMMtojoO9AgIER0xqjOz7WwkpVMvhyypjuKfM+VKREZUE/Ba/5rNNWuGk4Wr9ioXPv6l/ran/skmVAy3DMsS2wyA0j4yYBGV3ferFuYx6AfIqn1x37skSq1GiKlchCqbSXq1ueOrAMJwMZ8vM3fjneSSYExuZBlfcDBzjCski8NETWi0qVWvGhF0o72LCK8AmNnL21BdDAzck7sjCgm0BsibD9XSoymBHN2yp6hOP3XKoaO/h8+1JNZo0uzUvxVdtjpel8XCtu/bTSB4K7C9H2w55QsVeTcsbJdxNFbdqfCN1d3BkY+9Ji1VUZfHpzN2DOkA0mCMphf89IwfrGVcV3RYkd7fcsYWLaD0t6d9uBsRKcR2+hDOlT8LpxLy38zKBIDt5P8w+3RRCJsMpC1qNt+DCG21kmgBHjdnfDGvGq5ACnTGgik5mezzGPHOpMJVjpihOhvR7tL3p6AYC9lNfvS1dJ4iJbouAR/D2JagOsVn63MdTX7R228/IVIWOdepwX8s0N4WY0Q87Sxybpcu3I5Kna7FJVSnU5lzMXHQrE5v3Duk9ZyBhlsq1dsRv8+AqHdml9bC5DkE3k8PZYK7GJGSXY/an0=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPjJHM2ltYlBYb2FNclVmTmZGWWRUYkdZSXVKMWtkVW1nQ0R3SGgzaUFFSzBqTkxZM1N3dTFQZkZ1V1BacWpVSTJXMlZOWlpMSk83clFySE1NdG9qb085QWdJRVIweHFqT3o3V3drcFZNdmh5eXBqdUtmTStWS1JFWlVFL0JhLzVyTk5XdUdrNFdyOWlvWFB2NmwvcmFuL3NrbVZBeTNETXNTMnd5QTBq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CI6Im5vX2F1ZGllbmNlIn0.h_Af2E98rL7-CdBmkMp4ctEDf4bI03FH1ettvoCfa2UaA5T76t-76ZHCpQyaykICcqdvNrdJSf_-rmZEA90sD1aHO2QtgLkRT3albLOTTo3RvUUTMSIrhcpoV4NpNM_h1H13TaAnMGNjGJcE9KgjYlzDN44UJNOiQMBofX9U8jLTs2TnV0HcTml9PIJEyRkyc8SKmVidloyBYwjfkMJIvdWwP9Djf2ivxLNJdu18ds8BrF2zQniZmxRqloyEWFRJk4FQdWaW-jj9gtn49E-l9jhyS7jaiD3sFJfiHvApmJr1137yDYZoLWOQT3m4d1axnNmUjCLWtJcRbPq_y6w2Wx3yZ8lMRQl98HgQp2cFT_xCDwASgcfx5GpaWdIS8DShki7tHcA6Ayxu3LlU-IG2p_eGjnmC7vTiqFVCTsegSovOy6X81hfS9lQoiQO7IGaeU7Fq531aeYfz4Zgdui4afYwql3apd_B3lOcGkS5_pZNXF0jZqOCA6z75A2kXeTf9NGdVY6FdAjNep9XedT5OhbCAh-P4fIaIdlTrqScD7YsPeUyEtRHzXSmxz-sTIdYaeAVdyi4RY_N-e7y9CJcTt0KrMczI61dx9_c33ZdGqGq7yUtLUnYGGR0JfQfm94NaVoioWfn0dS7EmsKCxAl5FwdV-PSVkpDD8EZakqUfkZI --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 2ms 6617 ticks ------------------------------------------------------------------------------------------ **************************Complete******************************** |
Test Run 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 937ms 2100611 ticks Public key: 2048 bits <RSAKeyValue><Modulus>z8kPJqI5MZJAD9B74Bdtnj+WSMbbwz6ei/lHUVdqSk1PZHdUG3AEnZTdwF7AsdmEpuDv6LjRTViNtWzKEEbtUTOj/ze6njzsbDHInjxtsMQiaW+QKODqPtyK4UQD/QRUdDX81hPbYQjF8ZGs7rqToZnVM+tO29LzgwNGaStygxSxLrtVQFNdhCTb00gwQG6HzB3U+aUKQHSCBvANTMeHmCc4Z+09o8snt+aYorBRYyOahYJbnEuc8PEBLd7uY0+eFQCyB9+6lEkJsLpcvrZksepD47+LswkP70XLuikk2pKgvRKGs89HUUi6+e0h3Ai99A1LbPfO2t8WXVnPv9JKbw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPno4a1BKcUk1TVpKQUQ5Qjc0QmR0bmorV1NNYmJ3ejZlaS9sSFVWZHFTazFQWkhkVUczQUVuWlRkd0Y3QXNkbUVwdUR2NkxqUlRWaU50V3pLRUVidFVUT2ovemU2bmp6c2JESEluanh0c01RaWFXK1FLT0RxUHR5SzRVUUQvUVJVZERYODFoUGJZUWpGOFpHczdycVRvWm5WTSt0TzI5THpnd05HYVN0eWd4U3hMcnRWUUZOZGhDVGIwMGd3UUc2SHpCM1UrYVVLUUhTQ0J2QU5UTWVIbUNjNForMDlvOHNudCthWW9yQlJZeU9haFlKYm5FdWM4UEVCTGQ3dVkwK2VGUUN5QjkrNmxFa0pzTHBjdnJaa3NlcEQ0NytMc3drUDcwWEx1aWtrMnBLZ3ZSS0dzODlIVVVpNitlMGgzQWk5OUExTGJQZk8ydDhXWFZuUHY5Sktidz09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) -- JWT generated in 309ms 693470 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhMjU2IiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MzExLCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.K90al-AGKXAUAfhhJdIVaaxpMgUf9cnmW6SUg5NtuU2pWoHkXNo_m8cC-9V-hNMl8PHdNgihAezlATgi4WjKxme1cESVETZMraWRwzL7SXSFp0mFE8-0PTSJn2WDkwM0J0omP1sBVtLoV8uUXPqDOeRPATLqIo-rFSWd3dz45ehDGDWPo2vuGCo_X2NgD-zyunR_TiSsenbA-Z3jtAFhcDzyhiwNVfngOSPWd-wWfmpRT8giWvdFn1_HEd8JauFt7ukHyTFTOFWQpfdXyBI5r-kcT4ao_B06TuOrawfLoS8fNDwIH0fV2qNP0-WnlrtHmzOJYcvwMnYQiPUgO05I6Q --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 138ms 310907 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 2048bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 609ms 1365849 ticks Public key: 2048 bits <RSAKeyValue><Modulus>y+E0/3miJsSVqsxNM0p/uzuSKLuEhdl6OP4YhwpoAjN14NSKtbyfa2yKooTEDJjrc/a+JHeDgNYF5BrsI30cAtyHf6qEracrPzYAfOXcMh3kiIP72i79fR4KWvuRl8x7Wr/jU/moahpJVoy1oSnmep2EOZPs/2I70SMesmC3oxCb5+MnR2FQl9ADlV+VkG0Y253OQs2auWXTFkzejyOrcub8Atl/S3vMNBdmjVW825T8FobZChaOY7Qu4nulOpvzIBqs3O89rqn3PDU3QgPmX8TjXsNl9FvFdBcjtO0R/IO2xJLhm5ZE38ug7UxzCPO3wKd03+mKBbTAY1TfXNG5Tw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPnkrRTAvM21pSnNTVnFzeE5NMHAvdXp1U0tMdUVoZGw2T1A0WWh3cG9Bak4xNE5TS3RieWZhMnlLb29URURKanJjL2ErSkhlRGdOWUY1QnJzSTMwY0F0eUhmNnFFcmFjclB6WUFmT1hjTWgza2lJUDcyaTc5ZlI0S1d2dVJsOHg3V3IvalUvbW9haHBKVm95MW9Tbm1lcDJFT1pQcy8ySTcwU01lc21DM294Q2I1K01uUjJGUWw5QURsVitWa0cwWTI1M09RczJhdVdYVEZremVqeU9yY3ViOEF0bC9TM3ZNTkJkbWpWVzgyNVQ4Rm9iWkNoYU9ZN1F1NG51bE9wdnpJQnFzM084OXJxbjNQRFUzUWdQbVg4VGpYc05sOUZ2RmRCY2p0TzBSL0lPMnhKTGhtNVpFMzh1ZzdVeHpDUE8zd0tkMDMrbUtCYlRBWTFUZlhORzVUdz09PC9Nb2R1bHVzPjxFeHBvbmVudD5BUUFCPC9FeHBvbmVudD48L1JTQUtleVZhbHVlPg== -- Create and sign JWT (http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) -- JWT generated in 39ms 87807 ticks JWT: eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNyc2Etc2hhNTEyIiwidHlwIjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MzEyLCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.YZpC_eM1q-6rilv0b0S0zs-p6wWY0Pj_52F1yLX368nn2-bIyBxOqqsKIx8Y1UiaGgkDFSchwDegw1S-XXXgLPVniNUj0z-l06EMYMODntRB2OTb8PtOVwruIkgO0G3ICV_THwGHfFm8nJlOEqduEnb1X0-5Rq5BwsPaQIBDz7R0p8JR8TZTxUXd48X4Y1ChcE0MWXkQfiUEQr7dtTiMqRj2TrCYODbd-IKVgLEreOonhGrdv-pzy80IDQfSzrUBjTopACR6KOXCz2sQheT7ubRN-H4P8S6sPPTRtYspVrn4pVUwcGJjcyHvV047IDZY3do2ogH-QVhnCMYc5CfGeA --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 0ms 1846 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) --Generate KeyPair-- KeyPair generated in 14870ms 33323825 ticks Public key: 4096 bits <RSAKeyValue><Modulus>8N2AtWBJhh+76Ro+iO+33mJosEf6a02zy5UD6Q7tillgQ+z1g8QzomD7f63cAg3kC3EpGcACo+HFNjyud/I61S1jpX5zI1saB8PhJ59birLNNCcCA8JODo0edHcZTgbeYIZnAxrHdrNMGmoUVm32RMRwG1/oVNuIbPZqtvKwUa6AljrTMTN6oibF89ZVWSLORAdm/1GykaxXXKx65+8bfUyWKtRtAy7D4DjX/AQ8QexoBM7ky679Co4cyCOG4CIYytjI21I5z/pvbTPs+LHnh0/InLZXFm8YOE+fJnAklXE4in2IMJMtG8QqwQi/Kl0u/3EyFnD9AvFaZBy1VNXBrRFTGW5XIHdh3et49o21KDpciHc+wlsV/fYbuTv36t7LgM8YyqN+9JQW+uqLvO+eIptWnrUfYsR6iVgS0epy7VLPynbIHRMFYnSjmlSL68+x86IOTn3AXotpamC2QcXBgjMW5P0FHPx9cRayAm+cF3tgaQtS5APzUda5vMBZb+lHcqmdWad4MkUgOqfa59NduAMZY1W38OjgUZwsDEJe8OHt/G4aZUmdVKO3BZczQTzdcpoOw+aWXkCfSC9dTgqfLLrdr9kettFkH/VZO7kU+plWo9CbOVoODXP0PbsF8gMmevqMELxNNG/15CMJUwT42UXT+uJHYY1deQbdVoozIdk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> Public key (encoded): PFJTQUtleVZhbHVlPjxNb2R1bHVzPjhOMkF0V0JKaGgrNzZSbytpTyszM21Kb3NFZjZhMDJ6eTVVRDZRN3RpbGxnUSt6MWc4UXpvbUQ3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IjoiSldUIn0.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiU0FTIiwiZXhwIjoxNDk0MDk3MzI3LCJpc3MiOiJub19hdWRpZW5jZSIsImF1ZCI6Im5vX2F1ZGllbmNlIn0.Hho2Cdo8gt1ecgJNfaLJ6XE4G27nCZWX0LRLUNEFSmhbVJa3deYCidEkPmhXP7TL_mSiQnPTouvcchWYpIs49wq0rJgRNROk0hOGCaOPxPD87ojJsWeoZU4T9NkicVztuuJ_4Q6wBc9vpkqVv6EEGNkjhoNl3q2j30FJydQK3rSi6P7daP6UE1UXzddxgx0KzKB7ooRv6MXwnxr-EbDjgo42YJdve0NeoBtJl9KqgE2WD3jPwtPtIrj9SkHXLszIpQi2jWMxCWm2-Qw8GaJFVA1yLhjW2NcMRedWJBkmKjWQ__Q4DRAHAkNO39SrJk8AVFP1m0_HGWc04sVp0xyllvB_4wnHrJNaL-YOaLBE388sZOhp4LWUcDRa0pysxS3KYM61OVJDv7bx9lXHKQPkknDlcJft6uPdUxDqLGPn4fli-TQM8a-5M_HgTAk3QYbyTB2LzK30es0Qv8vZ-6j9vwFUlgceV5jB3soM74B2rX_zMsCdaiFUrnG7kmhHTKBZls8S_b1CwkixtJ3ZVsytUizZLq3fyp0lKHIVLUKpOOWB-EXP1LLonEoFHVZKIqIvHvJbvqVpU1rXl_sSmh-KTstB3MjpHCGtlxW1Q0NXmVod3Glgj5d2czpaYQB05gcHazKvxTDrM0Y_PfDrxNnexlTcEzsSQ173AOalFecCb7k --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 4ms 10242 ticks ------------------------------------------------------------------------------------------ JWT tests - Key length: 4096bits, signature algo: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512) --Generate KeyPair-- KeyPair generated in 3891ms 8719711 ticks Public key: 4096 bits <RSAKeyValue><Modulus>rLNt0gWBiet9scdQilzIiXsvpBa49umKXIrm3Yj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hEY9ZEEbAEtmD13SU5sxmzuYUGQfGYsuW204M_DefTXeE0ct1Bdp7Lerq5nkTblDGjYeeK2zhbMKL0mT1QrIdyvaIlPbG8Q42mugLuRWxIkA4q4CmD519MuygcnrXUpPFDP2piVABGVFdmlbnedvtkuqplhOCOcnsicXu1ywRRQUP-GoYFHwQJJrAqxX0Xd3Aw_B4uU8eS2Xpg4Zigc5pJCZXKBQ3lZpTciSshWF0lJXzrl03AKDiPT9kuob4jNqHZrB_kRr6Pai5pSK_wLeQ9toW_8dHtLcv8MCAu7hFWeqqYpspBqUJ9VqxcrkEOpSHVvay0ygYFVPrDmRrQcnAf0tVkVoqXe3jPdS8sFggmr9mffcYJiz8z53NadXisdZtPHAluQWjHv-786wTbwwqH9nQEb9bsEpjQSj8PA_OZQB3KRE_BAdaAZaOowKmlnPTshYKCF1MA4uqeAkEoYB33kBdUDpIJ_L1A1MjN99aSvUJ3JIRh9WAcsHMi9ZIOL6h7v1LDnAF71nPcE9RrBbeAfZscjFZUdliRsjuWqJhW62oAhlugKEhzS2WY728 --JWT token verification with JwtSecurityTokenHandler -- JWT signature successfully verified in 3ms 8407 ticks ------------------------------------------------------------------------------------------ **************************Complete******************************** |
Conclusion
As expected the larger key generated does create a slightly larger time to verify the JWT Token but using C# and .NET 4.6, I found the time to verify was insignificant for a web application, when using a small key size of 2048 key size and 256 Sha algorithm. Having Jwt verification to secure your web application outpays the time it takes to verify it, I have not put in any network latency in this application, but probably those would be more significant than JWT verification.
Nice.
Next I’d be interested to see the performance of a cookie based session (which is technically more secure ) vs JWT encryption.
@Llewellyn
Cookie based session is not “technically more secure” than JWT, on the contrary.