For Gnuk, it is good to speed up RSA routine.

Last week, I improved a bit. Digital signing by Gnuk, it took 1.78 second (in version 0.12). With the change, it takes 1.72 second. (Majored by time command for gpg --clearsign. It includes calculation time on host and communication time.)

Then, I improved more. With the change, it takes 1.63 second.

Futher, I improved more. With today's change, it takes 1.54 second.

More, I improved. For Gnuk specific version, it just takes 1.48 second.

To be summarized:

  • Use UMULL (32-bitx32-bit => 64-bit) instead of UMULAL (mul and accumulate)
  • Loading/storing with more registers using LDM and STM
  • Use GCC constraints for registers, condition code, and memory

Note that it's 2048-bit RSA computation. Therefore, it is 1024-bit by 1024-bit multiplication because of CRT. For such a not so long size, Karatsuba (or any divide-and-conquer strategy) doesn't make sense, but tuning in assembly language is important.

Here is the ticket of mine: http://polarssl.org/trac/ticket/26

本日もジャンク買いの銭失い。

  • 千石通商 2号店
  • 790 JPY
  • Made in China

コネクタに特徴あり。eSATA と USB のコネクタを一つで兼ねるそうです。

2.5インチの SATA HDD を eSATA でも USB でもつなぐことができるアダプタだと思って買った。

試そうとしたら...

そもそも 2.5-inch の SATA のドライブを持ってなかった。ギャフン。

As I encounter a trouble with Gnuk Token, I sent a post to GnuPG-devel.

"CHANGE REFERENCE DATA" is the command for changing password. I think that there is a bug in the specification, which should be improved.

Specifically, the card/token which follows this specification has no way to detect erroneous password input when a part of input is as same as correct password.

The data should have a delimiter or length of input to check input against correct password.

Excerpt of specification

In the section 7.2.3 CHANGE REFERENCE DATA says:

The length of the existing password is known in the card, so that neither a delimiter nor padding for filling up fixed formats is necessary.

It sounds right, but it is not in fact.

Scute ITP

I submitted ITP (Intent To Package) for scute one month before. It is #615930.

#615930: ITP: scute -- OpenPGP smartcard plugin for Mozilla Network Security Services

On 2011-04-10, it was approved and it is in main now.

See Scute PTS page for the package information.

I wrote a bug report to cherrypy-devel.

Already, I have my own fix inn Unguent.