internal

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const NumMRTests = 64

Variables

This section is empty.

Functions

func Bytes

func Bytes(bits int) int

func FermatInverse

func FermatInverse(a, N *big.Int) *big.Int

https://cs.opensource.google/go/go/+/refs/tags/go1.18:src/crypto/dsa/dsa.go;l=188-192 fermatInverse calculates the inverse of k in GF(P) using Fermat's method. This has better constant-time properties than Euclid's method (implemented in math/big.Int.ModInverse) although math/big itself isn't strictly constant-time so it's not perfect.

func H

func H(s string) string

func HB

func HB(s string) []byte

hex to byte

func HI

func HI(s string) *big.Int

hex to *big.Int

func ReadBits

func ReadBits(dst []byte, rand io.Reader, bits int) ([]byte, error)

func Reverse

func Reverse(s []byte) []byte

Types

This section is empty.

Directories

Path Synopsis
crypto/internal/randutil/randutil.go
crypto/internal/randutil/randutil.go
Package subtle implements functions that are often useful in cryptographic code but require careful thought to use correctly.
Package subtle implements functions that are often useful in cryptographic code but require careful thought to use correctly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL