Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for boringcrypto (0.12 sec)

  1. 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)
  2. 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)
  3. src/crypto/sha256/sha256_test.go

    	}
    }
    
    // Tests that blockGeneric (pure Go) and block (in assembly for some architectures) match.
    func TestBlockGeneric(t *testing.T) {
    	if boring.Enabled {
    		t.Skip("BoringCrypto doesn't expose digest")
    	}
    	gen, asm := New().(*digest), New().(*digest)
    	buf := make([]byte, BlockSize*20) // arbitrary factor
    	rand.Read(buf)
    	blockGeneric(gen, buf)
    	block(asm, buf)
    	if *gen != *asm {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 21:21:42 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  4. src/crypto/rsa/rsa_test.go

    		return
    	}
    	if !bytes.Equal(dec, msg) {
    		t.Errorf("got:%x want:%x (%+v)", dec, msg, priv)
    	}
    }
    
    func TestAllocations(t *testing.T) {
    	if boring.Enabled {
    		t.Skip("skipping allocations test with BoringCrypto")
    	}
    	testenv.SkipIfOptimizationOff(t)
    
    	m := []byte("Hello Gophers")
    	c, err := EncryptPKCS1v15(rand.Reader, &test2048Key.PublicKey, m)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
Back to top