Weak RSA Key Size (ARCH5117)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key go.security.weak-rsa-key-size · Severity warning · Category security · CWE CWE-326
RSA keys below 2048 bits are no longer considered secure; modern compute can factor them, breaking the encryption or signatures.
Incorrect
Section titled “Incorrect”func newKey() (*rsa.PrivateKey, error) { return rsa.GenerateKey(rand.Reader, 1024)}Correct
Section titled “Correct”func newKey() (*rsa.PrivateKey, error) { return rsa.GenerateKey(rand.Reader, 2048)}Generate RSA keys with at least 2048 bits (preferably 3072+).