Skip to content

signed_note: No easy way to verify a single signature against note text #177

@rozbb

Description

@rozbb

I have a service that accepts signatures from witnesses. The signatures are over a note text t. The service must reject invalid signatures as they come in. So given a signature s, pubkey pk, and note text t, how do I verify s?

The current best way is to construct a new signed note n = t || \n || s.to_bytes(), and then run t.verify(pk). This is unnecessarily complicated though. It'd be nice if there were a function like

fn verify_note_text(note_text: &[u8], sig: &NoteSignature, v: &impl Verifier) -> Result<()> { ... }

I can make a PR if you think it's a good idea

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions