{
  "id": "security/weak-rsa-key-size-rejected",
  "signature": "RSA key size 1024 bits is too small: key exchange failed",
  "signature_zh": "RSA 密钥大小 1024 位太小：密钥交换失败",
  "regex": "RSA key size (?:is|of) 1024 (?:bits|bytes).*(?:too small|rejected|not allowed)",
  "domain": "security",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The RSA key is only 1024 bits, which is below the minimum recommended size (2048 bits) and is rejected by security policies.",
  "root_cause_type": "generic",
  "root_cause_zh": "RSA 密钥仅为 1024 位，低于建议的最小大小（2048 位），被安全策略拒绝。",
  "versions": [
    {
      "version": "OpenSSL 1.1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "OpenSSL 3.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Java 8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Java 11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Nginx 1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the key size on the server without regenerating the certificate doesn't work; the certificate is separate from the key.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting the cipher suite to a different RSA variant doesn't change the key size requirement.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling the security policy globally is not recommended and often fails due to other compliance checks.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Generate a new RSA key with 2048 or 4096 bits. OpenSSL: `openssl genrsa -out newkey.pem 2048` then reissue the certificate.",
      "success_rate": 0.95,
      "how": "Generate a new RSA key with 2048 or 4096 bits. OpenSSL: `openssl genrsa -out newkey.pem 2048` then reissue the certificate.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you control the client, configure it to allow 1024-bit keys only for testing, e.g., Java: `-Djava.security.properties=...` to relax policy, but avoid in production.",
      "success_rate": 0.3,
      "how": "If you control the client, configure it to allow 1024-bit keys only for testing, e.g., Java: `-Djava.security.properties=...` to relax policy, but avoid in production.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use ECDSA keys (e.g., P-256) instead, which provide equivalent security with smaller key sizes: `openssl ecparam -genkey -name prime256v1 -out eckey.pem`.",
      "success_rate": 0.85,
      "how": "Use ECDSA keys (e.g., P-256) instead, which provide equivalent security with smaller key sizes: `openssl ecparam -genkey -name prime256v1 -out eckey.pem`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "生成新的 2048 或 4096 位 RSA 密钥。OpenSSL：`openssl genrsa -out newkey.pem 2048`，然后重新签发证书。",
    "如果您控制客户端，可以配置其仅用于测试时允许 1024 位密钥，例如 Java：`-Djava.security.properties=...` 放宽策略，但避免在生产环境中使用。",
    "改用 ECDSA 密钥（例如 P-256），它使用较小的密钥大小提供等效安全性：`openssl ecparam -genkey -name prime256v1 -out eckey.pem`。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf",
  "official_doc_section": null,
  "error_code": "SSL_R_WRONG_RSA_KEY_SIZE",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2023-07-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}