go/doc/next/6-stdlib/99-minor/crypto/rsa/68762.md

487 B

[GenerateKey] now returns an error if a key of less than 1024 bits is requested. All Sign, Verify, Encrypt, and Decrypt methods now return an error if used with a key smaller than 1024 bits. Such keys are insecure and should not be used. Setting GODEBUG=rsa1024min=0 or including //go:debug rsa1024min=0 in a source file restores the old behavior, but we recommend doing so only in tests, if necessary. A new [GenerateKey] example provides an easy-to-use standard 2048-bit test key.