Click here to Skip to main content
15,887,341 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I found this data
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJkYXRhIjoiSD
RzSUFBQUFBQUFBLytOaVlPQmtZRTlNTHNuTXp5dm1ZbUJnWU9SZ1lDbXBMRWhsNEFsMjlYT0o5
M1VORG5aMGQrVmdZTTlOTFM1T1RFOWxZUE5JemNrcFVHUmdBQUNEUG0zak93QUFBQT09IiwiaX
NzIjoiMzhkODg1M2QtY2RmZi00ZjgwLWI3ZWUtYjNiYjBkNjMwNzhmIiwidmVyc2lvbiI6MX0.
zhoFHIV1PfubTZu4UHZVrtSsGzsBd05DBLUfiRkFFtBTPJtiqsL3qW55zQwWsE-
o5ZrzKk1b0gmuQn_gbpY8Kg

and eventually found out it was a JWT. But the signature was apparently invalid according to JSON Web Tokens - jwt.io[^] And doing some experimenting I found out that the signature varied according to the data before it. (eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJkYXRhIjoiSDRzSUFBQUFBQUFBL
ytOaVlPQmtZRTlNTHNuTXp5dm1ZbUJnWU9SZ1lDbXBMRWhsNEFsMjlYT0o5M1VORG5aMGQrVmd
ZTTlOTFM1T1RFOWxZUE5JemNrcFVHUmdBQUNEUG0zak93QUFBQT09IiwiaXNzIjoiMzhkODg1M
2QtY2RmZi00ZjgwLWI3ZWUtYjNiYjBkNjMwNzhmIiwidmVyc2lvbiI6MX0
)

SO I'm wondering if anyone has any ideas of how to generate the verification based on the previous data, which I think it is being generated by.

What I have tried:

I have tested to see that varying in the data will affect the verification.


After decoding in JWT[^] I get this

{
  "typ": "JWT",
  "alg": "HS512"
}



{
  "data": "H4sIAAAAAAAA/+NiYOBkYE9MLsnMzyvmYmBgYORgYCmpLEhl4Al29XOJ93UNDnZ0d+VgYM9NLS5OTE9lYPNIzckpUGRgAACDPm3jOwAAAA==",
  "iss": "38d8853d-cdff-4f80-b7ee-b3bb0d63078f",
  "version": 1
}


I have tested and seen that "data" effects verification and so does "iss".
I do not know about version or type or alg as I do not think I can change these.

I used A site and it told me the number of chars of the verification is 86, which I then started looking for any hashing methods or other stuff that could generate that length.

Does anyone have any idea about how to generate this string based of the other data?

Thanks for any responses!
Posted
Updated 14-Jul-23 16:34pm
v4

1 solution

There is a button on that page that you posted a link to that says Learn More. Here is the page that it goes to : JSON Web Token Introduction - jwt.io[^]. IT explains in detail what is, what it is for, and more.

Looking at your question history, you're a C# programmer. It is always a good idea to tag your question and let us know what app framework you are working with. I'll assume ASP.Net Core. Here is a great video that goes into great detail and shows you all that you need to know about working with JWT tokens: ASP.NET Core JWT Authentication Tutorial (.NET 7 Minimal Apis C#) - YouTube[^]
 
Share this answer
 
Comments
G Schulz 14-Jul-23 20:00pm    
Hi, thanks for your response! But it seems the verifications I get is the wrong length meaning that it is being generated differently. And I am wondering if anyone has any idea about how it is being generated. Thanks for your response though!
Graeme_Grant 14-Jul-23 20:02pm    
Watch the video in the link provided. All answers are there for you! He explains this in the first 30 seconds. He walks you through each step and you can watch him do it.
G Schulz 14-Jul-23 20:03pm    
Alright, I'll take a look. Thanks!
Graeme_Grant 14-Jul-23 20:41pm    
Did that answer your questions?
G Schulz 14-Jul-23 22:46pm    
I think it helped, I didn't finish the video
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900