import (
"crypto/cipher"
- "crypto/internal/boring"
"crypto/internal/subtle"
"strconv"
)
+import "crypto/internal/boring"
+
// The AES block size in bytes.
const BlockSize = 16
import (
"crypto/cipher"
- "crypto/internal/boring"
"crypto/internal/subtle"
"internal/cpu"
)
+import "crypto/internal/boring"
+
// defined in asm_*.s
//go:noescape
"crypto/aes"
"crypto/cipher"
"crypto/elliptic"
- "crypto/internal/boring"
"crypto/sha512"
"encoding/asn1"
"errors"
"io"
"math/big"
- "unsafe"
"crypto/internal/randutil"
)
+import (
+ "crypto/internal/boring"
+ "unsafe"
+)
+
// A invertible implements fast inverse mod Curve.Params().N
type invertible interface {
// Inverse returns the inverse of k in GF(P)
package hmac
import (
- "crypto/internal/boring"
"crypto/subtle"
"hash"
)
+import "crypto/internal/boring"
+
// FIPS 198-1:
// https://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf
"bufio"
"crypto/aes"
"crypto/cipher"
- "crypto/internal/boring"
"encoding/binary"
"io"
"os"
"time"
)
+import "crypto/internal/boring"
+
const urandomDevice = "/dev/urandom"
// Easy implementation: read from /dev/urandom.
import (
"crypto"
- "crypto/internal/boring"
"crypto/subtle"
"errors"
"io"
"crypto/internal/randutil"
)
+import "crypto/internal/boring"
+
// This file implements encryption and decryption using PKCS#1 v1.5 padding.
// PKCS1v15DecrypterOpts is for passing options to PKCS#1 v1.5 decryption using
import (
"bytes"
"crypto"
- "crypto/internal/boring"
"errors"
"hash"
"io"
"math/big"
)
+import "crypto/internal/boring"
+
func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash hash.Hash) ([]byte, error) {
// See [1], section 9.1.1
hLen := hash.Size()
import (
"crypto"
- "crypto/internal/boring"
"crypto/rand"
"crypto/subtle"
"errors"
"io"
"math"
"math/big"
- "unsafe"
"crypto/internal/randutil"
)
+import (
+ "crypto/internal/boring"
+ "unsafe"
+)
+
var bigZero = big.NewInt(0)
var bigOne = big.NewInt(1)
import (
"bytes"
"crypto"
- "crypto/internal/boring"
"crypto/rand"
"crypto/sha1"
"crypto/sha256"
"testing"
)
+import "crypto/internal/boring"
+
func TestKeyGeneration(t *testing.T) {
for _, size := range []int{128, 1024, 2048, 3072} {
priv, err := GenerateKey(rand.Reader, size)
import (
"bytes"
- "crypto/internal/boring"
"crypto/rand"
"encoding"
"fmt"
"testing"
)
+import "crypto/internal/boring"
+
type sha1Test struct {
out string
in string
import (
"crypto"
- "crypto/internal/boring"
"encoding/binary"
"errors"
"hash"
)
+import "crypto/internal/boring"
+
func init() {
crypto.RegisterHash(crypto.SHA224, New224)
crypto.RegisterHash(crypto.SHA256, New)
import (
"bytes"
- "crypto/internal/boring"
"crypto/rand"
"encoding"
"fmt"
"testing"
)
+import "crypto/internal/boring"
+
type sha256Test struct {
out string
in string
import (
"crypto"
- "crypto/internal/boring"
"encoding/binary"
"errors"
"hash"
)
+import "crypto/internal/boring"
+
func init() {
crypto.RegisterHash(crypto.SHA384, New384)
crypto.RegisterHash(crypto.SHA512, New)
import (
"bytes"
- "crypto/internal/boring"
"crypto/rand"
"encoding"
"encoding/hex"
"testing"
)
+import "crypto/internal/boring"
+
type sha512Test struct {
out string
in string
"crypto/cipher"
"crypto/des"
"crypto/hmac"
- "crypto/internal/boring"
"crypto/rc4"
"crypto/sha1"
"crypto/sha256"
"hash"
)
+import "crypto/internal/boring"
+
// a keyAgreement implements the client and server side of a TLS key agreement
// protocol by generating and processing key exchange messages.
type keyAgreement interface {
import (
"container/list"
"crypto"
- "crypto/internal/boring"
"crypto/rand"
"crypto/sha512"
"crypto/x509"
"time"
)
+import "crypto/internal/boring"
+
const (
VersionSSL30 = 0x0300
VersionTLS10 = 0x0301