Skip to main content

Signature Provider plugin for SPSDK using PKCS#11 interface

Project description

PKCS#11 Signature Provider

Signature Provider plugin for SPSDK using PKCS#11 interface

Features

  • Using a PKCS#11 library to sign data using HSM
  • Supported signing schemes: RSA, RSA-PSS, ECDSA

Installation

  • Activate virtual env, where you have SPSDK
    • if SPSDK is not installed, the latest one will be installed automatically from PyPI
  • pip install spsdk-pkcs11

Usage

  • To use this Signature Provider, you have to update your signature provider configuration string(s) in YAML file(s)

  • Configuration string Parameters:

    • type: set to pkcs11
    • so_path: Path to (or name of) your PKCS#11 library (usually delivered by HSM vendor)
      • Plugin is looking for the library in current directory, and paths defined in PATH environment variable
      • Path can be set also in an environment variable (e.g.: $MY_PKCS_LIB)
    • user_pin: Pin to your HSM
      • Pin can be placed directly in the config string (not recommended!)
      • You may place your pin into environment variable (e.g: $MY_PKCS_PIN)
      • You may place your pin into a file, then simply provide the path
    • token_label and/or token_serial: Label or serial to identify the Token in your HSM containing your key
    • key_label and/or key_id: Label or ID to identify the key you want to use
  • Configuration string example:

    • type=pkcs11;so_path:c:/SoftHSM2/lib/softhsm2-x64.dll;user_pin=~/test_pin.txt;token_label=My token 1;key_label=rsa_2048

Limitations

Currently the plugin doesn't wok on Windows when using Python 3.12 (https://github.com/pyauth/python-pkcs11/issues/165)

Credits

This package was created with Cookiecutter and the SPSDK Signature Provider project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spsdk_pkcs11-0.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

spsdk_pkcs11-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file spsdk_pkcs11-0.1.1.tar.gz.

File metadata

  • Download URL: spsdk_pkcs11-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for spsdk_pkcs11-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9af27c00076bb489b20cb90abe3476d8090c0a12ecb1554ad7c4fc0ab29b0e9c
MD5 cb267b2cab5f09986c948fbf9cea4f55
BLAKE2b-256 cc0bf0a7a3ce1e1e537caf7a9275c6c5753e5743a25e7e95105b41cfdf8faa5c

See more details on using hashes here.

File details

Details for the file spsdk_pkcs11-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spsdk_pkcs11-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 567393d2b0e958ba297c75e49c03204084904a9bc3ee2156d8e92976c91a300a
MD5 ab5a11eb38d846738c2b978bac06df76
BLAKE2b-256 b7b1c5372dabfb966b012c0022e4bcacc1a5e3f8622d2dfc0e202e8c6db60935

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page