We have our own interface for working with the device and API for generating a signature - PKCS # 11 library. The source codes of demo applications are available on github:
Rutoken Demobank
Rutoken Demoshit
Please note that all the samples use Russian crypto algorithms.
To implement RSA and ECDSA you need Rutoken SDK with API https://download.rutoken.ru/Rutoken/SDK/rutoken-sdk-latest.zip
RSA and ECDSA methods are in a folder /SDK/pkcs11/samples/Standard/.
Some details:
- RSA
- CreateRSA – creating method
- EncDecRSA – encrypt/decrypt
- SignRSAwithHash - calculation / verification of digital signature on RSA keys
- SigVerUpdateRSAWithHash - streaming computation / verification of digital signature on RSA keys
- SigVerRSA – signature verification
- DeleteRSA – deleting method
- ECDSA
- CreateECDSA – creating method
- EncDecECDSA – encrypt/decrypt
- SigVerECDSA – signature verification
- DeleteECDSA – deleting method
- Storage of custom data
- CreateDataObject – write data
- FindDataObject – find and read data
- DeleteDataObject – delete data