Shake-256 for signing #3026
-
Hey guys, I'm making a simple project for my masters thesis regarding signature schemes and I need to sign a document using SHA-256 and SHAKE-256, I can't seem to find any way to use SHAKE-256 as a hash function for document/file signing. I'm guessing you can theoretically use that algorithm for signing, correct? If there's no internal implementation, does botan provide some kind of API for creating my own "signature scheme" with any hash function? I've currently tried all EMSA1(SHAKE-256), EMSA2(SHAKE-256), EMSA3(SHAKE-256), EMSA4(SHAKE-256) when creating the PK_signer object. This is a bit over my head so be gentle hahah |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Traditionally, signing is done with asymmetric schemes where you have a private key (performing the sign operation) and an associated public key (used in the verify information). This is done with asymmetric algorithms like RSA, ECDSA and the like. "Signing a document" with just a hash function (i.e. SHA-256 or SHAKE-256) doesn't really make sense cryptographically, as this does not involve a "secret", let alone a public/private key pair. Think of hash functions as producing a "fingerprint" of your document that could be easily computed by anyone. Whereas a valid signature can only be calculated by the person holding the private key. Now: Do you want to actually obtain a publicly verifiable signature of your document (as explained in the first paragraph), or do you want to "just" hash the document? |
Beta Was this translation helpful? Give feedback.
Traditionally, signing is done with asymmetric schemes where you have a private key (performing the sign operation) and an associated public key (used in the verify information). This is done with asymmetric algorithms like RSA, ECDSA and the like.
"Signing a document" with just a hash function (i.e. SHA-256 or SHAKE-256) doesn't really make sense cryptographically, as this does not involve a "secret", let alone a public/private key pair. Think of hash functions as producing a "fingerprint" of your document that could be easily computed by anyone. Whereas a valid signature can only be calculated by the person holding the private key.
Now: Do you want to actually obtain a publicly verifiab…