Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recent BELPIC cards (issued since March 2014) have a validity of 10 years (rather than 5 as before), and therefore also increased the key size from 1024 bits to 2048 bits. Key size can be detected by checking the applet version, for which we have to issue a "GetCardData" command. If the applet is version 0x17 or higher, keys are 2048 bits. Use #defines rather than magic numbers Keeps the code slightly more readable. While we're at it, refactor slightly so that the code which issues the GET CARD DATA command doesn't just keep the applet version, but also makes other things available. This latter in preparation of setting the serial number.
- Loading branch information
1 parent
c019a62
commit 5149dd3
Showing
1 changed file
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters