Standard Library

GoCryptoRsa

Go stdlib package — crypto/rsa. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.DecryptOAEP()Neutral
#
Signature
DecryptOAEP(hash hash.Hash, random io.Reader, priv *PrivateKey, ciphertext []byte, label []byte) ([]byte, error)

DecryptOAEP decrypts ciphertext using RSA-OAEP.

.DecryptPKCS1v15()Neutral
#
Signature
DecryptPKCS1v15(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]byte, error)

DecryptPKCS1v15 decrypts a plaintext using RSA and the padding scheme from PKCS #1 v1.5.

.DecryptPKCS1v15SessionKey()Neutral
#
Signature
DecryptPKCS1v15SessionKey(random io.Reader, priv *PrivateKey, ciphertext []byte, key []byte) error

DecryptPKCS1v15SessionKey decrypts a session key using RSA and the padding

.EncryptOAEP()Neutral
#
Signature
EncryptOAEP(hash hash.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error)

EncryptOAEP encrypts the given message with RSA-OAEP.

.EncryptPKCS1v15()Neutral
#
Signature
EncryptPKCS1v15(random io.Reader, pub *PublicKey, msg []byte) ([]byte, error)

EncryptPKCS1v15 encrypts the given message with RSA and the padding

.GenerateKey()Neutral
#
Signature
GenerateKey(random io.Reader, bits int) (*PrivateKey, error)

GenerateKey generates a random RSA private key of the given bit size.

.GenerateMultiPrimeKey()Neutral
#
Signature
GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*PrivateKey, error)

GenerateMultiPrimeKey generates a multi-prime RSA keypair of the given bit

.PSSOptions.HashFunc()Neutral
#
Signature
PSSOptions.HashFunc() crypto.Hash

HashFunc returns opts.Hash so that PSSOptions implements crypto.SignerOpts.

.PrivateKey.Decrypt()Neutral
#
Signature
PrivateKey.Decrypt(rand io.Reader, ciphertext []byte, opts crypto.DecrypterOpts) ([]byte, error)

Decrypt decrypts ciphertext with priv. If opts is nil or of type

.PrivateKey.Equal()Neutral
#
Signature
PrivateKey.Equal(x crypto.PrivateKey) bool

Equal reports whether priv and x have equivalent values. It ignores

Fully-Qualified Names

FQNField
crypto/rsafqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # crypto/rsa