Documentation
¶
Overview ¶
Package cryptutil provides cryptographic utilities for secure message handling.
Deprecated: This package has been renamed and moved to a new location. Please update your imports to use github.com/BottleFmt/gobottle instead.
To migrate:
go get github.com/BottleFmt/gobottle@latest
Then update your imports from:
import "github.com/KarpelesLab/cryptutil"
To:
import "github.com/BottleFmt/gobottle"
Index ¶
- Constants
- Variables
- func DecryptShortBuffer(k []byte, rcvd any) ([]byte, error)deprecated
- func ECDHDecrypt(data []byte, privateKey ECDHHandler) ([]byte, error)deprecated
- func ECDHEncrypt(rnd io.Reader, data []byte, remote *ecdh.PublicKey) ([]byte, error)deprecated
- func EncryptShortBuffer(rand io.Reader, k []byte, rcvd crypto.PublicKey) ([]byte, error)deprecated
- func Hash(b []byte, alg ...func() hash.Hash) []bytedeprecated
- func HybridEncrypt(rnd io.Reader, data []byte, remote *MLKEMPublicKey) ([]byte, error)deprecated
- func MLKEMDecrypt(data []byte, privateKey *MLKEMPrivateKey) ([]byte, error)deprecated
- func MLKEMEncrypt(rnd io.Reader, data []byte, remote *MLKEMPublicKey) ([]byte, error)deprecated
- func MarshalMLDSAPrivateKey(key crypto.Signer) ([]byte, error)deprecated
- func MarshalMLDSAPublicKey(pub crypto.PublicKey) ([]byte, error)deprecated
- func MarshalMLKEMPrivateKey(k *MLKEMPrivateKey) []bytedeprecated
- func MarshalMLKEMPublicKey(k *MLKEMPublicKey) []bytedeprecated
- func MarshalPKIXPublicKey(pub crypto.PublicKey) ([]byte, error)deprecated
- func MarshalSLHDSAPrivateKey(key *slhdsa.PrivateKey) ([]byte, error)deprecated
- func MarshalSLHDSAPublicKey(pub crypto.PublicKey) ([]byte, error)deprecated
- func MemClr(b []byte)deprecated
- func ParseMLDSAPrivateKey(der []byte) (crypto.Signer, error)deprecated
- func ParseMLDSAPublicKey(der []byte) (crypto.PublicKey, error)deprecated
- func ParseSLHDSAPrivateKey(der []byte) (*slhdsa.PrivateKey, error)deprecated
- func ParseSLHDSAPublicKey(der []byte) (*slhdsa.PublicKey, error)deprecated
- func Sign(rand io.Reader, key crypto.Signer, buf []byte, opts ...crypto.SignerOpts) ([]byte, error)deprecated
- func Verify(key crypto.PublicKey, buf, sig []byte, opts ...crypto.SignerOpts) errordeprecated
- type Bottledeprecated
- func AsCborBottle(data []byte) *Bottledeprecated
- func AsJsonBottle(data []byte) *Bottledeprecated
- func Marshal(data any) (*Bottle, error)deprecated
- func MarshalJson(data any) (*Bottle, error)deprecated
- func NewBottle(data []byte) *Bottledeprecated
- type ECDHHandlerdeprecated
- type IDCarddeprecated
- type Keychaindeprecated
- func NewKeychain() *Keychaindeprecated
- type MLDSAVariantdeprecated
- type MLKEMPrivateKeydeprecated
- func GenerateMLKEMKey(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)deprecated
- func GenerateMLKEMKey1024(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)deprecated
- func GenerateMLKEMKey768(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)deprecated
- func ParseMLKEMPrivateKey(der []byte) (*MLKEMPrivateKey, error)deprecated
- func UnmarshalMLKEMPrivateKey(data []byte) (*MLKEMPrivateKey, error)deprecated
- type MLKEMPublicKeydeprecated
- type MLKEMVariantdeprecated
- type Membershipdeprecated
- type MessageFormatdeprecated
- type MessageRecipientdeprecated
- type MessageSignaturedeprecated
- type OpenResultdeprecated
- type Openerdeprecated
- func MustOpener(keys ...any) *Openerdeprecated
- func NewOpener(keys ...any) (*Opener, error)deprecated
- type PrivateKeydeprecated
- type PublicKeyIntfdeprecated
- type SubKeydeprecated
Constants ¶
const AES = gobottle.AES
Deprecated: Use gobottle.AES instead.
const CborBottle = gobottle.CborBottle
Deprecated: Use gobottle.CborBottle instead.
const ClearText = gobottle.ClearText
Deprecated: Use gobottle.ClearText instead.
const JsonBottle = gobottle.JsonBottle
Deprecated: Use gobottle.JsonBottle instead.
const MLDSA44 = gobottle.MLDSA44
Deprecated: Use gobottle.MLDSA44 instead.
const MLDSA65 = gobottle.MLDSA65
Deprecated: Use gobottle.MLDSA65 instead.
const MLDSA87 = gobottle.MLDSA87
Deprecated: Use gobottle.MLDSA87 instead.
const MLKEM1024 = gobottle.MLKEM1024
Deprecated: Use gobottle.MLKEM1024 instead.
const MLKEM768 = gobottle.MLKEM768
Deprecated: Use gobottle.MLKEM768 instead.
Variables ¶
var EmptyOpener = gobottle.EmptyOpener
Deprecated: Use gobottle.EmptyOpener instead.
var ErrEncryptNoRecipient = gobottle.ErrEncryptNoRecipient
Deprecated: Use gobottle.ErrEncryptNoRecipient instead.
var ErrGroupNotFound = gobottle.ErrGroupNotFound
Deprecated: Use gobottle.ErrGroupNotFound instead.
var ErrKeyNotFound = gobottle.ErrKeyNotFound
Deprecated: Use gobottle.ErrKeyNotFound instead.
var ErrKeyUnfit = gobottle.ErrKeyUnfit
Deprecated: Use gobottle.ErrKeyUnfit instead.
var ErrNoAppropriateKey = gobottle.ErrNoAppropriateKey
Deprecated: Use gobottle.ErrNoAppropriateKey instead.
var ErrVerifyFailed = gobottle.ErrVerifyFailed
Deprecated: Use gobottle.ErrVerifyFailed instead.
Functions ¶
func DecryptShortBuffer
deprecated
added in
v0.1.1
func ECDHDecrypt
deprecated
func ECDHDecrypt(data []byte, privateKey ECDHHandler) ([]byte, error)
Deprecated: Use gobottle.ECDHDecrypt instead.
func HybridEncrypt
deprecated
added in
v0.3.0
func MLKEMDecrypt
deprecated
added in
v0.3.0
func MLKEMDecrypt(data []byte, privateKey *MLKEMPrivateKey) ([]byte, error)
Deprecated: Use gobottle.MLKEMDecrypt instead.
func MLKEMEncrypt
deprecated
added in
v0.3.0
func MarshalMLDSAPrivateKey
deprecated
added in
v0.3.0
func MarshalMLDSAPublicKey
deprecated
added in
v0.3.0
func MarshalMLKEMPrivateKey
deprecated
added in
v0.3.0
func MarshalMLKEMPrivateKey(k *MLKEMPrivateKey) []byte
Deprecated: Use gobottle.MarshalMLKEMPrivateKey instead.
func MarshalMLKEMPublicKey
deprecated
added in
v0.3.0
func MarshalMLKEMPublicKey(k *MLKEMPublicKey) []byte
Deprecated: Use gobottle.MarshalMLKEMPublicKey instead.
func MarshalPKIXPublicKey
deprecated
added in
v0.3.0
func MarshalSLHDSAPrivateKey
deprecated
added in
v0.3.0
func MarshalSLHDSAPrivateKey(key *slhdsa.PrivateKey) ([]byte, error)
Deprecated: Use gobottle.MarshalSLHDSAPrivateKey instead.
func MarshalSLHDSAPublicKey
deprecated
added in
v0.3.0
func ParseMLDSAPrivateKey
deprecated
added in
v0.3.0
func ParseMLDSAPublicKey
deprecated
added in
v0.3.0
func ParseSLHDSAPrivateKey
deprecated
added in
v0.3.0
func ParseSLHDSAPrivateKey(der []byte) (*slhdsa.PrivateKey, error)
Deprecated: Use gobottle.ParseSLHDSAPrivateKey instead.
func ParseSLHDSAPublicKey
deprecated
added in
v0.3.0
Types ¶
type Bottle
deprecated
added in
v0.1.1
Deprecated: Use gobottle.Bottle instead.
func AsCborBottle
deprecated
added in
v0.1.3
func AsJsonBottle
deprecated
added in
v0.1.3
func MarshalJson
deprecated
added in
v0.2.2
type ECDHHandler
deprecated
type ECDHHandler = gobottle.ECDHHandler
Deprecated: Use gobottle.ECDHHandler instead.
type Keychain
deprecated
added in
v0.2.11
Deprecated: Use gobottle.Keychain instead.
func NewKeychain
deprecated
added in
v0.2.11
func NewKeychain() *Keychain
Deprecated: Use gobottle.NewKeychain instead.
type MLDSAVariant
deprecated
added in
v0.3.0
type MLDSAVariant = gobottle.MLDSAVariant
Deprecated: Use gobottle.MLDSAVariant instead.
type MLKEMPrivateKey
deprecated
added in
v0.3.0
type MLKEMPrivateKey = gobottle.MLKEMPrivateKey
Deprecated: Use gobottle.MLKEMPrivateKey instead.
func GenerateMLKEMKey
deprecated
added in
v0.3.0
func GenerateMLKEMKey(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)
Deprecated: Use gobottle.GenerateMLKEMKey instead.
func GenerateMLKEMKey1024
deprecated
added in
v0.3.0
func GenerateMLKEMKey1024(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)
Deprecated: Use gobottle.GenerateMLKEMKey1024 instead.
func GenerateMLKEMKey768
deprecated
added in
v0.3.0
func GenerateMLKEMKey768(rand io.Reader, hybrid bool) (*MLKEMPrivateKey, error)
Deprecated: Use gobottle.GenerateMLKEMKey768 instead.
func ParseMLKEMPrivateKey
deprecated
added in
v0.3.0
func ParseMLKEMPrivateKey(der []byte) (*MLKEMPrivateKey, error)
Deprecated: Use gobottle.ParseMLKEMPrivateKey instead.
func UnmarshalMLKEMPrivateKey
deprecated
added in
v0.3.0
func UnmarshalMLKEMPrivateKey(data []byte) (*MLKEMPrivateKey, error)
Deprecated: Use gobottle.UnmarshalMLKEMPrivateKey instead.
type MLKEMPublicKey
deprecated
added in
v0.3.0
type MLKEMPublicKey = gobottle.MLKEMPublicKey
Deprecated: Use gobottle.MLKEMPublicKey instead.
func ParseMLKEMPublicKey
deprecated
added in
v0.3.0
func ParseMLKEMPublicKey(der []byte) (*MLKEMPublicKey, error)
Deprecated: Use gobottle.ParseMLKEMPublicKey instead.
func UnmarshalMLKEMPublicKey
deprecated
added in
v0.3.0
func UnmarshalMLKEMPublicKey(data []byte) (*MLKEMPublicKey, error)
Deprecated: Use gobottle.UnmarshalMLKEMPublicKey instead.
type MLKEMVariant
deprecated
added in
v0.3.0
type MLKEMVariant = gobottle.MLKEMVariant
Deprecated: Use gobottle.MLKEMVariant instead.
type Membership
deprecated
added in
v0.1.4
type Membership = gobottle.Membership
Deprecated: Use gobottle.Membership instead.
func NewMembership
deprecated
added in
v0.1.4
func NewMembership(member *IDCard, key []byte) *Membership
Deprecated: Use gobottle.NewMembership instead.
type MessageFormat
deprecated
added in
v0.1.1
type MessageFormat = gobottle.MessageFormat
Deprecated: Use gobottle.MessageFormat instead.
type MessageRecipient
deprecated
added in
v0.1.1
type MessageRecipient = gobottle.MessageRecipient
Deprecated: Use gobottle.MessageRecipient instead.
type MessageSignature
deprecated
added in
v0.1.1
type MessageSignature = gobottle.MessageSignature
Deprecated: Use gobottle.MessageSignature instead.
type OpenResult
deprecated
added in
v0.1.1
type OpenResult = gobottle.OpenResult
Deprecated: Use gobottle.OpenResult instead.
func UnmarshalHttp
deprecated
added in
v0.3.0
type Opener
deprecated
added in
v0.1.1
Deprecated: Use gobottle.Opener instead.
func MustOpener
deprecated
added in
v0.2.1
type PrivateKey
deprecated
added in
v0.2.16
type PrivateKey = gobottle.PrivateKey
Deprecated: Use gobottle.PrivateKey instead.
type PublicKeyIntf
deprecated
added in
v0.2.17
type PublicKeyIntf = gobottle.PublicKeyIntf
Deprecated: Use gobottle.PublicKeyIntf instead.
func ParsePKIXPublicKey
deprecated
added in
v0.3.0
func ParsePKIXPublicKey(der []byte) (PublicKeyIntf, error)
Deprecated: Use gobottle.ParsePKIXPublicKey instead.
func PublicKey
deprecated
added in
v0.2.14
func PublicKey(privKey crypto.PrivateKey) PublicKeyIntf
Deprecated: Use gobottle.PublicKey instead.