Testing C and C++ libraries

124 views
Skip to first unread message

nolo...@gmail.com

unread,
Dec 23, 2016, 1:03:37 AM12/23/16
to wycheproof-users
Hi Everyone,

Thank you for the test suite.

I'd like to evaluate C libraries and C++ libraries. README.md does not mention them by name, but does state "We are converting as many tests into sets of test vectors to simplify porting the tests to other languages".

How would one go about testing a C or C++ library? Is there a documented procedure or guidlines available somewhere?

Looking at the sources, I'm guessing JNI wrappers that provide entry points used by the test classes, like AesEaxTest, are needed. I'm less clear on how to avoid a SE Provider, which WycheproofRunner seems to rely on.

Thanks in advance,

Jeff

Daniel Bleichenbacher

unread,
Dec 23, 2016, 7:37:19 AM12/23/16
to nolo...@gmail.com, wycheproof-users

--
You received this message because you are subscribed to the Google Groups "wycheproof-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wycheproof-users+unsubscribe@googlegroups.com.
To post to this group, send email to wycheproof-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wycheproof-users/24294ffa-c538-415f-9d0b-e216b53005bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

One of the goals of the project is trying to avoid rewriting tests for each library.
Very helpful for this goal are common interfaces: JCA is such a common interface and the reason for starting the project in Java.
For libraries that do not have a common interface at least the test vector can be reused. Hence, we try to use a much test vectors as possible.
For C/C++ we might define an interface for the tests and rewrite them it just hasn't been done yet.

We test part of boringSSL through conscrypt. Though these tests tell more about the quality of conscrypt than the quality of boringSSL.
Thus I think writing JNI wrappers just for testing a library is overkill.


Thai Duong

unread,
Jan 6, 2017, 11:35:59 AM1/6/17
to wycheproof-users


On Friday, December 23, 2016 at 7:37:19 AM UTC-5, bleichen wrote:

On Fri, Dec 23, 2016 at 7:03 AM, <nolo...@gmail.com> wrote:
Hi Everyone,

Thank you for the test suite.

I'd like to evaluate C libraries and C++ libraries. README.md does not mention them by name, but does state "We are converting as many tests into sets of test vectors to simplify porting the tests to other languages".

How would one go about testing a C or C++ library? Is there a documented procedure or guidlines available somewhere?

Looking at the sources, I'm guessing JNI wrappers that provide entry points used by the test classes, like AesEaxTest, are needed. I'm less clear on how to avoid a SE Provider, which WycheproofRunner seems to rely on.

Thanks in advance,

Jeff

--
You received this message because you are subscribed to the Google Groups "wycheproof-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wycheproof-users+unsubscribe@googlegroups.com.
To post to this group, send email to wycheproof-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wycheproof-users/24294ffa-c538-415f-9d0b-e216b53005bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

One of the goals of the project is trying to avoid rewriting tests for each library.
Very helpful for this goal are common interfaces: JCA is such a common interface and the reason for starting the project in Java.
For libraries that do not have a common interface at least the test vector can be reused. Hence, we try to use a much test vectors as possible.
For C/C++ we might define an interface for the tests and rewrite them it just hasn't been done yet.

Just a quick update on this: we'll spend some time defining this interface. We should have something by the end of Q1. 

Albert Chang

unread,
Jan 7, 2017, 2:56:57 PM1/7/17
to wycheproof-users
+1 to this question and to the response.

Thank you all for your work on this...it's much appreciated by this humble and avg user :)

Krzysztof Kwiatkowski

unread,
Jan 16, 2017, 5:04:22 AM1/16/17
to wycheproof-users
+1 for adding possibility to test C/C++ libraries.
I think that's interesting feature. Not sure what's the plan here, but I may be able to help with development.
Reply all
Reply to author
Forward
0 new messages