Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for boringPublicKey (0.15 sec)

  1. 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
    	em := make([]byte, k)
    	em[1] = 2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. src/crypto/rsa/pss.go

    // channels, or if an attacker has control of part of the inputs.
    func VerifyPSS(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error {
    	if boring.Enabled {
    		bkey, err := boringPublicKey(pub)
    		if err != nil {
    			return err
    		}
    		if err := boring.VerifyRSAPSS(bkey, hash, digest, sig, opts.saltLength()); err != nil {
    			return ErrVerification
    		}
    		return nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. src/crypto/rsa/rsa.go

    		return nil, err
    	}
    	hash.Reset()
    	k := pub.Size()
    	if len(msg) > k-2*hash.Size()-2 {
    		return nil, ErrMessageTooLong
    	}
    
    	if boring.Enabled && random == boring.RandReader {
    		bkey, err := boringPublicKey(pub)
    		if err != nil {
    			return nil, err
    		}
    		return boring.EncryptRSAOAEP(hash, hash, bkey, msg, label)
    	}
    	boring.UnreachableExceptTests()
    
    	hash.Write(label)
    	lHash := hash.Sum(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)
  4. src/crypto/ecdsa/ecdsa.go

    // channels, or if an attacker has control of part of the inputs.
    func VerifyASN1(pub *PublicKey, hash, sig []byte) bool {
    	if boring.Enabled {
    		key, err := boringPublicKey(pub)
    		if err != nil {
    			return false
    		}
    		return boring.VerifyECDSA(key, hash, sig)
    	}
    	boring.UnreachableExceptTests()
    
    	if err := verifyAsm(pub, hash, sig); err != errNoAsm {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top