Re: [opensc-devel] Which libraries/APIs needed?

2012-12-05 Thread Andreas Jellinghaus
opensc has a test suite that does very similar things - create a key, take some content, hash it, sign the hash, verify it. or take some content, and encrypt/decrypt it, verify the result is ok. check that code, most of it will be very similar to what you have, except for the smart card specific pa

Re: [opensc-devel] Which libraries/APIs needed?

2012-12-04 Thread Alon Bar-Lev
Use PKCS#15 to perform the card management, it can be done using a simple script as you outlined as it done once. Then use PKCS#11 to use the keys and perform the encryption/decryption as it is more standard API, and most likely you will be able to find a utility that does exactly as you need, ref

[opensc-devel] Which libraries/APIs needed?

2012-12-04 Thread Markus Wernig
Hi all I have a rather basic question on which libraries/APIs to use for implementing the following in eg. a C or Java program. The basic idea is: init: - create 256bit key for AES-256 - create RSA keypair on token (no x.509) - encrypt aes-key with pubkey of rsa-pair, delete cleartext version loop