This one's very straightforward but I'm struggling to find the answer elsewhere. Given an RS256 keypair, which of the variables is the private key?
I've generated a RS256 JWK at mkjwk.org and it looks like this:
{
"p": "some string value",
"kty": "another string value etc these are all just strings",
"q": ..,
"d": ..,
"e": ..,
"use": ..,
"kid": ..,
"qi": ..,
"dp": ..,
"alg": ..,
"dq": ..,
"n": ..
}
I want to use this to sign a payload using pyjwt as follows:
encoded = jwt.encode({'some': 'payload'}, private_key, algorithm='RS256')
The private_key
variable needs to be a string. So which string is it?
I have some basic understanding of how RSA works and that there are different variables involved in the key generation process. But all the resource I've seen don't mention what variable each of p, q, di etc are for example:
another question: Create RSA instance from JWKS without knowing primes p or q