Skip to content

export_secret_key from StatefulSignature: TypeError: LoadLibrary() argument 1 must be str, not None #136

Closed

Description

@fjumelle

On my Python configuration (Windows 11, Python 3.14.4 32 bits, my own oqs.dll), the export_secret_key method applied on Stateful Signature algo returns the error "TypeError: LoadLibrary() argument 1 must be str, not None" on this line:
ct.CDLL(ct.util.find_library("c")).free(buf_ptr)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^

Actually, the example stfl_sig.py fails when removing the comment line 33:
# secret_key = signer.export_secret_key()

Activity

  1. fjumelle commented on May 7, 2026

    @fjumelle
    Author

    Another remark: with Python 3.14.4 64 bits, the same function 'export_secret_key' in StatefulSignature (with algo class fails "ctypes.ArgumentError: argument 3: OverflowError: int too long to convert" at this line when running the stfl_sig.py example:
    rc = native().OQS_SIG_STFL_SECRET_KEY_serialize( ct.byref(buf_ptr), ct.byref(buf_len), self._secret_key )

  2. added this to the 0.16.0 milestone on May 13, 2026
  3. dstebila commented on May 14, 2026

    @dstebila
    Member

    @fjumelle Could you check if the changes in #141 address your issues?

  4. fjumelle commented on May 15, 2026

    @fjumelle
    Author

    @dstebila I confirm that all is now fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions