Skip to content

⬆️ [Dependency]: Bump Sodium from 2.2.2 to 2.2.5 for performance improvements #123

Description

Sodium has shipped three patch releases since the current pinned version (2.2.2). The upgrade is fully backward-compatible and delivers substantial performance gains that directly reduce the per-operation cost of every Set-Context and Get-Context call.

Why upgrade

Release Change
v2.2.3 Per-call overhead cut 22–49% across all crypto operations; fail-fast input validation
v2.2.4 System.Management.Automation dependency bumped 7.4.0 → 7.4.12
2.2.5 Cold module import 37% faster (66.7 ms → 42.3 ms); parallel runspace startup −35%

Impact on Context

The three Sodium functions used by Context (New-SodiumKeyPair -Seed, ConvertTo-SodiumSealedBox, ConvertFrom-SodiumSealedBox) have no breaking API changes. The version pin in #Requires on Get-Context.ps1 and Set-Context.ps1 is the only required source change.

Notable new capability (not currently used but available): -PublicKey on ConvertFrom-SodiumSealedBox is now optional — the public key can be derived internally from -PrivateKey.

Acceptance criteria

  • #Requires version updated to 2.2.5 in Get-Context.ps1 and Set-Context.ps1
  • Existing Pester tests pass
  • Performance benchmark confirms improved or equivalent per-op timings

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions