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 HookI'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