Paper 2020/855

Fooling primality tests on smartcards

Vladimir Sedlacek
Jan Jancar
Petr Svenda
Abstract

We analyse whether the smartcards of the JavaCard platform correctly validate primality of domain parameters. The work is inspired by the paper Prime and prejudice: primality testing under adversarial conditions, where the authors analysed many open-source libraries and constructed pseudoprimes fooling the primality testing functions. However, in the case of smartcards, often there is no way to invoke the primality test directly, so we trigger it by replacing (EC)DSA and (EC)DH prime domain parameters by adversarial composites. Such a replacement results in vulnerability to Pohlig-Hellman style attacks, leading to private key recovery. Out of nine smartcards (produced by five major manufacturers) we tested, all but one have no primality test in parameter validation. As the JavaCard platform provides no public primality testing API, the problem cannot be fixed by an extra parameter check, %an additional check before the parameters are passed to existing (EC)DSA and (EC)DH functions, making it difficult to mitigate in already deployed smartcards.

PDF
BibTeX
ePrint ↗
@misc{cryptoeprint:2020/855,
      author = {Vladimir Sedlacek and Jan Jancar and Petr Svenda},
      title = {Fooling primality tests on smartcards},
      howpublished = {Cryptology {ePrint} Archive, Paper 2020/855},
      year = {2020},
      url = {https://eprint.iacr.org/2020/855}
}
Category
Implementation
License
CC BY
Submitted
Versions

Report a problem

Comments

Log in or create an account

Privacy