Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

cSHAKE-128/256: Truncates customization strings that contain embedded null bytes. #32517

Copy link
Copy link

Description

@JonathanPlata
Issue body actions

If a OSSL_DIGEST_PARAM_CUSTOMIZATION string contains a null byte, the provider is truncating the string at that byte before processing.

I.e. a param like: 6FA014DA59F40032E29F171835FC6E94...
is truncated at 6FA014DA59F4.

This is occurring because cshake_set_encode_string() (providers/implementations/digests/cshake_prov.c) doesn't take the length of the customizationstring as a parameter, but instead calls strlen() to determine it's length.

NISTs ACVP server produces vector sets that do contain internal null bytes in their customization strings, so I suspect this isn't a limitation of the algorithm at the spec level at least.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    triaged: bugThe issue/pr is/fixes a bugThe issue/pr is/fixes a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.