Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

security.cryptography

Use at least 2048-bit RSA keys

`rsa.GenerateKey` and `rsa.GenerateMultiPrimeKey` should request a key size of 2048 bits or higher.

#Metadata

Rule ID
go.security.weak-rsa-key-size
Severity
high
Confidence
0.9
Languages
go
Presets
security, strict
Stability
experimental
Applies to
block
Tags
cryptography, go, rsa, rules-catalog, security

#Why it matters

RSA moduli below 2048 bits are considered cryptographically weak and feasible to attack with modern resources.

#Remediation

Generate RSA keys with at least 2048 bits, or prefer Ed25519/ECDSA for new code where appropriate.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/go/go.security.weak-rsa-key-size.rule.yaml.