WTX call during key-generation - needed or not?

[ Follow Ups ] [ BasicCard User Forum ]

Posted by peterk ( on April 10, 2012 at 09:14:13:

From the Developer-FAQ:

"When should WTX be called in a BasicCard program?"
At the start of a command. The Block Waiting Time BWT is reset every time a command is issued. For all current BasicCards the default value for BWT is 12.8 seconds when assuming a typical card clock of 3.57MHz. You can override these reset values with a #pragma ATR statement. See manuals for details.

"How can I know when I need more time?"
The simplest way is to experiment! If you think a command may need more than 1 second, you can call "WTX 5". It can't do any harm.

Generating a 2048bit key lasts approx 20 seconds which is longer than the default WTX-time of 12.8 seconds. Generation of 4096bit keys would last even longer. So my first impression was that a WTX call must be used. But no timeout happens if I don't. Also I noticed in the debugger, that some I/O is going on while a key is generated. Does that mean that RsaExGenerateKey calls WTX on its own?


Follow Ups:

[ Follow Ups ] [ BasicCard User Forum ]