2019-05-23 01:31:11 +08:00
|
|
|
package crypto
|
|
|
|
|
|
|
|
import (
|
2022-08-18 23:54:48 +08:00
|
|
|
"github.com/libp2p/go-libp2p/core/crypto"
|
2019-05-23 01:31:11 +08:00
|
|
|
)
|
|
|
|
|
2019-08-02 07:05:47 +08:00
|
|
|
// WeakRsaKeyEnv is an environment variable which, when set, lowers the
|
2019-07-13 04:04:56 +08:00
|
|
|
// minimum required bits of RSA keys to 512. This should be used exclusively in
|
|
|
|
// test situations.
|
2022-08-18 23:54:48 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.WeakRsaKeyEnv instead
|
|
|
|
const WeakRsaKeyEnv = crypto.WeakRsaKeyEnv
|
2019-07-13 04:04:56 +08:00
|
|
|
|
2022-08-18 23:54:48 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MinRsaKeyBits instead
|
|
|
|
var MinRsaKeyBits = crypto.MinRsaKeyBits
|
2019-07-11 05:54:14 +08:00
|
|
|
|
2019-05-23 01:31:11 +08:00
|
|
|
// ErrRsaKeyTooSmall is returned when trying to generate or parse an RSA key
|
2019-07-13 04:04:56 +08:00
|
|
|
// that's smaller than MinRsaKeyBits bits. In test
|
2022-08-18 23:54:48 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrRsaKeyTooSmall instead
|
2019-07-13 04:04:56 +08:00
|
|
|
var ErrRsaKeyTooSmall error
|