--- title: "Best practices: Managing cryptographic keys" slug: "oas-ag-best-practices-managing-cryptographic-keys-3-29" updated: 2026-01-14T12:59:56Z published: 2026-01-14T17:08:33Z canonical: "docs.onespan.com/oas-ag-best-practices-managing-cryptographic-keys-3-29" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Best practices: Managing cryptographic keys - **Use the maximum key length.** When you create new keys, always use the maximum key length (256 bit for storage data, 128 bit for sensitive data). - **Perform regular key rotation.** Cryptographic key rotation should be executed on all keys at least once a year (i.e. scheduled bulk rotation), or even more frequently if required by the security policy in place. More frequent key rotations typically equate to better security. - **Perform on-the-fly key rotation.** It is highly advisable to rotate keys as soon as they are added (i.e. on-the-fly rotation). Combining scheduled bulk rotation and individual on-the-fly rotation constitutes sound security policy. For more information about performing key rotations individually or in bulk, see [Creating and managing cryptographic keys](/sec/docs/oas-ag-creating-and-managing-cryptographic-keys-3-29). - **Handle old and compromised keys.** Implement a strict policy regarding old and compromised keys. Such a policy should include procedures for retiring, archiving, destroying, or revoking such keys, and should also include steps to address suspected compromised keys. - **Limit key management privileges.** Limit the number of users with administrative privileges for key management, e.g. Rotate Key, or Create Key. By default, these privileges are not assigned to imported or newly created users.