credentials / irma_kerckhoffs_pilot

1 stars 0 forks source link

Card: fix 1 in 20 proof failure #33

Closed rijswijk closed 10 years ago

pimvullers commented 10 years ago

Added some basic debugging support for this in the irma_card refactor project. The added code returns an 0xE???) status word when an unprocessed carry is detected. I've done some quick tests, and I still get failures, without getting these statuswords.

pimvullers commented 10 years ago

Currently there also seems to be an internal issue which causes the card to return 0x6F00 as statusword.

pimvullers commented 10 years ago

OK, it is clear now that the issue is caused by randomness from the card. When I replace the RandomBytes function with one that just outputs 0102030405060708.... Then the card can run for 300 verifications without any failures. I'll try to hunt down the responsible random now.

pimvullers commented 10 years ago

Tracked it down to randomness of vPrime (in issuance) and vTilde, Ra (in verification). Options:

  1. v is computed incorrectly: probably not since that should have caused more failures
  2. vPrime (in verification) is computed incorrectly: probably not since that does not involve vTilde
  3. vHat is computed incorrectly: most probable.

Will investigate further.

pimvullers commented 10 years ago

I've tracked down the problem. There is an error in computing A', more specifically, in the computation of S^r_A. This is possible since this is an exponentiation which is split in two, instead of a single operation. I'll see where

rijswijk commented 10 years ago

Hi,

Pim Vullers wrote:

I've tracked down the problem. There is an error in computing A', more specifically, in the computation of S^r_A. This is possible since this is an exponentiation which is split in two, instead of a single operation. I'll see where

That's great news! Hope you find it soon :-)

Cheers,

Roland

-- Roland M. van Rijswijk - Deij -- SURFnet bv -- w: http://www.surfnet.nl/en/ -- t: +31-30-2305388 -- e: roland.vanrijswijk@surfnet.nl

pimvullers commented 10 years ago

Reported upstream, waiting for a reply.

pimvullers commented 10 years ago

Fixed in the new card batches.