Documentation ¶
Index ¶
- func GenerateEICEKey() (publicKey any, privateKey any, err error)
- func GenerateKeyPair() ([]byte, []byte, error)
- func GeneratePrivateKey() (*keys.PrivateKey, error)
- func GenerateRSAPrivateKey() (*rsa.PrivateKey, error)
- func IsBoringBinary() bool
- func PrecomputeKeys()
- func PrecomputeTestKeys(_ *testing.M)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEICEKey ¶
GenerateEICEKey generates a key that can be send to an Amazon EC2 instance using the ec2instanceconnect.SendSSHPublicKey method.
func GenerateKeyPair ¶
GenerateKeyPair generates a new RSA key pair.
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*keys.PrivateKey, error)
GeneratePrivateKey generates a new RSA private key.
func GenerateRSAPrivateKey ¶
func GenerateRSAPrivateKey() (*rsa.PrivateKey, error)
func IsBoringBinary ¶
func IsBoringBinary() bool
IsBoringBinary checks if the binary was compiled with BoringCrypto.
func PrecomputeKeys ¶
func PrecomputeKeys()
PrecomputeKeys sets this package into a mode where a small backlog of keys are computed in advance. This should only be enabled if large spikes in key computation are expected (e.g. in auth/proxy services). Safe to double-call.
func PrecomputeTestKeys ¶
PrecomputeTestKeys generates RSA keys and reuse them to reduce CPU usage. This method should only be in tests. Safe to call multiple times. This function takes *testing.M, so is only can be used from TestMain in tests.
Types ¶
This section is empty.