Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for boringPublicKey (0.34 sec)

  1. src/crypto/rsa/notboring.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //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

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //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

    	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)
  4. src/crypto/ecdsa/boring.go

    var privCache bcache.Cache[PrivateKey, boringPriv]
    
    func init() {
    	pubCache.Register()
    	privCache.Register()
    }
    
    type boringPub struct {
    	key  *boring.PublicKeyECDSA
    	orig PublicKey
    }
    
    func boringPublicKey(pub *PublicKey) (*boring.PublicKeyECDSA, error) {
    	b := pubCache.Get(pub)
    	if b != nil && publicKeyEqual(&b.orig, pub) {
    		return b.key, nil
    	}
    
    	b = new(boringPub)
    	b.orig = copyPublicKey(pub)
    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/boring.go

    	orig PublicKey
    }
    
    var pubCache bcache.Cache[PublicKey, boringPub]
    var privCache bcache.Cache[PrivateKey, boringPriv]
    
    func init() {
    	pubCache.Register()
    	privCache.Register()
    }
    
    func boringPublicKey(pub *PublicKey) (*boring.PublicKeyRSA, error) {
    	b := pubCache.Get(pub)
    	if b != nil && publicKeyEqual(&b.orig, pub) {
    		return b.key, nil
    	}
    
    	b = new(boringPub)
    	b.orig = copyPublicKey(pub)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 18 00:30:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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