-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigNatural Exponentiation (Modulo) and BigNatural Inversion (Modulo) unit test failed #9
Comments
Hi, thank you for reporting the problem. What card do you use please? |
Hi. I use this card: https://www.taisys.com/p-detail?lang=&id=9bf9kZO3CJ682Mn-Uuesyonyz9d5ZdPycGwMJF2i3Q |
Hi, I do have this card so I can test and verify (we haven't tested on this one yet). However, it will take some time so if you will find the problem in meantime, your pull request is welcomed |
OK. It's awesome. |
Hi. |
Hi, I found that it's because exponent and modulo cannot be even when utilizing RSA, so there were errors when append zeros to modulo and when the exponent is even. I modified append_zeros() to multiply a big odd prime as "q" in RSA (N=pq). First, there is a conditional expression to check if exp is even. If yes, exp will be (exp-1) and the answer should multiply base once at final. Second, Finally, ANS_ExpMod = TMP (mod p). If exp is even, then ANS_ExpMod = mod_mult(TMP, base, p) |
Hi, When I tried to use the physical sim card to test the BigNatural Exponentiation (Modulo) and BigNatural Inversion (Modulo) unit tests, it always shows me the failed message.
[java] BigNatural Exponentiation (Modulo): (0)
[java] num1: 650c556c89d8b9af65f42c3c88af4fcb
[java] num2: 2
[java] num3: 3983260343894b673635da5714ff2c71
[java] --> B033100121650C556C89D8B9AF65F42C3C88AF4FCB023983260343894B673635DA5714FF2C71
[java] javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f
[java] at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:219)
[java] at sun.security.smartcardio.ChannelImpl.transmit(ChannelImpl.java:90)
[java] at opencrypto.test.CardManager.transmit(Unknown Source)
[java] at opencrypto.test.TestClient.performCommand(Unknown Source)
[java] at opencrypto.test.TestClient.OpenCryptoFunctionalTests(Unknown Source)
[java] at opencrypto.test.TestClient.main(Unknown Source)
[java] Caused by: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f
[java] at sun.security.smartcardio.PCSC.SCardTransmit(Native Method)
[java] at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:189)
[java] ... 5 more
Do you have the same issue on you latest code? Thank you.
The text was updated successfully, but these errors were encountered: