[9] RFR: 8048596: Tests for AEAD ciphers
Valerie Peng
valerie.peng at oracle.com
Fri Jul 24 20:33:09 UTC 2015
Updated webrev looks good~
Valerie
On 7/24/2015 3:15 AM, Artem Smotrakov wrote:
> Hi Valerie,
>
> I thought about random data again. I agree that it doesn't make much
> difference if random data is used instead of static one. And as a
> result, in this case 'randomness' key may be confusing (someone may
> want to filter out tests which use random data for some reason).
>
> I updated the tests not to use random data:
> - removed dependency on RandomFactory
> - removed 'randomness' tag
>
> Please take a look:
>
> http://cr.openjdk.java.net/~asmotrak/8048596/webrev.03/
>
> Artem
>
> On 07/22/2015 11:36 PM, Valerie Peng wrote:
>>
>> Yeah, many ways to generate bytes. It's generally ok to just re-use
>> the same input for various test scenarios in the same test class.
>> As far as I am concerned, the benefit of get data in one line doesn't
>> quite justify the extra dependency.
>>
>> The updated webrev looks fine.
>> Valerie
>>
>> On 7/20/2015 11:33 PM, Artem Smotrakov wrote:
>>> Hi Valerie,
>>>
>>> The tests can easily get data in one line with RandomFacroty. But
>>> they can use static data that may be created with something like the
>>> following:
>>>
>>> public class Helper {
>>>
>>> public static byte[] generateBytes(int length) {
>>> byte[] bytes = new byte[length];
>>> for (int i=0; i<length; i++) {
>>> bytes[i] = (byte) (i % 256);
>>> }
>>> return bytes;
>>> }
>>> }
>>>
>>> Please take a look an updated webrev:
>>>
>>> http://cr.openjdk.java.net/~asmotrak/8048596/webrev.02/
>>>
>>> Artem
>>>
>>> On 07/21/2015 12:19 AM, Valerie Peng wrote:
>>>> Hi Artem,
>>>>
>>>> Just some nit (see below). In general, I find the tests don't need
>>>> to use so many random bytes. If we don't need RandomFactory, then
>>>> no dependence on jdk.testlibrary. Make things easier to execute the
>>>> test on its own if necessary. Just something to keep in mind for
>>>> future test development.
>>>>
>>>> <Encrypt.java>
>>>> - line 186: typo in "intiate". I think you mean initiate the cipher
>>>> without parameters? I don't see how the parameters are saved here.
>>>> - line 190: I think either "generated" or "specified" is better
>>>> than "saved".
>>>>
>>>> <GCMParameterSpecTest.java>
>>>> - line 117: template not reporting key length?
>>>> - line 219: getInstance with "SunJCE"?
>>>>
>>>> <SameBuffer.java>
>>>> - line 110: this check can be done earlier, e.g. on line 108.
>>>>
>>>> Thanks,
>>>> Valerie
>>>>
>>>> On 7/10/2015 1:02 PM, Artem Smotrakov wrote:
>>>>> Hello,
>>>>>
>>>>> Please review a couple of new tests for AEAD ciphers.
>>>>>
>>>>> Webrev: http://cr.openjdk.java.net/~asmotrak/8048596/webrev.01/
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8048596
>>>>>
>>>>> Artem
>>>
>
More information about the security-dev
mailing list