Discover Packages
github.com/ericlagergren/dualec
package
module
Version:
v0.0.0-...-9a3fbda
Opens a new window with list of versions in this module.
Published: Aug 9, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
README
Documentation
Overview
Index
Constants
Variables
Functions
New(c, rand, hash)
NewWithPQ(c, P, Q, rand, hash)
Recover(c, P, Q, d, r, hash)
Types
Source Files
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Package dualec implements the insecure, broken Dual_EC_DRBG
algorithm.
func New(c Curve, rand io.Reader, hash func() hash.Hash) (io.Reader, error)
func NewWithPQ(c Curve, P, Q *Point, rand io.Reader, hash func() hash.Hash) (io.Reader, error)
func Recover(c Curve, P, Q *Point, d []byte, r io.Reader, hash func() hash.Hash) (io.Reader, error)
type Curve
type Point
New creates a Dual_EC_DRBG instance using the default
parameters on a particular elliptic curve.
It generates seeds using the provider Reader and hash
function.
NewWithPQ creates a Dual_EC_DRBG instance using custom
parameters.
It generates seeds using the provider Reader and hash
function.
Recover returns a Reader that will produce the same output as
the input Reader, up until it reseeds.
Curve is a NIST prime curve.
P256 returns the NIST P-256 (secp256r1) curve.
P384 returns the NIST P-384 (secp384r1) curve.
P521 returns the NIST P-521 (secp521r1) curve.
Point is a point on a NIST prime curve.
It does not include the point at infinity.
Backdoor computes a backdoored Q for some fixed P.
BytesX returns the encoding of the x-coordinate.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.