[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-12。"],[[["\u003cp\u003eWhen setting up a Certificate Authority (CA), you must select a signing algorithm for the Cloud Key Management Service key, choosing between RSA and ECDSA families.\u003c/p\u003e\n"],["\u003cp\u003eRSA algorithms are ideal for compatibility with legacy systems due to their widespread support, with \u003ccode\u003eRSA_SIGN_PSS\u003c/code\u003e being preferred for newer systems and \u003ccode\u003eRSA_SIGN_PKCS1\u003c/code\u003e for older ones.\u003c/p\u003e\n"],["\u003cp\u003eECDSA algorithms offer strong security with smaller key sizes, making them efficient for storage and data transmission, and they are available in \u003ccode\u003eEC_SIGN_P256\u003c/code\u003e and \u003ccode\u003eEC_SIGN_P384\u003c/code\u003e variants.\u003c/p\u003e\n"],["\u003cp\u003eFor new root CAs or long-lived subordinate CAs, it's recommended to use the largest key size available within the chosen algorithm family, such as 4096 bits for RSA or 384 bits for ECDSA.\u003c/p\u003e\n"],["\u003cp\u003eThe guide recommends choosing an algorithm family first (based on root CA's or legacy system support), then selecting a specific signature algorithm (PSS or PKCS1 for RSA), and finally determining the key size based on CA lifetime and security needs.\u003c/p\u003e\n"]]],[],null,["# Choose a key algorithm\n======================\n\nBefore creating a certificate authority (CA), you must choose a signing\nalgorithm for the CA's backing Cloud Key Management Service key. Certificate Authority Service allows\ncreation of CAs with preexisting Cloud KMS keys using any of the\nsupported [asymmetric signing algorithms](/kms/docs/algorithms#asymmetric_signing_algorithms),\nor by choosing from a\n[smaller subset](/certificate-authority-service/docs/reference/rest/v1/projects.locations.caPools.certificateAuthorities#signhashalgorithm)\nof those algorithms and having the service create and manage the key lifecycle.\n\nThis page mentions the factors you must consider when deciding a CA's\nsigning algorithm.\n\nAlgorithm families\n------------------\n\nCloud KMS supports two families of algorithms for asymmetric signing\noperations: RSA and ECDSA.\n| **Note:** CA Service doesn't support Ed25519 algorithms.\n\n### RSA\n\nRSA-based signature schemes enjoy wide compatibility across multiple platforms\nby virtue of their age. If you need to support clients using legacy operating\nsystems, protocols, firmware or other technology stacks, RSA is a common choice.\n\nCloud KMS exposes two major variants of RSA signature algorithms:\n`RSA_SIGN_PSS` and `RSA_SIGN_PKCS1`. The `PSS` variants use the RSASSA-PSS\nsignature scheme described in\n[section 8.1](https://tools.ietf.org/html/rfc8017#section-8.1)\nof RFC 8017, which is newer and considered more verifiably secure. The `PKCS1`\nvariants use the older PKCS#1 v1.5 signature scheme described in\n[section 8.2](https://tools.ietf.org/html/rfc8017#section-8.2) of RFC 8017.\n\nNewer hierarchies are encouraged to use the `PSS` variants if all the applications\nthat might use those certificates support it. Otherwise, the `PKCS1` variants\nare a more suitable choice due to their wider support.\n\n### ECDSA\n\nWhile asymmetric keys based on elliptic curves are relatively newer than their\nRSA counterparts, they are still supported in many of the most common technology\nstacks released over the last decade. They are especially popular because they\ncan achieve similar levels of security strength to RSA keys using smaller key\nsizes. Applications that use ECDSA keys store and transmit less data over the wire.\n\nCloud KMS exposes two major variants of ECDSA signature algorithms:\n`EC_SIGN_P256` and `EC_SIGN_P384`.\n\n### Mixed chains\n\nA mixed (or hybrid) chain is a certificate chain where one or more certificates\nuse different key algorithm families, such as RSA in some certificates and\nECDSA in others. Some technology stacks have trouble parsing mixed certificate chains,\nand might show unexpected errors for those cases. In addition, some industries\ncan have compliance requirements that require a CA chain to use a single\nalgorithm family.\n\nIt is typical to set up a separate CA chain for ECDSA keys than the ones used\nfor RSA keys.\n| **Note:** Unlike algorithm families, using different key sizes within a chain is a common practice.\n\nKey size\n--------\n\nWhile larger key sizes (within the same family) provide greater security\nstrength, they also result in more data being stored and transmitted over the\nwire. In addition, encryption and signing operations can sometimes take longer\nwith larger key sizes, though this is usually too small to notice.\n\nA typical practice is for longer-lasting keys, such as those associated with\nroot or long-lived subordinate CAs, to use key sizes with greater security\nstrength than other keys.\n| **Note:** Regardless of the chosen key size or intended CA lifetime, we recommend defining a process for key rotation. A CA key may need to be rotated earlier than expected due to events such as key compromise, or newer advancements in cryptography that might result in weakened security.\n\nDecision-making guide\n---------------------\n\nYou can use this simple guide to help you choose an appropriate signing\nalgorithm for your CA key:\n\n1. **Choose an algorithm family**\n\n If you are creating a subordinate CA chaining up to an existing root CA, use\n the same family as the root.\n\n If you are creating a new root CA but need to work with legacy systems\n that don't support ECDSA, use one of the\n [RSA signing algorithms](/kms/docs/algorithms#rsa_signing_algorithms).\n\n Otherwise, use one of the\n [Elliptic curve signing algorithms](/kms/docs/algorithms#elliptic_curve_signing_algorithms).\n2. (RSA only) **Choose a signature algorithm**\n\n If you expect to work with older libraries or frameworks that don't support\n PSS, use one of the `RSA_SIGN_PKCS1` algorithms.\n\n Otherwise, use one of the `RSA_SIGN_PSS` algorithms.\n3. **Choose a key size**\n\n For a new root CA or a subordinate CA that is expected to have a lifetime in\n the order of years, we recommend that you use the largest key size available\n for that algorithm family.\n - For RSA, the largest supported key size is 4096 bits.\n - For ECDSA, the largest supported key size is 384 bits.\n\n For subordinate CAs with a shorter lifetime, it is sufficient to use smaller\n key sizes, such as 2048 bits for RSA or 256 bits for ECDSA.\n\nWhat's next\n-----------\n\n- Learn about [Cloud KMS: Key purposes and algorithms](/kms/docs/algorithms).\n- Learn about [Cloud KMS: Digital signatures](/kms/docs/digital-signatures).\n- Learn how to [manage resources](/certificate-authority-service/docs/managed-resources)."]]