8000 Signature verification broken · Issue #7 · aead/minisign · GitHub
[go: up one dir, main page]

Skip to content

Signature verification broken #7

Closed

Description

@infraweavers

Hiya,

I think this implementation's signature verification is different from both
https://github.com/jedisct1/go-minisign and https://jedisct1.github.io/minisign/

The attached file has a valid signature (also attached) as produced by https://github.com/jedisct1/minisign/releases/download/0.9/minisign-win32.zip :

D:\sign>"C:\Users\RobertEmery\Documents\minisign.exe" -V -m robtest.ps1 -P "RWQ3ly9IPenQ6Wgt/VYzMCdGdVJPPoNSyT+rtTddvqBgANTYdboko0zu"
Signature and comment signature verified
Trusted comment: timestamp:1617721023   file:robtest.ps1

Yet when run through this reimplementation it shows as invalid:

D:\sign>C:\Users\RobertEmery\Downloads\minisign-main\minisign-main\minisign.exe -V -m robtest.ps1 -P "RWQ3ly9IPenQ6Wgt/VYzMCdGdVJPPoNSyT+rtTddvqBgANTYdboko0zu"
Error: signature verification failed

ExampleValidSignature.zip

Activity

  1. added a commit that references this issue on Apr 8, 2021
    b13a43e
  2. aead commented on Apr 8, 2021

    @aead
    Owner

    @infraweavers Thanks for reporting this.

    This issue is caused by carriage returns (\r) at the end of the untrusted and trusted comment. The current implementation does not trim any trailing \r characters when parsing the signature. This causes the comment signature
    verification to fail since it tries to verify a comment (with a \r) that was signed without \r.

    This problem will occur in particularly on OS that end newlines with \r\n (i.e. windows).

    PR #8 will fix this.

  3. added a commit that references this issue on Apr 8, 2021
    2d3f973
  4. jedisct1 commented on Apr 8, 2021

    @jedisct1

    Good catch, and thanks for the quick fix!

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0