Skip to content

Treat raw ECDSA signatures as binary strings - #22

Open
OskarEichler wants to merge 1 commit into
cedarcode:masterfrom
OskarEichler:codex/treat-ecdsa-signatures-as-binary
Open

Treat raw ECDSA signatures as binary strings#22
OskarEichler wants to merge 1 commit into
cedarcode:masterfrom
OskarEichler:codex/treat-ecdsa-signatures-as-binary

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Use bytesize and byteslice when detecting and splitting raw ECDSA signatures.

Reproduction

A valid 64-byte raw P-256 signature tagged with UTF-8 can have a character length below 64 when random bytes form valid multibyte sequences. The current character-based check skips raw-to-DER conversion and rejects the signature even though its bytes are unchanged.

Verification

  • Isolated and cumulative branches: 31 examples, 0 failures on Ruby 4.0.6
  • Focused valid raw-signature model fails on release/current when character length differs and passes
  • Cumulative model, RuboCop (20 files), package build and downstream loading pass

DER signatures and binary-encoded raw signatures retain existing behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant