Movatterモバイル変換


[0]ホーム

URL:


boring

packagestandard library
go1.25.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License:BSD-3-Clause, BSD-3-Clause, ISC, + 1 moreImports:4Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Overview

Package boring provides access to BoringCrypto implementation functions.Check the constant Enabled to find out whether BoringCrypto is available.If BoringCrypto is not available, the functions in this package all panic.

Index

Constants

View Source
const Enabled = available

Enabled reports whether BoringCrypto is available.When enabled is false, all functions in this package panic.

BoringCrypto is only available on linux/amd64 and linux/arm64 systems.

View Source
const RandReader = randReader(0)

Variables

This section is empty.

Functions

funcDecryptRSANoPadding

func DecryptRSANoPadding(priv *PrivateKeyRSA, ciphertext []byte) ([]byte,error)

funcDecryptRSAOAEP

func DecryptRSAOAEP(h, mgfHashhash.Hash, priv *PrivateKeyRSA, ciphertext, label []byte) ([]byte,error)

funcDecryptRSAPKCS1

func DecryptRSAPKCS1(priv *PrivateKeyRSA, ciphertext []byte) ([]byte,error)

funcECDHadded ingo1.20

funcEncryptRSANoPadding

func EncryptRSANoPadding(pub *PublicKeyRSA, msg []byte) ([]byte,error)

funcEncryptRSAOAEP

func EncryptRSAOAEP(h, mgfHashhash.Hash, pub *PublicKeyRSA, msg, label []byte) ([]byte,error)

funcEncryptRSAPKCS1

func EncryptRSAPKCS1(pub *PublicKeyRSA, msg []byte) ([]byte,error)

funcNewAESCipher

func NewAESCipher(key []byte) (cipher.Block,error)

funcNewGCMTLS

func NewGCMTLS(cipher.Block) (cipher.AEAD,error)

funcNewGCMTLS13added ingo1.20.13

func NewGCMTLS13(cipher.Block) (cipher.AEAD,error)

funcNewHMAC

func NewHMAC(h func()hash.Hash, key []byte)hash.Hash

funcNewSHA1

func NewSHA1()hash.Hash

funcNewSHA224

func NewSHA224()hash.Hash

funcNewSHA256

func NewSHA256()hash.Hash

funcNewSHA384

func NewSHA384()hash.Hash

funcNewSHA512

func NewSHA512()hash.Hash

funcSHA1

func SHA1([]byte) [20]byte

funcSHA224

func SHA224([]byte) [28]byte

funcSHA256

func SHA256([]byte) [32]byte

funcSHA384

func SHA384([]byte) [48]byte

funcSHA512

func SHA512([]byte) [64]byte

funcSignMarshalECDSA

func SignMarshalECDSA(priv *PrivateKeyECDSA, hash []byte) ([]byte,error)

funcSignRSAPKCS1v15

func SignRSAPKCS1v15(priv *PrivateKeyRSA, hcrypto.Hash, hashed []byte) ([]byte,error)

funcSignRSAPSS

func SignRSAPSS(priv *PrivateKeyRSA, hcrypto.Hash, hashed []byte, saltLenint) ([]byte,error)

funcUnreachable

func Unreachable()

Unreachable marks code that should be unreachablewhen BoringCrypto is in use. It is a no-op without BoringCrypto.

funcUnreachableExceptTests

func UnreachableExceptTests()

UnreachableExceptTests marks code that should be unreachablewhen BoringCrypto is in use. It is a no-op without BoringCrypto.

funcVerifyECDSA

func VerifyECDSA(pub *PublicKeyECDSA, hash []byte, sig []byte)bool

funcVerifyRSAPKCS1v15

func VerifyRSAPKCS1v15(pub *PublicKeyRSA, hcrypto.Hash, hashed, sig []byte)error

funcVerifyRSAPSS

func VerifyRSAPSS(pub *PublicKeyRSA, hcrypto.Hash, hashed, sig []byte, saltLenint)error

Types

typeBigInt

type BigInt []uint

A BigInt is the raw words from a BigInt.This definition allows us to avoid importing math/big.Conversion between BigInt and *big.Int is in crypto/internal/boring/bbig.

funcGenerateKeyECDSA

func GenerateKeyECDSA(curvestring) (X, Y, DBigInt, errerror)

funcGenerateKeyRSA

func GenerateKeyRSA(bitsint) (N, E, D, P, Q, Dp, Dq, QinvBigInt, errerror)

typePrivateKeyECDHadded ingo1.20

type PrivateKeyECDH struct{}

funcGenerateKeyECDHadded ingo1.20

func GenerateKeyECDH(string) (*PrivateKeyECDH, []byte,error)

funcNewPrivateKeyECDHadded ingo1.20

func NewPrivateKeyECDH(string, []byte) (*PrivateKeyECDH,error)

func (*PrivateKeyECDH)PublicKeyadded ingo1.20

func (*PrivateKeyECDH) PublicKey() (*PublicKeyECDH,error)

typePrivateKeyECDSA

type PrivateKeyECDSA struct {// contains filtered or unexported fields}

funcNewPrivateKeyECDSA

func NewPrivateKeyECDSA(curvestring, X, Y, DBigInt) (*PrivateKeyECDSA,error)

typePrivateKeyRSA

type PrivateKeyRSA struct {// contains filtered or unexported fields}

funcNewPrivateKeyRSA

func NewPrivateKeyRSA(N, E, D, P, Q, Dp, Dq, QinvBigInt) (*PrivateKeyRSA,error)

typePublicKeyECDHadded ingo1.20

type PublicKeyECDH struct{}

funcNewPublicKeyECDHadded ingo1.20

func NewPublicKeyECDH(string, []byte) (*PublicKeyECDH,error)

func (*PublicKeyECDH)Bytesadded ingo1.20

func (*PublicKeyECDH) Bytes() []byte

typePublicKeyECDSA

type PublicKeyECDSA struct {// contains filtered or unexported fields}

funcNewPublicKeyECDSA

func NewPublicKeyECDSA(curvestring, X, YBigInt) (*PublicKeyECDSA,error)

typePublicKeyRSA

type PublicKeyRSA struct {// contains filtered or unexported fields}

funcNewPublicKeyRSA

func NewPublicKeyRSA(N, EBigInt) (*PublicKeyRSA,error)

Source Files

View all Source files

Directories

PathSynopsis
Package bcache implements a GC-friendly cache (see Cache) for BoringCrypto.
Package bcache implements a GC-friendly cache (see Cache) for BoringCrypto.
Package sig holds “code signatures” that can be called and will result in certain code sequences being linked into the final binary.
Package sig holds “code signatures” that can be called and will result in certain code sequences being linked into the final binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp