classifier

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmPattern

type AlgorithmPattern struct {
	Name        string   `json:"name"`
	Patterns    []string `json:"patterns"`
	Confidence  float64  `json:"confidence"`
	CryptoType  string   `json:"crypto_type"`
	KeySizes    []int    `json:"key_sizes,omitempty"`
	Deprecated  bool     `json:"deprecated"`
	QuantumSafe bool     `json:"quantum_safe"`
}

AlgorithmPattern represents detection patterns for crypto algorithms

type ClassificationResult

type ClassificationResult struct {
	Algorithm           string            `json:"algorithm"`
	CryptoType          string            `json:"crypto_type"`
	Severity            string            `json:"severity"`
	Confidence          float64           `json:"confidence"`
	KeySize             int               `json:"key_size,omitempty"`
	QuantumVulnerable   bool              `json:"quantum_vulnerable"`
	Deprecated          bool              `json:"deprecated"`
	VulnerabilityInfo   VulnerabilityInfo `json:"vulnerability_info,omitempty"`
	MigrationPath       MigrationPath     `json:"migration_path,omitempty"`
	PerformanceImpact   PerformanceImpact `json:"performance_impact,omitempty"`
	ExtractedParameters map[string]string `json:"extracted_parameters,omitempty"`
}

ClassificationResult provides comprehensive analysis results

type Classifier

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

Classifier classifies cryptographic findings

func NewClassifier

func NewClassifier() *Classifier

NewClassifier creates a new classifier

func (*Classifier) CalculateConfidence

func (c *Classifier) CalculateConfidence(finding *types.Finding) float64

CalculateConfidence calculates the confidence score for a finding

func (*Classifier) ClassifyFinding

func (c *Classifier) ClassifyFinding(finding *types.Finding)

ClassifyFinding classifies a finding based on its properties

type EnhancedClassifier

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

EnhancedClassifier provides comprehensive crypto analysis and classification

func NewEnhancedClassifier

func NewEnhancedClassifier() *EnhancedClassifier

NewEnhancedClassifier creates a new enhanced classifier

func (*EnhancedClassifier) ClassifyFinding

func (ec *EnhancedClassifier) ClassifyFinding(finding *types.Finding) *ClassificationResult

ClassifyFinding provides comprehensive classification of a crypto finding

func (*EnhancedClassifier) GenerateReport

func (ec *EnhancedClassifier) GenerateReport(findings []types.Finding) (string, error)

GenerateReport generates a comprehensive analysis report

type MigrationPath

type MigrationPath struct {
	Recommended   []string `json:"recommended"`
	HybridOptions []string `json:"hybrid_options"`
	Timeline      string   `json:"timeline"`
	EffortLevel   string   `json:"effort_level"`
	Note          string   `json:"note,omitempty"`
}

MigrationPath provides migration recommendations

type PerformanceImpact

type PerformanceImpact struct {
	KeygenSlowdown    string `json:"keygen_slowdown"`
	OperationSlowdown string `json:"operation_slowdown"`
	SizeIncrease      string `json:"size_increase"`
	MemoryIncrease    string `json:"memory_increase,omitempty"`
}

PerformanceImpact estimates performance impact of migration

type VulnerabilityInfo

type VulnerabilityInfo struct {
	CVEs                 []string `json:"cves"`
	QuantumThreatLevel   string   `json:"quantum_threat_level"`
	ClassicalThreatLevel string   `json:"classical_threat_level"`
	EstimatedBreakYear   string   `json:"estimated_break_year,omitempty"`
	DeprecatedSince      string   `json:"deprecated_since,omitempty"`
}

VulnerabilityInfo contains security vulnerability information

Jump to

Keyboard shortcuts

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