Discussion:
[whispersystems] libaxolotl-android unit tests
Jeff R
2015-04-12 17:06:45 UTC
Permalink
Hi everyone,

I pulled the libaxolotl-android code base down this week and started
getting familiar with it. One of my favorite ways to get familiar with a
project is to study the unit tests. I pulled the code locally, built it
with gradle, and ran the unit tests. There are several that are currently
failing, and I just wanted to check with the devs about which ones should
work? (i.e. maybe I am having an environment specific problem, or perhaps
there are new tests that are a work in progress)

I think several of the failing tests were related to group ratcheting. I
don't have access to my dev laptop as I'm writing this, or I'd give a list.

Thanks!
Jeff
Moxie Marlinspike
2015-04-12 17:17:24 UTC
Permalink
They're all passing. I suspect your environment is probably misconfigured.

moxie
Post by Jeff R
Hi everyone,
I pulled the libaxolotl-android code base down this week and started
getting familiar with it. One of my favorite ways to get familiar with a
project is to study the unit tests. I pulled the code locally, built it
with gradle, and ran the unit tests. There are several that are currently
failing, and I just wanted to check with the devs about which ones should
work? (i.e. maybe I am having an environment specific problem, or perhaps
there are new tests that are a work in progress)
I think several of the failing tests were related to group ratcheting. I
don't have access to my dev laptop as I'm writing this, or I'd give a list.
Thanks!
Jeff
--
http://www.thoughtcrime.org
Jeff R
2015-04-14 06:40:08 UTC
Permalink
Hi Moxie,

Thanks for the quick reply. I'll post the solution here in case it helps
others by being present in the archive, and also post it on
support.whispersystems.org.

The short answer is, I was completely unaware of the Java Cryptography
Extesion, JCE, which controls how strong your JVM's crypto can be. My unit
tests were failing in Cipher.init(..), with "invalid key length" as an
error message. I eventually found this post on stack overflow, where the
JCE is explained and it details how to override this with unlimited
strength policies.

http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters

The policy JARs for Java 8 are available here:
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

Sure enough, as soon as I changed the policy, all the tests pass. :)

Thanks!
Jeff
Post by Moxie Marlinspike
They're all passing. I suspect your environment is probably misconfigured.
moxie
Post by Jeff R
Hi everyone,
I pulled the libaxolotl-android code base down this week and started
getting familiar with it. One of my favorite ways to get familiar with a
project is to study the unit tests. I pulled the code locally, built it
with gradle, and ran the unit tests. There are several that are currently
failing, and I just wanted to check with the devs about which ones should
work? (i.e. maybe I am having an environment specific problem, or perhaps
there are new tests that are a work in progress)
I think several of the failing tests were related to group ratcheting. I
don't have access to my dev laptop as I'm writing this, or I'd give a
list.
Post by Jeff R
Thanks!
Jeff
--
http://www.thoughtcrime.org
Loading...