Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for RandReader (0.16 sec)

  1. src/crypto/internal/boring/notboring.go

    // when BoringCrypto is in use. It is a no-op without BoringCrypto.
    func UnreachableExceptTests() {}
    
    type randReader int
    
    func (randReader) Read(b []byte) (int, error) { panic("boringcrypto: not available") }
    
    const RandReader = randReader(0)
    
    func NewSHA1() hash.Hash   { panic("boringcrypto: not available") }
    func NewSHA224() hash.Hash { panic("boringcrypto: not available") }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 26 22:52:27 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. cmd/perf-tests.go

    	"github.com/minio/minio-go/v7"
    	"github.com/minio/minio-go/v7/pkg/credentials"
    	xhttp "github.com/minio/minio/internal/http"
    	xioutil "github.com/minio/minio/internal/ioutil"
    	"github.com/minio/pkg/v3/randreader"
    )
    
    // SpeedTestResult return value of the speedtest function
    type SpeedTestResult struct {
    	Endpoint      string
    	Uploads       uint64
    	Downloads     uint64
    	UploadTimes   madmin.TimeDurations
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  3. src/crypto/ecdh/nist.go

    	return c.name
    }
    
    var errInvalidPrivateKey = errors.New("crypto/ecdh: invalid private key")
    
    func (c *nistCurve[Point]) GenerateKey(rand io.Reader) (*PrivateKey, error) {
    	if boring.Enabled && rand == boring.RandReader {
    		key, bytes, err := boring.GenerateKeyECDH(c.name)
    		if err != nil {
    			return nil, err
    		}
    		return newBoringPrivateKey(c, key, bytes)
    	}
    
    	key := make([]byte, len(c.scalarOrder))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. src/crypto/ecdsa/ecdsa.go

    // and may change between calls and/or between versions.
    func GenerateKey(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) {
    	randutil.MaybeReadByte(rand)
    
    	if boring.Enabled && rand == boring.RandReader {
    		x, y, d, err := boring.GenerateKeyECDSA(c.Params().Name)
    		if err != nil {
    			return nil, err
    		}
    		return &PrivateKey{PublicKey: PublicKey{Curve: c, X: bbig.Dec(x), Y: bbig.Dec(y)}, D: bbig.Dec(d)}, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  5. src/crypto/rsa/pss.go

    	// it's probably relied upon by some. It's a tolerable promise because a
    	// well-specified number of random bytes is included in the signature, in a
    	// well-specified way.
    
    	if boring.Enabled && rand == boring.RandReader {
    		bkey, err := boringPrivateKey(priv)
    		if err != nil {
    			return nil, err
    		}
    		return boring.SignRSAPSS(bkey, hash, digest, opts.saltLength())
    	}
    	boring.UnreachableExceptTests()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. src/crypto/rsa/rsa.go

    func GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*PrivateKey, error) {
    	randutil.MaybeReadByte(random)
    
    	if boring.Enabled && random == boring.RandReader && nprimes == 2 &&
    		(bits == 2048 || bits == 3072 || bits == 4096) {
    		bN, bE, bD, bP, bQ, bDp, bDq, bQinv, err := boring.GenerateKeyRSA(bits)
    		if err != nil {
    			return nil, err
    		}
    		N := bbig.Dec(bN)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  7. src/crypto/rsa/pkcs1v15.go

    	if err := checkPub(pub); err != nil {
    		return nil, err
    	}
    	k := pub.Size()
    	if len(msg) > k-11 {
    		return nil, ErrMessageTooLong
    	}
    
    	if boring.Enabled && random == boring.RandReader {
    		bkey, err := boringPublicKey(pub)
    		if err != nil {
    			return nil, err
    		}
    		return boring.EncryptRSAPKCS1(bkey, msg)
    	}
    	boring.UnreachableExceptTests()
    
    	// EM = 0x00 || 0x02 || PS || 0x00 || M
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top