This fixes the bug that the USB communication breaks when collecting PACE nonces with no delay. The delay functionality has not been removed (it doesn't hurt to keep it), but using a delay of 0 is now possible without a high risk of getting too many errors.
The user may specify a delay between PACE nonce requests. Using no delay between subsequent issues of the USB command may lead to errors in the USB communication.
Until test results show that the delay can be fixed or left out completely the user has to test what value is safe to use.
This fixes errors "Read only 40 instead of requested 64 bytes!" (if the correct delay is used, e.g. 3 seconds for 16 byte nonces).
-new files armsrc/epa.[ch] for ePA (electronic "Personalausweis") related functions
-Offers elementary functions (EPA_PACE_MSE_Set_AT etc.)
-Also offers one new USB command: EPA_PACE_Collect_Nonce
-created new command subtree in client: client/hfepa.[ch] ("hf epa")
-offers "hf epa cnonces" (collect encrypted PACE nonces)
-more to come
-According to ISO14443-4, the block number (bit 0) in the PCB needs to be flipped every once in a while. Not doing so leads to the card not responding to commands anymore. The flipping is done according to the standard now.
-Declare iso14_apdu in iso14443a.h to enable usage from other .c files
-iso14_apdu now returns 0 if ReaderReceive returned 0 (to distinguish between the case that ReaderReceive returns -1 and the case that it returns 0)
-Added a new function to change the timeout (to enable changing it from other .c files without the need for a global variable)
Also changed the command ID of CMD_WRITER_LEGIC_RF to ease visual spotting of empty ID blocks.
(ID was 0x0399 but it was above CMD_SNOOP_ICLASS with ID 0x0392)
-Added "hf 14a cuids" command to collect multiple ISO14443-A UIDs from one card in a batch
-The command takes one parameter (the number of UIDs to collect)
-This can be useful to analyze the RNGs of cards that generate random UIDs (e.g. MRTDs)