{"id":24369,"library":"pymonocypher","title":"pymonocypher","description":"Python ctypes bindings to the Monocypher library. Current version: 4.0.2.6, requires Python ~=3.10. Release cadence: irregular, tied to Monocypher updates.","status":"active","version":"4.0.2.6","language":"python","source_language":"en","source_url":"https://github.com/jetperch/pymonocypher","tags":["cryptography","monocypher","ctypes","signing","encryption"],"install":[{"cmd":"pip install pymonocypher","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"note":"The main module is nested; direct import misses the bindings.","wrong":"import pymonocypher","symbol":"pymonocypher","correct":"from pymonocypher import pymonocypher as m"},{"note":"Must use the imported module alias after correct import.","wrong":"pymonocypher.crypto_sign(msg, sk)","symbol":"crypto_sign","correct":"m.crypto_sign(msg, sk)"}],"quickstart":{"code":"from pymonocypher import pymonocypher as m\nkey = m.crypto_sign_keypair()\nprint('Public key:', key.pk.hex())\nmsg = b'Hello'\nsig = m.crypto_sign(msg, key.sk)\nprint('Signature:', sig.hex())\n# Verify\nm.crypto_sign_verify(sig, msg, key.pk)\nprint('Verified OK')","lang":"python","description":"Generate a signing keypair, sign a message, and verify the signature."},"warnings":[{"fix":"Use crypto_sign_verify instead of IncrementalSignatureVerify.","message":"Upgraded from Monocypher 3.1.3 to 4.0.2 in v4.0.2.1; incremental SignatureVerify removed.","severity":"breaking","affected_versions":">=4.0.2.1"},{"fix":"Pass the full 64-byte secret key (sk) to compute_signing_public_key. For the deprecated 32-byte variant, update your code to use the full key.","message":"compute_signing_public_key now requires a 64-byte secret key (full keypair output). The 32-byte variant is deprecated as of v4.0.2.3.","severity":"breaking","affected_versions":">=4.0.2.3"},{"fix":"Use the 64-byte secret key variant.","message":"compute_signing_public_key 32-byte variant deprecated in v4.0.2.3 and will be removed in a future release.","severity":"deprecated","affected_versions":">=4.0.2.3"},{"fix":"Use nb_blocks instead of nb_block when calling argon2i_32.","message":"argon2i_32 had incorrect parameter nb_block (should be nb_blocks) fixed in v4.0.2.4.","severity":"gotcha","affected_versions":"<4.0.2.4"},{"fix":"Use Python >=3.11 or pin to an older version (v4.0.2.5 supports 3.10).","message":"Python 3.10 support dropped as of v4.0.2.6/v3.1.3.5.","severity":"gotcha","affected_versions":">=4.0.2.6, >=3.1.3.5"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Import correctly: from pymonocypher import pymonocypher as m; then use m.crypto_sign_keypair().","cause":"Incorrect import: using 'import pymonocypher' without accessing the inner module.","error":"AttributeError: module 'pymonocypher' has no attribute 'crypto_sign_keypair'"},{"fix":"Pass the full 64-byte secret key returned by crypto_sign_keypair().","cause":"Passing a 32-byte key instead of 64-byte secret key (deprecated 32-byte variant removed).","error":"TypeError: compute_signing_public_key() takes exactly 1 argument (0 given)"},{"fix":"Use nb_blocks instead of nb_block.","cause":"Using the old parameter name nb_block instead of nb_blocks (fixed in v4.0.2.4).","error":"ValueError: nb_block is not a valid parameter for argon2i_32"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}