Professional Documents
Culture Documents
PKCS11
PKCS11
Practical -
1. Installing / Configuring “Protect Server C SDK for Windows”.
2. Installing / Configuring “Code Blocks IDE”.
3. Configuring Code Blocks for PKCS #11
4. Writing our first PKCS #11 code.
PKCS (Public Key Cryptography Standards)
Some of the standards are PKCS #1, PKCS #3, PKCS #5, PKCS #8, PKCS
#10, PKCS #11 and PKCS #12.
https://en.wikipedia.org/wiki/PKCS
Standard Purpose
PKCS #1 Properties for RSA keys that should be followed for Encryption, Signing including the
encoding scheme.
PKCS #3 Key Exchange (Diffie-Hellman)
PKCS #11 Also known as Cryptographic Token Interface or simply “cryptoki”. API meant for
Hardware tokens such has Smart Cards and HSMs.
PKCS #12 Storing Private Keys along with the associated certificates.
PKCS #11
https://en.wikipedia.org/wiki/PKCS_11
Terminology used in PKCS #11
SLOTS
SESSION
TOKEN LIBRARY
OBJECTS
DATA-TYPES
Wrapper
FUNCTIONS
Prefixes
MECHANISM
CRYPTOKI MODEL
PKCS #11 Prefixes and Naming convention
Please do read
PKCS #11 v2.20
manual for
more about
these
functions..
Practical Stuff
We’re going to use
PTK-C as it’s the best
Protect Server Toolkit way to hon your
PKCS #11 skills
• Install Protect Server Tool Kit for C. without needing an
actual hardware.
• Configure it for software mode.
• Create a new slot and initialize it.
Code Blocks
• Install TDM-GCC.
• Install Code Blocks IDE.
• Configuring Code Blocks IDE for PKCS #11 programming.
Protect Server Toolkit Installation
Select “1” for
Software only mode.
Follow the arrows..
Installing TDM-GCC
Installing Code Blocks
Configuring Code Blocks for PKCS #11 Programming
Save the
configuration
Settings >> Compiler … with
whatever
name you
want.
Configuring Code Blocks for PKCS #11 Programming
Configuring Code Blocks for PKCS #11 Programming
Hehe.. I know..
Ganbatte !