[Gnuk-users] Gnuk, Nitrokey and upstream contributions

Nico Rikken nico at nicorikken.eu
Tue Sep 8 06:21:32 UTC 2015


Dear Niibe,

Thanks for the elaborate answer.

On di, 2015-09-08 at 13:55 +0900, NIIBE Yutaka wrote:
> On 09/08/2015 04:51 AM, Nico Rikken wrote:
> > The Gnuk presentation during DebConf Portland has introduced me to the
> > concept of software-defined crypto modules, and this really clicked with
> > me.
> 
> Thank you.  Perhaps, you will like our presentation at DebConf
> Heidelberg.

That was interesting, and an enjoyment to watch, especially with the
family-component.

> > As the Nitrokey (prev: Cryptostick) models have become available, I  can
> > now easily acquire a software-defined stick for use on a daily basis.
> [...]
> > 1) Nitrokey offers two sticks, the Start and the Pro. Only the Start is
> > said to be based on the Gnuk firmware. Would I be able to participate
> > with upstream development with the Pro model? Or would I be able to
> > eventually get some of the Pro-only features (4096bit keys, One Time
> > Passwords) on the Start as Gnuk progresses?
> 
> IIUC, Nitrokey Pro uses smartcard module (with hardware accelerator).

I understood so as well, especially after browsing through the source
code. It seems to include flash storage as well, used for encrypted
password storage if I'm correct.

> My position is that:
> 
>     There should be more devices which store private keys in safe.
>     It's users who decide details of how they can control the
>     computing.
> 
>     I support the solutions: (1) OpenPGPcard + card reader, even
>     though it includes proprietary firmware here and there.
>     (2) Yubikey and Nitrokey Pro, even though a part of the
>     cryptographic computation is not by Free Software.
>     (3) Gnuk Token, even though it's not super fast.
> 
>     I assume that Yubicom and Nitrokey can attact "ordinal" users
>     so that Gnuk development can remain calm and solid.

And so it should, having a mess of code does not benefit anyone. But
then again having a software-based solution would be a stepping stone
towards more free crypto token implementations, as it is suitable for
development, and can be ported to a multitude of hardware hosts.

> For me, Nitrokey Start is very good news, because it is available to
> Europe.  (I don't know details of regulations, but, when I talked to a
> distributor in Europe about FST-01, they said about CE mark and WEEE
> regulations.  Unfortunately, I didn't put the CE logo on FST-01,
> because I didn't know it at that time.  Since I don't have time to do
> everything for exporting FST-01 to Europe by myself, arrangement of
> bulk distribution to Europe doesn't become real yet.)

I have a couple of war stories to share on CE markings, because it is
more than just some paint, it requires tests to back it up. However if
I'm correct even the RaspberryPi circumvents some of the regulations by
explicitly stating it is a development board. I guess a lawyer should
know, or hopefully somebody from the community.

> I don't know yet about Nitrokey Pro, but I'm sure that it's good than
> arbitrary card readers of proprietary firmware.  Those tokens like
> Yubikey or Nitrokey Pro have more good tests with GnuPG than any
> card readers.

Than any or than some? Multiple card readers are suggested for use with
GnuPG and I assumed they worked flawlessly. But if I understand
correctly Yubikey, Nitrokey Pro, and Gnuk-based solutions work better.

> While Gnuk experimental version 1.1.7 supports RSA 4096-bit key, it
> takes long time to sign (it's more than 8 seconds).

That makes sense of course. In that case it wouldn't suit my use-case,
but others might choose key-strength over speed.

> While I understand that some users (or "the market") want "more
> features", I think that most important feature of Gnuk and FST-01 is
> minimalist design.  So, adding more and more features to Gnuk is not
> my own option.  Since Gnuk is Free Software, it is free for anyone to
> extend Gnuk in whatever direction, though.

I understand. Ideally the software would be modular enough to offer
features if needed, but be minimalistic at the core. I guess that would
also ease upstream collaboration with companies like Nitrokey which are
in the business of offering such additional features.

> I don't use One Time Password daily.  I use it when I have to do so.
> Usually, it is based on the technology of shared secret, and shared
> secret is also under control of other entity (not only by its users).
> In my own opinion, it is better not to integrate such a technology
> into Gnuk, which handles private keys of the public key technology.
> Those two are separate technologies.
> 
> If it's for web authentication, I think that One Time Password is a
> kind of being obsolete, and industry prefers public key technology,
> like U2F.
> 
> For U2F support, I don't like "special" thing.  I believe that it's
> (technically easily) possible for us to write a U2F module which
> connects to gpg-agent to ask digital signing for the authentication.
> The solution itself shouldn't require a separate dedicated device.
> Only users who want to separate private key management into dedicated
> device should do so (by Gnuk Token or any other devices).

This is not my field of expertise, but I use the Yubikey OTP on a daily
basis, as well as the HOTP or TOTP (using FreeOTP on my smartphone
https://fedorahosted.org/freeotp/ ). U2F (FIDO) seems to be using a
different set of standards, so I'm kinda lost in the available options.
Bottom line having a two-factor solution separate from your computer,
without the need of a charged battery would be great. And from this
standpoint incorporating it in the Gnuk software seems to make sense.

> > 2) Is there any way I can contribute to Gnuk as a user with a Nitrokey
> > on my hands? Say by running a beta-version or by running (distributed)
> > tests on the hardware to validate randomness?
> 
> I'm sure that you are GnuPG users already.  This encourages me a lot.
> If you use _any_ devices with SCDaemon of GnuPG, it's my pleasure,
> too.
> 
> Please note that while it's getting better, SCDaemon of GnuPG itself
> is yet not that mature, requiring more improvements.

But if I only use the tried and true versions, the contribution would of
course be limited. I guess it would then forward development in the way
GPGv2 was included in Debian: it has been around for a while and many
people have been using it, so lets start the transition. So I can be one
of the early adopters to add to the 'already in use' argument.

> > 3) Would a firmware-upgrade remove or modify my stored key, requiring me
> > to have a back-up at hand, or use a dedicated Nitrokey for development?
> 
> IIUC, there is no firmware-upgrade for the smartcard module in
> Nitrokey Pro.  Reasonable firmware-upgrade process should remove all
> of secret data before proceeding to upgrade of code, since the upgrade
> process itself will be able to be a hole to access secret data.
> 
> So, I usually recommend to have a back up for private keys.

I contacted Nitrokey on this and the firmware upgrade was a feature they
want to add in the future. Your point about the security vulnerability
of firmware upgrades is taken.

> > Are there any ways to financially donate to the Gnuk (and related)
> > project?
> 
> Not, particularly.
> 
> Here is a situation of mine.
> 
> Since this April, my work for GnuPG is financially supported by
> g10code GmBH.  When I visit abroad, Free Software Initiative of Japan
> supports my travel (see my another post:
> http://lists.alioth.debian.org/pipermail/gnuk-users/2015q3/000251.html
> ).
> Free Software Foundation kindly helps distribution of the NeuG USB
> True Random Number Generator (= NeuG 1.0.1c on FST-01) since this
> March.
> 
> Unfortunately, Free Software Initiative of Japan doesn't accept
> donation from abroad.  That's because some extra paper work would be
> required for the organization, and they have enough financial asset.
> 
> FST-01 does not sell a lot (thus, we still have enough stocks).  But,
> when I bring those to conferences, people kindly buy.  That's my
> pleasure.  For Debconf15, it sold out all and the sales could
> compensate the expense of stay of our family.  Great.  If the profit
> could compensate the cost, it could be more like real business.
> Still, I believe that I could deliver technology to those who need,
> that's important, too.

That's great and a win-win. Maybe it would be great to have someone in
the EU to help distribute them there. Maybe https://tehnoetic.com/ can
help? And on that topic, would an FSF hardware endorsement be possible?

> Even though FST-01 does not generate much profit, it did somehow.
> Using the profit of FST-01 selling, I designed a board of Flying
> Hacker's Emblem.  The intention is to invite more developers into Gnuk
> and NeuG.  Cortex-M0 @ 48MHz could be a candidate for ed25519/cv25519.

Or LowRISC ofcourse, further peeling of the proprietary layers.

> Yes.  Pardon if the barrier exists.  It's totally not my intention if
> any.  It just means I don't have enough resource and time.

I lack the skillset and interest in development, and a lot of
documentation has already been done. If I can make rather passive or
infrequent contributions, that would be great.

> Please note that Gnuk does not exist alone.  Gnuk Token is one of
> reference devices for SCDaemon of GnuPG.  We have been sharing
> improvements, together.  And FST-01 wasn't here without KiCAD.

> Thank you!

Thank you too!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20150908/00e0b211/attachment-0001.sig>


More information about the gnuk-users mailing list