I am looking for a list of typical mistakes someone can make when implementing digital signatures for a software. And of course why they are mistakes and how an attacker could take advantage of them.

I do not mean implementing the crypto itself but applying/using a library (like GPG or something alike) in your own project.

What I thought of so far:

  • Using weak algorithms for encryption and/or hashing. -> Attacker could fake a valid signature because he is able to find collisions.
  • Wrong handling of public keys (for example a application just downloads a public key it needs for verification of a unknown signature). -> Man in the Middle attackers could replace the downloaded public key with their own and the application would verify files of the attacker.
  • Signatures are not verified correctly (for example the software just tests if there is a signature, not if its valid.) -> Attacker could use "fake" signatures.

Are those possible mistakes to make? Are the implications correct?

Please give me your ideas on the topic.

Thanks in advance!

EDIT: This is for an assignment in a security class. So i just want to collect some ideas. They to not have to fit a specific system, protocol or software. Just some mistakes one could make in practice.

  • Please clarify the following; Are you implementing the digital signature for mutual authentication (e.g. both the client and the server will use digital signatures for identity verification and non repudiation). Well you use self signed certificates?
    – Ubaidah
    Commented Aug 9, 2014 at 11:53
  • The use case is kind of the following: A application comminucates with a server using HTTP. It is getting some information and it downloads some files. All of this should be digitally signed so that the client can be sure it comes from the real server.
    – asquared
    Commented Aug 9, 2014 at 12:05
  • How do you plan to handover the server certificate to the clients. If you simply run your Web server over HTTPs and use a digital certificate from a recognized certificate authority. You probably will not have any of the three problems/points you mentioned in your post. Are you writing an assignment in a security class or you really building a system?
    – Ubaidah
    Commented Aug 9, 2014 at 12:29
  • It is in fact for a assignment in a security class. I just need some ideas or examples of things that could go wrong if you implement digital signatures. I will edit my post to make that clear.
    – asquared
    Commented Aug 9, 2014 at 13:03

2 Answers 2


Ok here is a good one that is not commonly mentioned as a digital signature security risk.

There is a technique called blind signature. Which usually used for anonymous authentication like in anonymous P2P network, electronic voting, digital cash, etc.

Now, if the system use the same private key for regular digital signature and for blind digital signature there is a huge risk that an attacker can foul the system and cover data encrypted by the server public key. See Blind Signature for more details.

Of course, the solution is to use different private keys, one for regular digital signature and one for blind signature


Don't store the private keys in a file on the disk!

Use a secure hardware appliance (network solution) or a smart card (for one-off jobs).

  • Some DigSig providers use USB tokens.
    – Overmind
    Commented May 4, 2018 at 4:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .