gnupg port to openct, but not working

Andreas Jellinghaus aj@dungeon.inka.de
Fri Aug 15 17:03:02 2003


Hi,

I replaced ct-api and pcsc code in scd/apdu.c
with a pure openct implementation. Merging
this code later should be easy. Olaf,
can you check if something essential is missing?
e.g. I didn't lock the card or anything.

Here is an example of investigating the OpenPGP card:

aj@simulacron:~/gnupg$ LD_LIBRARY_PATH=lib ./bin/sc-investigate 
sc-investigate: reader number: 0
sc-investigate: reader name: Towitoko Chipdrive Micro
sc-investigate: reader slots: 1
sc-investigate: reader 0: ATR=3B FA 13 00 FF 81 31 80 45 00 31 C1 73 C0
01 00 00 90 00 B1
Info on ATR of length 20 at slot 0
direct convention
10 historical characters indicated
TA1: F=372 D=4
TB1: II=0 PI1=0
TC1: guard time shortened to 1 etu
TD1: protocol T1 supported
TD2: protocol T1 supported
TA3: IFSC=128
TB3: BWI=4 CWI=5
Historical: 00 31 C1 73 C0 01 00 00 90 00
TCK: B1 (good)
sc-investigate: apdu_send_simple(0) failed: error code -22
sc-investigate: selecting openpgp failed: Card error
aj@simulacron:~/gnupg$ 

Now with gpgv2 I don't see any option to create a key
on the card. So I tried to generate any key and put it
on the card. Key generation doesn't work:
...

Real name: Andreas Jellinghaus
Email address: aj@nowhere     
Comment: Der Tester      
You selected this USER-ID:
    "Andreas Jellinghaus (Der Tester) <aj@nowhere>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.    

gpg: gpg-agent is not available in this session
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: signing failed: Invalid public key algorithm
gpg: make_keysig_packet failed: Invalid public key algorithm
Key generation failed: Invalid public key algorithm
bash-2.05b$ exit

If someone can generate an RSA key pair and send it to me,
that would be nice for testing.

Regards, Andreas