Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for boringPrivateKey (0.2 sec)

  1. src/crypto/rsa/notboring.go

    //go:build !boringcrypto
    
    package rsa
    
    import "crypto/internal/boring"
    
    func boringPublicKey(*PublicKey) (*boring.PublicKeyRSA, error) {
    	panic("boringcrypto: not available")
    }
    func boringPrivateKey(*PrivateKey) (*boring.PrivateKeyRSA, error) {
    	panic("boringcrypto: not available")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:22 UTC 2022
    - 445 bytes
    - Viewed (0)
  2. src/crypto/ecdsa/notboring.go

    //go:build !boringcrypto
    
    package ecdsa
    
    import "crypto/internal/boring"
    
    func boringPublicKey(*PublicKey) (*boring.PublicKeyECDSA, error) {
    	panic("boringcrypto: not available")
    }
    func boringPrivateKey(*PrivateKey) (*boring.PrivateKeyECDSA, error) {
    	panic("boringcrypto: not available")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:22 UTC 2022
    - 451 bytes
    - Viewed (0)
  3. src/crypto/rsa/pkcs1v15.go

    func DecryptPKCS1v15(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]byte, error) {
    	if err := checkPub(&priv.PublicKey); err != nil {
    		return nil, err
    	}
    
    	if boring.Enabled {
    		bkey, err := boringPrivateKey(priv)
    		if err != nil {
    			return nil, err
    		}
    		out, err := boring.DecryptRSAPKCS1(bkey, ciphertext)
    		if err != nil {
    			return nil, ErrDecryption
    		}
    		return out, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  4. src/crypto/ecdsa/boring.go

    	if err != nil {
    		return nil, err
    	}
    	b.key = key
    	pubCache.Put(pub, b)
    	return key, nil
    }
    
    type boringPriv struct {
    	key  *boring.PrivateKeyECDSA
    	orig PrivateKey
    }
    
    func boringPrivateKey(priv *PrivateKey) (*boring.PrivateKeyECDSA, error) {
    	b := privCache.Get(priv)
    	if b != nil && privateKeyEqual(&b.orig, priv) {
    		return b.key, nil
    	}
    
    	b = new(boringPriv)
    	b.orig = copyPrivateKey(priv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 18 00:30:19 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  5. src/crypto/rsa/pss.go

    	emBits := priv.N.BitLen() - 1
    	em, err := emsaPSSEncode(hashed, emBits, salt, hash.New())
    	if err != nil {
    		return nil, err
    	}
    
    	if boring.Enabled {
    		bkey, err := boringPrivateKey(priv)
    		if err != nil {
    			return nil, err
    		}
    		// Note: BoringCrypto always does decrypt "withCheck".
    		// (It's not just decrypt.)
    		s, err := boring.DecryptRSANoPadding(bkey, em)
    		if err != nil {
    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/boring.go

    	if err != nil {
    		return nil, err
    	}
    	b.key = key
    	pubCache.Put(pub, b)
    	return key, nil
    }
    
    type boringPriv struct {
    	key  *boring.PrivateKeyRSA
    	orig PrivateKey
    }
    
    func boringPrivateKey(priv *PrivateKey) (*boring.PrivateKeyRSA, error) {
    	b := privCache.Get(priv)
    	if b != nil && privateKeyEqual(&b.orig, priv) {
    		return b.key, nil
    	}
    
    	b = new(boringPriv)
    	b.orig = copyPrivateKey(priv)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 18 00:30:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  7. src/crypto/ecdsa/ecdsa.go

    func SignASN1(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error) {
    	randutil.MaybeReadByte(rand)
    
    	if boring.Enabled && rand == boring.RandReader {
    		b, err := boringPrivateKey(priv)
    		if err != nil {
    			return nil, err
    		}
    		return boring.SignMarshalECDSA(b, hash)
    	}
    	boring.UnreachableExceptTests()
    
    	csprng, err := mixedCSPRNG(rand, priv, hash)
    	if err != 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)
  8. src/crypto/rsa/rsa.go

    		return nil, err
    	}
    	k := priv.Size()
    	if len(ciphertext) > k ||
    		k < hash.Size()*2+2 {
    		return nil, ErrDecryption
    	}
    
    	if boring.Enabled {
    		bkey, err := boringPrivateKey(priv)
    		if err != nil {
    			return nil, err
    		}
    		out, err := boring.DecryptRSAOAEP(hash, mgfHash, bkey, ciphertext, label)
    		if err != nil {
    			return nil, ErrDecryption
    		}
    		return out, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top