Documentation
¶
Index ¶
Constants ¶
const ( // ML-DSA-44 (Level 2 security) MLDSA44PublicKeySize = mldsa44.PublicKeySize MLDSA44PrivateKeySize = mldsa44.PrivateKeySize MLDSA44SignatureSize = mldsa44.SignatureSize // ML-DSA-65 (Level 3 security) MLDSA65PublicKeySize = mldsa65.PublicKeySize MLDSA65PrivateKeySize = mldsa65.PrivateKeySize MLDSA65SignatureSize = mldsa65.SignatureSize // ML-DSA-87 (Level 5 security) MLDSA87PublicKeySize = mldsa87.PublicKeySize MLDSA87PrivateKeySize = mldsa87.PrivateKeySize MLDSA87SignatureSize = mldsa87.SignatureSize )
Security parameters for ML-DSA (Module Lattice Digital Signature Algorithm)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchDSA ¶
type BatchDSA struct {
// contains filtered or unexported fields
}
BatchDSA provides batch signing operations
func NewBatchDSA ¶
NewBatchDSA creates a batch DSA processor
type PrecomputedMLDSA ¶
type PrecomputedMLDSA struct {
// contains filtered or unexported fields
}
PrecomputedMLDSA stores precomputed values for faster operations
func NewPrecomputedMLDSA ¶
func NewPrecomputedMLDSA(privKey *PrivateKey) *PrecomputedMLDSA
NewPrecomputedMLDSA creates a new precomputed ML-DSA instance
func (*PrecomputedMLDSA) SignCached ¶
func (p *PrecomputedMLDSA) SignCached(message []byte) ([]byte, error)
SignCached signs with caching for repeated messages
type PrivateKey ¶
type PrivateKey struct {
PublicKey *PublicKey
// contains filtered or unexported fields
}
PrivateKey represents an ML-DSA private key
func GenerateKey ¶
func GenerateKey(rand io.Reader, mode Mode) (*PrivateKey, error)
GenerateKey generates a new ML-DSA key pair using REAL implementation
func GenerateKeyOptimized ¶
func GenerateKeyOptimized(rand io.Reader, mode Mode) (*PrivateKey, error)
Optimized key generation with pre-allocated buffers
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(data []byte, mode Mode) (*PrivateKey, error)
PrivateKeyFromBytes reconstructs a private key from bytes
func (*PrivateKey) Bytes ¶
func (priv *PrivateKey) Bytes() []byte
Bytes returns the private key as bytes
func (*PrivateKey) OptimizedSign ¶
func (priv *PrivateKey) OptimizedSign(rand io.Reader, message []byte, opts crypto.SignerOpts) ([]byte, error)
OptimizedSign performs signing with buffer pooling
func (*PrivateKey) Sign ¶
func (priv *PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) ([]byte, error)
Sign creates a REAL signature for the given message