[haiku-development] Re: [Outreachy] Haiku and Crypto Set

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 6 Mar 2019 08:20:53 +0100

On Wed, Mar 06, 2019 at 02:05:48AM +0300, Lee Mon wrote:

Hello, I want to participate in Outreachy with Haiku Crypto Set project.So, I
have some questions. I can see some 
tickets:https://review.haiku-os.org/c/haiku/+/439https://review.haiku-os.org/c/haiku/+/438
is there any category in tickets for this module?

Not yet, since the code has not been merged yet.
There is a single ticket about it: https://dev.haiku-os.org/ticket/13246

Can I have a better overview of what should be done?

This project is a bit unclear yet. It will be up to you to define what's
appropriate. The first use case is using these in the BKeyStore class,
to securely store wifi network passwords (currently they are written to
disk in cleartext, which is, of course, not a great idea).

So we could start with that: adding a master password or key to BKeyStore,
and using it to encrypt and secure the stored data.

The project can grow in various directions, here are some ideas:
- Finishing the work on disk encryption Axel started a few years ago
- Adding signatures support to our package system to make sure packages
  are not modified by MITM attack
- Integrating GPG into the mail client in an easy and user friendly way
- Improving the management of SSL certificates in the web browser and
  adding a true certificate manager (for server side, but maybe also
  client side SSL certificates, even if these don't get much use in
  HTTPS these days).

Of course each of these will first require some infrastructure, low
level code in the crypto kit.

How those functions are tested? From my experience, TDD is
great for cryptography functions implementation.Is there any specific test 
tool
for Haiku?

Indeed, this is a good fit for TDD. We have some unit tests in
src/tests. They are based on cppunit. You can build them using jam -q
unittests and then run the generated UnitTester binary (there are
arguments to run only a part of the test suite).

There are various articles and blog posts about this on the website:
https://www.haiku-os.org/tags/unit-testing ;(two of them are from 2002
and probably not up to date on the details, but still give you a general
idea. Help updating these is welcome).

I have some experience with cryptography and have implemented some
algorithms earlier for study projects (RSA, AES, ECRSA, El-Gamal, etc). For a
library, I can also propose a name libcryptocore.so (openssl uses
libcrypto-core.so) or libsyscrypto.so. Those are just to provide more 
variants.

I think libcryptokit is the most popular name for now?

Also, this is my first step with Haiku:
https://medium.com/@strongleemon/starting-with-haikuos-cb3f547da8ef. It was
pretty easy to build it.

-- 
Adrien / PulkoMandy

Other related posts: