Re: C# .dll availability?

2014-04-27 Thread Sten Lindgren

On 2014-04-25 00:07, Charles Spitzer wrote:


Is there a GnuPGP project anywhere that does PGP encryption that is
usable in a C# application?


Bouncy Castle handles OpenPGP for C# (and Java) you can get it at 
http://www.bouncycastle.org/csharp/ . It uses its own license so its not 
GPL licensed nor part of GnuPG. It still might be useful.





___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


OpenPGPCar on JavaCard key import and large keys

2007-08-26 Thread Sten Lindgren
 keys are to be used
since the data that need to be sent to the card doesn't fit into the data
field of an APDU using short Lc.


CLA: 00
INS: C2
P1 : 00
P2 : 00
Lc : xx or empty to indicate that all data has been sent.
Data Field : Part of APDU to be sent or empty to indicate that all data
 has been sent.
Le : Empty


Sten Lindgren   [EMAIL PROTECTED]

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


OpenPGP card on Javacard

2007-08-01 Thread Sten Lindgren
I have released a alpha test version of an applet implementing part of
the OpenPGP card specification on Java card. It is avaible from
sourceforge at http://sourceforge.net/projects/jopenpgpcard/. Feel free to
test it but don't use it for production use since it is alpha. If you
remove the applet from your card to update in the futureyou loose your
keys,

This implementation has only been tested on one brand of cards using Linux
and gnupg. I does not support key sizes above 1536 bits. You may have to
apply a patch to gnupg apdu.c implementing support for SW_EXACT_LENGTH
in order to get it to work, the patch is in the release on sourceforge
and attached to this mail. The patch is against GnuPG 1.4.7, no other
version has been tested yet.
Key import doesn't work, only on card key generation. Please read the
README file before trying to use it. Most other parts of the specification
should be implemented.
Only some basic testing of key generation, signing and decryption has been
done. Additional features as use of authentification key has not been
tested. I you use authentification somewhere feel free to test and report
if it works or not.

Questions and bug reports should be sent to me.

Some todo items that remains to be done:
- Support for 2048 bit keys (This will most likely need ENVELOPE to be
implemented both on card and in gnupg. 2048 bit acually work for key
generation and signing but not for decryption due to need for more then
254 bytes of data to be sent to the card).
- Key import. (This might not be possible to do in accordance with the
OpenPGP card specification due to limitations in the Java Card API)
- Automatic generation of random serial numbers for the card (when
needed).
- Testing on more cards.

Sten Lindgren   [EMAIL PROTECTED]*** g10/apdu.c  2006-03-05 15:46:14.0 +0100
--- ../gnupg-1.4.7.patched/g10/apdu.c   2007-07-10 12:50:03.0 +0200
***
*** 2640,2645 
--- 2640,2660 
return rc? rc : SW_HOST_INCOMPLETE_CARD_RESPONSE;
  }
sw = (result[resultlen-2]  8) | result[resultlen-1];
+   /* A small hack to fix support for cards sending back SW_EXACT_LENGTH */
+   if ((sw  0xff00) == SW_EXACT_LENGTH  (sw  0x00ff)  0)
+ {
+   resultlen = RESULTLEN;
+   apdu[apdulen - 1] = (sw  0x00ff);
+   rc = send_apdu (slot, apdu, apdulen, result, resultlen, pininfo);
+   if (rc || resultlen  2)
+   {
+ log_error (apdu_send_simple(%d) failed: %s\n,
+slot, apdu_strerror (rc));
+ unlock_slot (slot);
+ return rc? rc : SW_HOST_INCOMPLETE_CARD_RESPONSE;
+   }
+   sw = (result[resultlen-2]  8) | result[resultlen-1];
+ }
/* store away the returned data but strip the statusword. */
resultlen -= 2;
if (DBG_CARD_IO)
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Openpgp card serial numbers

2007-07-16 Thread Sten Lindgren
Hi

Im currently working on an implementation of openpgp card on java card
(Currently working for signing, encryption with 1024 bit keys, trying to
get it work with 2048 bit key).
The specification for Openpgp card states that the serial number
(+ manufacturers ID) must be globally unique. I wonder if this is truly
needed or if unique enough would be ok.
The reason being that while organistaions could register a manufacrurer id
for issuing cards using the java card applet, it might not be practical
for smaller organisations or single individuals to do so in order to use
the Java card implementation.
If it is only used to identify cards from secret key stub in the secret
keyring wouldn't it be enough to register a single manufacturers ID for
use of javacard openpgp card and create a random serial number at applet
instantiation?
I know this would be a breach of the specification but if it is unlikely
to do any harm it might be a working compromise.

-- 
Sten Lindgren   [EMAIL PROTECTED]

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users