.NET PKCS#11 is a library for .NET framework that supplies an API in C# and/or VB.NET for native modules implementing PKCS#11 specifications
.NET PKCS#11 maps the Cryptoki's functions defined in PKCS#11 specification in a set of high level classes usable inC# and/or VB.NET and propose a programming paradigm
very similar to the one described in PKCS#11 specifications and reported in the native implementations.
.NET PKCS#11 allows to avoid the extremely tedious work needed for importing in .NET, by using P/Invoke services, the PKCS#11 functions exported by native implemenations reducing in such a way the complexity of the code and the development time.
Snippet in C#
Sample code in C#:
// Creates a Cryptoki object related to the specific PKCS#11 native library
Cryptoki cryptoki = new Cryptoki("smaoscki.dll");
cryptoki.Initialize();
// Reads the set of slots containing a token
SlotList tokenslots = cryptoki.ActiveSlots;
if(tokenslots.Count == 0)
throw new Exception("No token inserted");
// Gets the first token available
Token token = tokenslots[0].Token;
// Opens a read/write serial session
Session session =
token.OpenSession(Session.CKF_SERIAL_SESSION | Session.CKF_RW_SESSION, null, null);
// Executes the login passing the user PIN
session.Login(Session.CKU_USER, "1234");
...
COM interface
.NET PKCS#11 supplies also a COM interface that can be used in Visual Basic 6, Delphi and all other languages that supports COM
Ex. in Visual Basic 6:
' Creates new Cryptoki object
Set ctoki = New Cryptoki
' attach to pkcs11 module
ctoki.Attach ("smaoscki")
' initialize
ctoki.Initialize
Set slots = ctoki.slots
For Each slt In slots
MsgBox (slt.info.Description)
Next
Set tkn = slt.Token
Set sess = tkn.OpenSession(CKF_RW_SESSION Or CKF_SERIAL_SESSION)
sess.Login CKU_USER, "1234"
...
License Fee:
|
- Full License |
44,90 Euro |
|
Message in a Bottle is an application for mobile phones which allows to protect your SMS communications from intrusions and unauthorized access.
Message in a Bottle uses the most powerful cryptographic algorithms, such as Elliptic Curve Cryptography and AES 256, to send encrypted SMS and stores protects private SMSs in a special encrypted repository accessible only after typing a dedicated protection PIN.
JIProlog is a pure Java 100% Prolog interpreter, compliant with ISO Prolog and with J2RE and J2ME platforms, that integrates Prolog e Java languages.
Technologies, specifications, development platforms and sample codes for Java, C/C++, C#, VB.NET and Visual Basic:
ISO7816, Java Card, PC/SC, PKCS#11, PKCS#15, EMV, OpenCard Framework, Java Smart Card I/O API, Smart Card Applications, Cryptography
Ugo Chirico
Gruppo Editoriale Infomedia, 2003
containing utilities, libraries, development tools, manuals and sample codes for programming smart cards in C/C++, C#, VB.NET, VB6 and Java on Windows, Linux, ecc.