Reputation: 3660
What does "e": "AQAB"
mean in JWKS - Json Web Key Set
{
"keys": [
{
"kty": "RSA", #key type
"e": "AQAB", #Question - what does "e" mean or stand for. And what values can e take. What is AQAB here.
"use": "sig", #verify client assertion signature. This means what is the use of the key. Answer - to verify signature. Right?
"kid": "somebase64encodestring", #key id
"alg": "RS256", #key algoritham. Here it is RSA.
"n": "anotherbase64encodestring" #This is the actual public key base64 encoded.
}
]
}
Upvotes: 16
Views: 12915
Reputation: 2461
It's part of the public key too. From https://datatracker.ietf.org/doc/html/rfc7518#section-6.3.1.2
6.3.1.2. "e" (Exponent) Parameter
The "e" (exponent) parameter contains the exponent value for the RSA public key. It is represented as a Base64urlUInt-encoded value.
For instance, when representing the value 65537, the octet sequence to be base64url-encoded MUST consist of the three octets [1, 0, 1]; the resulting representation for this value is "AQAB".
Example on Bash command line:
Decimal 65537
=> converts to hexadecimal 0x010001
=> encodes to Base64 AQAB
like so:
$ printf '%06x' 65537 | xxd -r -p | xxd
00000000: 0100 01 ...
$ printf '%06x' 65537 | xxd -r -p | base64
AQAB
Upvotes: 14