sphincs / parallel-sphincsplus

This repository contains another implementation of the Sphincs+ postquantum signature system
Creative Commons Zero v1.0 Universal
3 stars 4 forks source link

Include optional signature verification after generation #11

Open sfluhrer opened 3 years ago

sfluhrer commented 3 years ago

One thing we could include as an option would be to automatically verify the signature after we generate it, as in:

class sphincs_plus::key_shake256_128s_robust key;
// Do something to assign a private key
key.verify_after_sign(true);
auto signature = key.sign( "foo", 3 );
    // If this generated an invalid signature internally, this will throw an exception

This would save the application the trouble of doing it itself.

We'd test this by using the same trick as the fault detection attacks; we'd derive a class based on the real parameter set, but make the prf function get it wrong problematically.