Module: PQC

Defined in:
lib/ml_dsa.rb

Overview

PQC umbrella namespace for post-quantum cryptographic algorithms.

Currently only ML-DSA is implemented; future algorithms (ML-KEM, SLH-DSA, etc.) can register here for unified discovery.

Examples:

PQC.algorithms              # => { ml_dsa: MlDsa }
PQC.algorithm(:ml_dsa)      # => MlDsa
PQC::MlDsa == ::MlDsa       # => true

Constant Summary collapse

MlDsa =
::MlDsa

Class Method Summary collapse

Class Method Details

.algorithm(name) ⇒ Module?

Look up a registered algorithm by name.

Parameters:

  • name (Symbol)

Returns:

  • (Module, nil)


271
272
273
# File 'lib/ml_dsa.rb', line 271

def self.algorithm(name)
  @registry[name.to_sym]
end

.algorithmsHash{Symbol => Module}

List all registered PQC algorithms.

Returns:

  • (Hash{Symbol => Module})


264
265
266
# File 'lib/ml_dsa.rb', line 264

def self.algorithms
  @registry.dup
end

.register(name, mod) ⇒ Object

Register a PQC algorithm module under a symbolic name.

Parameters:

  • name (Symbol)
  • mod (Module)


258
259
260
# File 'lib/ml_dsa.rb', line 258

def self.register(name, mod)
  @registry[name.to_sym] = mod
end