summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-02-09 18:34:54 +0000
committerTobias Thierer <tobiast@google.com>2017-02-09 20:06:28 +0000
commit8ee6debb115ba7479dd166fe5eba95b38e0d61cb (patch)
treeba7c30fe40b4db07ffaa2ae1abd5250d1e7a4823 /annotations/generate_annotated_java_files.py
parentbe473851645e6c67e7e94c262c74838e73b09d8a (diff)
Speed up DHPublicKeyTest; make DHPrivateKeyTest consistent.
DHPublicKeyTest.test_getParams() was generating 1024bit Diffie-Hellman parameters; this operation is very slow and very variable, often taking more than the 5 minutes allowed before the test times out. In practice, parameters are not generated at random, especially not on a mobile device; instead, in practice well-known parameters are picked rather than generating a random one. To make this the test both more realistic and faster to run, this CL splits up DHPublicKeyTest.test_getParams() into two tests: 1.) generate a 192bit, rather than 1024bit, parameters 2.) use hard coded 2048bit parameters to generate keys. The 2048-bit group from RFC 7919, Appendix A, was used. The same is done to DHPrivateKeyTest.test_getParams(), which was previously only doing 1.). Historical context: DHPrivateKeyTest historically had observed the same problems; therefore, commit 8bc378b1cec65bc06766a14a9cc575fec931b418 in Feb 2011 changed it to only use 192bit, i.e. do 1.); DHPublicKeyTest was not touched at that time. DHPublicKeyTest's timeout was increased in June 2015 (cts commit d16b864e9537e172436bfb8a5de76e9e49fcea35) but that broke with the switch to CTSv2. Test: Check that DHPrivateKeyTest and DHPublicKeyTest pass within a few seconds on a Nexus 6P. Bug: 30741591 Change-Id: I6af0a70761557e4f4c1641cad7807d2211553e25
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions