Discussion:
Bug with Poly1305 Provider
unixninja92
2014-07-15 15:03:06 UTC
Permalink
Hi all,

I just found a bug with the Poly1305 Provider. When I call
KeyGenerator.getInstance("POLY1305-AES") I get a
NoSuchAlgorithmException. But when I call
KeyGenerator.getInstance("CHACHA") it is able to find the BouncyCastle
provider just fine. It also works fine when I specify BC as the
provider. I'm having the same issue with the Mac class.

And I assume people know the issue tracker is down?

- -Charles
David Hook
2014-07-16 01:32:13 UTC
Permalink
I've fixed the issue-tracker, unfortunately the last upgrade increased
the memory requirements beyond the level that the current server can
cope with. We're in the process of getting this addressed, but it's
likely to fall over periodically for the next month or so.

With POLY1305 I don't understand that at all - there's even a regression
test for this. Can you provide the stack trace, it might shed some light
on what's happening.

Regards,

David
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I just found a bug with the Poly1305 Provider. When I call
KeyGenerator.getInstance("POLY1305-AES") I get a
NoSuchAlgorithmException. But when I call
KeyGenerator.getInstance("CHACHA") it is able to find the BouncyCastle
provider just fine. It also works fine when I specify BC as the
provider. I'm having the same issue with the Mac class.
And I assume people know the issue tracker is down?
- -Charles
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTxUKqAAoJEKzPTx3Y+gGrymgP/3/uNH3usRQ1CyekrmC8VaUh
9QNK5tLn54txoBlKQQS3XbB6mY0sWgOsdYRyq4xEar4KHie07JltADVdh33PEl1T
Gy1fVT+RHunPRABF9VK/8lgLIh6Cq70TfOD4wxilpyqeKLgDMCMShfy9LwehULgV
Jz/1IjFzNATlPKgAd0Dl9D/y4y/JeYQgcAMGKknKpAzNwZBib2v52DJatjBxWoRn
vUKcjLT3vYkX1/ADnCSuJv8FZ7GHPF7Pqaum6xwWmUTyrRLLpY8Ux/T5Yw75WcWU
aDJEcUtmzwcPXap1dPZ1xZC6dqqoAVzu5VUtYgpMYr0EmntvRtaNrZUeDLwxKIRI
l/zejbbnHTMyxaE2Brppm0+w3h4Dri27UZRhawOJ3XrF8FVKJew0rz2hoi+vUCLb
kQDIJSmCiPTEGCSfE8eUZwCOpUUc4mhAueDwNYWuAN0KZNVwB56NLnhwPUIRmgh6
mzvSqHJ5U2BMT/uU8JcT1YoRSS8f1+EgHsUKf3kQ4LtrTJsu6GguwbEu5fgOkOvm
4N1leFpPnngFHw21D+TPSOxONAWO0Do5HEDxizhuDt3xTuX0LCQzIIozrGtScRP2
ubhTJ+cBsAfj91CUUZ8VD3Yd8PdUjjUqCdgcPopy8QihDQ0Qkuwr2TKdf7tcaEId
JL1Joa9wEi2tvmWO+huf
=5rXF
-----END PGP SIGNATURE-----
unixninja92
2014-07-16 14:40:09 UTC
Permalink
I figured it out. BC wasn't being loaded unless I specified it as the
provider for Poly1305. Since tests on Poly1305 were run before ChaCha,
then every time BC was specified, it was loaded, so ChaCha would be
able to find it. Sorry for the confusion.
- -Charles
java.security.NoSuchAlgorithmException: POLY1305-AES KeyGenerator
not available at
javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158) at
javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207) at
freenet.crypt.KeyGenUtils.genSecretKey(KeyGenUtils.java:136) at
freenet.crypt.KeyGenUtilsTest.testGenSecretKeyKeySize(KeyGenUtilsTest.java:311)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:176) at
junit.framework.TestCase.runBare(TestCase.java:141) at
junit.framework.TestResult$1.protect(TestResult.java:122) at
junit.framework.TestResult.runProtected(TestResult.java:142) at
junit.framework.TestResult.run(TestResult.java:125) at
junit.framework.TestCase.run(TestCase.java:129) at
junit.framework.TestSuite.runTest(TestSuite.java:255) at
junit.framework.TestSuite.run(TestSuite.java:250) at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.security.NoSuchAlgorithmException: POLY1305-AES KeyGenerator not
available at
javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158) at
javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207) at
freenet.crypt.KeyGenUtils.genSecretKey(KeyGenUtils.java:136) at
freenet.crypt.KeyGenUtilsTest.testGenSecretKey(KeyGenUtilsTest.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:176) at
junit.framework.TestCase.runBare(TestCase.java:141) at
junit.framework.TestResult$1.protect(TestResult.java:122) at
junit.framework.TestResult.runProtected(TestResult.java:142) at
junit.framework.TestResult.run(TestResult.java:125) at
junit.framework.TestCase.run(TestCase.java:129) at
junit.framework.TestSuite.runTest(TestSuite.java:255) at
junit.framework.TestSuite.run(TestSuite.java:250) at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I've tested this on two different computers now with the same
results. We are using JUnit 3 if that makes a difference.
-Charles
Post by David Hook
I've fixed the issue-tracker, unfortunately the last upgrade
increased the memory requirements beyond the level that the
current server can cope with. We're in the process of getting
this addressed, but it's likely to fall over periodically for the
next month or so.
With POLY1305 I don't understand that at all - there's even a
regression test for this. Can you provide the stack trace, it
might shed some light on what's happening.
Regards,
David
On 16/07/14 01:03, unixninja92 wrote: Hi all,
I just found a bug with the Poly1305 Provider. When I call
KeyGenerator.getInstance("POLY1305-AES") I get a
NoSuchAlgorithmException. But when I call
KeyGenerator.getInstance("CHACHA") it is able to find the
BouncyCastle provider just fine. It also works fine when I
specify BC as the provider. I'm having the same issue with the
Mac class.
And I assume people know the issue tracker is down?
-Charles
Continue reading on narkive:
Loading...