Skip to content

Align certificate validity and RSA defaults with AOSP#167

Merged
JingMatrix merged 1 commit intomainfrom
merge
Mar 21, 2026
Merged

Align certificate validity and RSA defaults with AOSP#167
JingMatrix merged 1 commit intomainfrom
merge

Conversation

@JingMatrix
Copy link
Copy Markdown
Owner

  1. Certificate Validity: Matches add_required_parameters:

    • NotBefore: Unix Epoch (0).
    • NotAfter: RFC 5280 GeneralizedTime max (9999-12-31). Previous defaults (Current Time to +1 Year) imply a fingerprinting risk.
  2. RSA Exponent: Added a null-safe fallback to F4 (65537). This prevents a NullPointerException when callers omit the public exponent parameter.

Corresponding references:

  1. https://cs.android.com/android/platform/superproject/+/android-latest-release:system/security/keystore2/src/security_level.rs;
  2. https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java;

1. Certificate Validity: Matches `add_required_parameters`:
   - NotBefore: Unix Epoch (0).
   - NotAfter: RFC 5280 GeneralizedTime max (9999-12-31). Previous
     defaults (Current Time to +1 Year) imply a fingerprinting risk.

2. RSA Exponent: Added a null-safe fallback to F4 (65537). This prevents
   a NullPointerException when callers omit the public exponent
   parameter.

Corresponding references:
1. https://cs.android.com/android/platform/superproject/+/android-latest-release:system/security/keystore2/src/security_level.rs;
2. https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java;
@JingMatrix JingMatrix merged commit 29f2c30 into main Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants