rsa

package
v0.1.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

Package rsa implements RSA operations; RSA-OAEP as specified in §30 (https://www.w3.org/TR/WebCryptoAPI/#rsa-oaep).

Package rsa implements RSA operations; RSA-OAEP as specified in §30 (https://www.w3.org/TR/WebCryptoAPI/#rsa-oaep).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoKey

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

func (*CryptoKey) Algorithm

func (c *CryptoKey) Algorithm() webcrypto.KeyAlgorithm

func (*CryptoKey) Extractable

func (c *CryptoKey) Extractable() bool

func (*CryptoKey) Type

func (c *CryptoKey) Type() webcrypto.KeyType

func (*CryptoKey) Usages

func (c *CryptoKey) Usages() []webcrypto.KeyUsage

type HashedImportParams

type HashedImportParams struct {
	// The hash algorithm to use
	Hash string
}

HashedImportParams implements the RsaHashedImportParams dictionary specification at §20.7 (https://www.w3.org/TR/WebCryptoAPI/#RsaHashedImportParams-dictionary)

type HashedKeyAlgorithm

type HashedKeyAlgorithm struct {
	// The hash algorithm that is used with this key
	Hash string
}

HashedKeyAlgorithm implements the RsaHashedKeyAlgorithm dictionary specification at §20.6 (https://www.w3.org/TR/WebCryptoAPI/#RsaHashedKeyAlgorithm-dictionary)

type HashedKeyGenParams

type HashedKeyGenParams struct {
	KeyGenParams
	Hash string
}

HashedKeyGenParams is the model of the dictionary specificationn at §20.4 (https://www.w3.org/TR/WebCryptoAPI/#RsaHashedKeyGenParams-dictionary)

type KeyAlgorithm

type KeyAlgorithm struct {
	*HashedKeyAlgorithm
	// contains filtered or unexported fields
}

KeyAlgorithm is the implementation of the dictionary specificationn at §20.5 (https://www.w3.org/TR/WebCryptoAPI/#RsaKeyAlgorithm-dictionary)

func (*KeyAlgorithm) ModulusLength

func (k *KeyAlgorithm) ModulusLength() uint64

func (*KeyAlgorithm) Name

func (k *KeyAlgorithm) Name() string

func (*KeyAlgorithm) PublicExponent

func (k *KeyAlgorithm) PublicExponent() *big.Int

type KeyGenParams

type KeyGenParams struct {
	// The length, in bits, of the RSA modulus
	ModulusLength uint64
	// The RSA public exponent
	PublicExponent *big.Int
}

KeyGenParams is the model of the dictionary specificationn at §20.3 (https://www.w3.org/TR/WebCryptoAPI/#RsaKeyGenParams-dictionary)

type OaepParams

type OaepParams struct {
	Label []byte
}

OaepParams implements the RsaOaepParams dictionary specification at §22.3 https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaOaepParams

Jump to

Keyboard shortcuts

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