oauth2.dev

p

IESG

Registry Context

The "p" parameter contains the first prime factor of an RSA private key represented as a JWK.

Technical Summary

RFC 7518 defines "p" as a Base64urlUInt-encoded first prime factor. For RSA private JWKs, "d" is REQUIRED; optimization parameters such as "p" SHOULD be included; and including any optimization parameter requires all of them except "oth", which is conditional on using more than two prime factors.

When Used

When representing an RSA private key as a JWK.

Normative Requirements

producers of JWKs representing RSA private keys

REQUIRED
1
  1. RFC 7518 - Section 6.3.2

    include the "d" parameter.

    Condition: when representing an RSA private key

    The parameter "d" is REQUIRED for RSA private keys.

SHOULD
1
  1. RFC 7518 - Section 6.3.2

    include the optimization parameters, including "p".

    Condition: when representing an RSA private key

    The others enable optimizations and SHOULD be included by producers of JWKs representing RSA private keys.

the producer

MUST
1
  1. RFC 7518 - Section 6.3.2

    include all other RSA private-key optimization parameters, including "p".

    Condition: if any of the other private-key parameters are included, subject to the exception for "oth"

    If the producer includes any of the other private key parameters, then all of the others MUST be present, with the exception of "oth".

Validation Guidance

error

For an RSA private JWK, verify that "d" is present.

error

If any RSA private-key optimization parameter is present, verify that "p" and all other optimization parameters are present, except that "oth" is conditional.

info

For producers of RSA private JWKs, prefer including "p" as part of the optimization parameter set.

error

Verify that "p" is represented as a Base64urlUInt-encoded value.

Reference

Details

Entry Id
p
Parameter Name
p
Parameter Description
First Prime Factor
Used With Kty Value
RSA
Parameter Information Class
Private
Change Controller
IESG
Reference
RFC7518 - Section 6.3.2.2