asn1struct

package
v0.0.0-...-4926435 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmIdentifier

type AlgorithmIdentifier struct {
	Algorithm  asn1.ObjectIdentifier
	Parameters asn1.RawValue `asn1:"optional"`
}

type DSAParameters

type DSAParameters struct {
	P *big.Int
	Q *big.Int
	G *big.Int
}

type DSAPrivateKey

type DSAPrivateKey struct {
	Version int
	P       *big.Int
	Q       *big.Int
	G       *big.Int
	Pub     *big.Int
	Priv    *big.Int
}

type DSAPublicKey

type DSAPublicKey struct {
	Version int
	P       *big.Int
	Q       *big.Int
	G       *big.Int
	Pub     *big.Int
}

type ECCurve

type ECCurve struct {
	A    FieldElement
	B    FieldElement
	Seed asn1.BitString `asn1:"optional"`
}

type ECParameters

type ECParameters struct {
	Version  int
	FieldId  FieldId
	Curve    ECCurve
	Base     FieldElement
	Order    *big.Int
	Cofactor int                   `asn1:"optional"`
	Hash     asn1.ObjectIdentifier `asn1:"optional"`
}

type ECPrivateKey

type ECPrivateKey struct {
	Version       int
	PrivateKey    []byte
	NamedCurveOID asn1.ObjectIdentifier `asn1:"optional,explicit,tag:0"`
	Params        ECParameters          `asn1:"optional,explicit,tag:0"`
	PublicKey     asn1.BitString        `asn1:"optional,explicit,tag:1"`
}

type FieldElement

type FieldElement []byte

type FieldId

type FieldId struct {
	FieldType  asn1.ObjectIdentifier
	Parameters asn1.RawValue
}

type PKCS1AdditionalRSAPrime

type PKCS1AdditionalRSAPrime struct {
	Prime *big.Int
	Exp   *big.Int
	Coeff *big.Int
}

type PKCS1PrivateKey

type PKCS1PrivateKey struct {
	Version int
	N       *big.Int
	E       int
	D       *big.Int
	P       *big.Int
	Q       *big.Int

	Dp   *big.Int `asn1:"optional"`
	Dq   *big.Int `asn1:"optional"`
	Qinv *big.Int `asn1:"optional"`

	AdditionalPrimes []PKCS1AdditionalRSAPrime `asn1:"optional,omitempty"`
}

type PKCS1PublicKey

type PKCS1PublicKey struct {
	N *big.Int
	E int
}

type PKCS8PrivateKey

type PKCS8PrivateKey struct {
	Version    int
	Algorithm  AlgorithmIdentifier
	PrivateKey []byte
}

type PKIXPublicKey

type PKIXPublicKey struct {
	Algorithm AlgorithmIdentifier
	PublicKey asn1.BitString
}

type Raw

type Raw struct {
	Class     int
	Tag       int
	Bytes     []byte
	FullBytes []byte
	Children  []Raw
}

func ParseRaw

func ParseRaw(data []byte) ([]Raw, error)

func (Raw) TypeString

func (r Raw) TypeString() string

func (Raw) Value

func (r Raw) Value() string

Jump to

Keyboard shortcuts

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