Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for BoringCrypto (0.26 sec)

  1. src/crypto/ecdh/ecdh_test.go

    			if err == nil {
    				t.Errorf("unexpectedly accepted %q", input)
    			} else if k != nil {
    				t.Error("PrivateKey was not nil on error")
    			} else if strings.Contains(err.Error(), "boringcrypto") {
    				t.Errorf("boringcrypto error leaked out: %v", err)
    			}
    		}
    	})
    }
    
    var invalidPublicKeys = map[ecdh.Curve][]string{
    	ecdh.P256(): {
    		// Bad lengths.
    		"",
    		"04",
    		strings.Repeat("04", 200),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 18K bytes
    - Viewed (0)
  2. src/crypto/internal/boring/rsa.go

    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build boringcrypto && linux && (amd64 || arm64) && !android && !msan
    
    package boring
    
    // #include "goboringcrypto.h"
    import "C"
    import (
    	"crypto"
    	"crypto/subtle"
    	"errors"
    	"hash"
    	"runtime"
    	"strconv"
    	"unsafe"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 23:38:03 UTC 2024
    - 12K bytes
    - Viewed (0)
  3. src/crypto/ed25519/ed25519_test.go

    	}
    
    	if Verify(publicKey, msg, sig) {
    		t.Fatal("non-canonical signature accepted")
    	}
    }
    
    func TestAllocations(t *testing.T) {
    	if boring.Enabled {
    		t.Skip("skipping allocations test with BoringCrypto")
    	}
    	testenv.SkipIfOptimizationOff(t)
    
    	if allocs := testing.AllocsPerRun(100, func() {
    		seed := make([]byte, SeedSize)
    		message := []byte("Hello, world!")
    		priv := NewKeyFromSeed(seed)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. src/crypto/rsa/pss.go

    	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 {
    			return nil, err
    		}
    		return s, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/crypto/tls/boring_test.go

    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build boringcrypto
    
    package tls
    
    import (
    	"crypto/ecdsa"
    	"crypto/elliptic"
    	"crypto/internal/boring/fipstls"
    	"crypto/rand"
    	"crypto/rsa"
    	"crypto/x509"
    	"crypto/x509/pkix"
    	"encoding/pem"
    	"fmt"
    	"internal/obscuretestdata"
    	"math/big"
    	"net"
    	"runtime"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  6. src/crypto/tls/cipher_suites.go

    		return cipher.NewCBCDecrypter(block, iv)
    	}
    	return cipher.NewCBCEncrypter(block, iv)
    }
    
    // macSHA1 returns a SHA-1 based constant time MAC.
    func macSHA1(key []byte) hash.Hash {
    	h := sha1.New
    	// The BoringCrypto SHA1 does not have a constant-time
    	// checksum function, so don't try to use it.
    	if !boring.Enabled {
    		h = newConstantTimeHash(h)
    	}
    	return hmac.New(h, key)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top