Skip to content

SHA3-05 SP 800-185 encoding helpers #40

Description

@turkananation

SHA3-05 SP 800-185 Encoding Helpers

Summary

Implement and test the SP 800-185 encoding helpers:
left_encode, right_encode, encode_string, bytepad, and test-only
substring behavior.

Scope

  • Add lib/src/common/sp800_185.dart.
  • Implement byte-oriented helper APIs.
  • Add focused tests for zero, ordinary values, boundary values, and invalid
    widths.
  • Keep bit-string complexity isolated unless public API review says
    otherwise.

Acceptance criteria

  • Encoding helpers match SP 800-185 examples and derived-function vectors.
  • Invalid widths or unsupported input shapes throw before output is
    produced.
  • cSHAKE work does not start until helper tests are green.

References

  • doc/FIPS202_SP800185_RELEASE_GUIDE.md - Encoding helpers
  • SP 800-185 Section 2.3

Priority: P0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Priority: blockerSHA3FIPS 202 and SP 800-185 SHA-3 workenhancementNew feature or request

    Projects

    • Status
      Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions