Skip to main content

Query supported mechanisms

To query mechanisms supported by your smartcard/key, you may use pkcs11-tool --list-mechanism command.

The Feitian PKI, the ePassPKI and the ePass2003 return:

pkcs11-tool --list-mechanisms --module /usr/lib/opensc-pkcs11.so
Using slot 1 with a present token (0x1)
Supported mechanisms:
SHA-1, digest
SHA256, digest
SHA384, digest
SHA512, digest
MD5, digest
RIPEMD160, digest
GOSTR3411, digest
RSA-X-509, keySize={512,2048}, hw, decrypt, sign, verify
RSA-PKCS, keySize={512,2048}, hw, decrypt, sign, verify
SHA1-RSA-PKCS, keySize={512,2048}, sign, verify
SHA256-RSA-PKCS, keySize={512,2048}, sign, verify
MD5-RSA-PKCS, keySize={512,2048}, sign, verify
RIPEMD160-RSA-PKCS, keySize={512,2048}, sign, verify
RSA-PKCS-KEY-PAIR-GEN, keySize={512,2048}, generate_key_pair

{512, 2048} should read from 512bit to 2048bit.
Usually 1024bit is also included with other values.