{
  "id": "task_libraries:cryptography/python",
  "path": "/exapedia/python-cryptography-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python cryptography libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python cryptography libraries encrypt data, sign and verify messages, and hash passwords. A high-level recipe chooses the algorithm and its parameters for the caller rather than exposing each primitive. These libraries let apps and services protect stored data, secrets, and user passwords."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python cryptography libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#cryptography",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rsa",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pynacl",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bcrypt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pycryptodome",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#argontwo-cffi",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ecdsa",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#passlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#cryptography",
          "label": [
            {
              "t": "text",
              "text": "cryptography"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F126"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Authenticated encryption",
            "Password hash records",
            "Digital signatures"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#cryptography",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rsa",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pynacl",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bcrypt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pycryptodome",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#argontwo-cffi",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ecdsa",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#passlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "cryptography",
          "name": [
            {
              "t": "fact",
              "fact": "F125"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pyca/cryptography"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/cryptography"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/pypi/cryptography/50.0.2/json"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/cryptography/50.0.2/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F125"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/paramiko/paramiko",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F140"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _write_private_key(\n    self,\n    f: RawIOBase,\n    key: PrivateKey,\n    file_format: FileFormat,\n    password: Optional[str] = None,\n):\n    if password is None:\n        encryption = serialization.NoEncryption()\n    else:\n        encryption = serialization.BestAvailableEncryption(b(password))\n\n    f.write(\n        key.private_bytes(\n            file_format.encoding, file_format.format, encryption\n        ).decode()\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/paramiko/paramiko/blob/0e9ccb91e0f9a68f2587233d523ad7fe46e730fe/paramiko/pkey.py#L825-L841",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20cryptography%20for%20authenticated%20encryption%2C%20private-key%20serialization%2C%20packet%20protection%20and%20password%20hashing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F125"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from cryptography.fernet import Fernet\nkey = Fernet.generate_key()\nf = Fernet(key)\ntoken = f.encrypt(b\"my deep dark secret\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cryptography.io/en/latest/fernet/",
                  "label": [
                    {
                      "t": "text",
                      "text": "fernet.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "rsa",
          "name": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sybrenstuvel/python-rsa"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/rsa"
            },
            {
              "label": "Docs",
              "href": "https://stuvel.eu/python-rsa-doc/usage.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F149"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://stuvel.eu/python-rsa-doc/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mpdavis/python-jose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def verify(self, msg, sig):\n    if not self.is_public():\n        warnings.warn(\"Attempting to verify a message with a private key. \" \"This is not recommended.\")\n    try:\n        pyrsa.verify(msg, sig, self._prepared_key)\n        return True\n    except pyrsa.pkcs1.VerificationError:\n        return False\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mpdavis/python-jose/blob/018b310ddb8b50dcfd09a0c152117835a21dd656/jose/backends/rsa_backend.py#L206-L213",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F159"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=rsa%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import rsa\npublic_key, private_key = rsa.newkeys(2048)\nsignature = rsa.sign(b\"message\", private_key, \"SHA-256\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://stuvel.eu/python-rsa-doc/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "usage.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pynacl",
          "name": [
            {
              "t": "fact",
              "fact": "F162"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pyca/pynacl"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/PyNaCl"
            },
            {
              "label": "Docs",
              "href": "https://pynacl.readthedocs.io/en/latest/secret/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F39"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "Runs on",
              "value": [
                {
                  "t": "fact",
                  "fact": "F33"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pynacl.readthedocs.io/en/latest/secret/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F162"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Rapptz/discord.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _encrypt_aead_xchacha20_poly1305_rtpsize(self, header: bytes, data) -> bytes:\n    # Esentially the same as _lite\n    # Uses an incrementing 32-bit integer which is appended to the payload\n    # The only other difference is we require AEAD with Additional Authenticated Data (the header)\n    box = nacl.secret.Aead(bytes(self.secret_key))\n    nonce = bytearray(24)\n\n    nonce[:4] = struct.pack('>I', self._incr_nonce)\n    self.checked_add('_incr_nonce', 1, 4294967295)\n\n    return header + box.encrypt(bytes(data), bytes(header), bytes(nonce)).ciphertext + nonce[:4]\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Rapptz/discord.py/blob/65232c38702be5844cf2ce865a4777eb1928b5d0/discord/voice_client.py#L403-L413",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F176"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20PyNaCl%20for%20authenticated%20encryption%2C%20private-key%20serialization%2C%20packet%20protection%20and%20password%20hashing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F162"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import nacl.secret\nimport nacl.utils\nkey = nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE)\nbox = nacl.secret.SecretBox(key)\nencrypted = box.encrypt(b\"message\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pynacl.readthedocs.io/en/latest/secret/",
                  "label": [
                    {
                      "t": "text",
                      "text": "secret.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F167"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "bcrypt",
          "name": [
            {
              "t": "fact",
              "fact": "F179"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pyca/bcrypt"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/bcrypt"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F61"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/pyca/bcrypt",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import bcrypt\nhashed = bcrypt.hashpw(b\"super secret password\", bcrypt.gensalt())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/pyca/bcrypt",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20bcrypt%20for%20authenticated%20encryption%2C%20private-key%20serialization%2C%20packet%20protection%20and%20password%20hashing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pycryptodome",
          "name": [
            {
              "t": "fact",
              "fact": "F193"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Legrandin/pycryptodome"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pycryptodome"
            },
            {
              "label": "Docs",
              "href": "https://www.pycryptodome.org/src/cipher/aes"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F87"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.pycryptodome.org/src/cipher/aes",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/ansible/ansible",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F208"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@staticmethod\ndef _encrypt_pycrypto(b_plaintext, b_key1, b_key2, b_iv):\n    # PKCS#7 PAD DATA http://tools.ietf.org/html/rfc5652#section-6.3\n    bs = AES_pycrypto.block_size\n    padding_length = (bs - len(b_plaintext) % bs) or bs\n    b_plaintext += to_bytes(padding_length * chr(padding_length), encoding='ascii', errors='strict')\n\n    # COUNTER.new PARAMETERS\n    # 1) nbits (integer) - Length of the counter, in bits.\n    # 2) initial_value (integer) - initial value of the counter. \"iv\" from _gen_key_initctr\n\n    ctr = Counter_pycrypto.new(128, initial_value=int(b_iv, 16))\n\n    # AES.new PARAMETERS\n    # 1) AES key, must be either 16, 24, or 32 bytes long -- \"key\" from _gen_key_initctr\n    # 2) MODE_CTR, is the recommended mode\n    # 3) counter=<CounterObject>\n\n    cipher = AES_pycrypto.new(b_key1, AES_pycrypto.MODE_CTR, counter=ctr)\n\n    # ENCRYPT PADDED DATA\n    b_ciphertext = cipher.encrypt(b_plaintext)\n\n    # COMBINE SALT, DIGEST AND DATA\n    hmac = HMAC_pycrypto.new(b_key2, b_ciphertext, SHA256_pycrypto)\n\n    return to_bytes(hmac.hexdigest(), errors='surrogate_or_strict'), hexlify(b_ciphertext)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/ansible/ansible/blob/5cfdbd83151edd000e79edf550f0c5bc54aebd19/lib/ansible/parsing/vault/__init__.py#L1233-L1259",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20pycryptodome%20for%20authenticated%20encryption%2C%20private-key%20serialization%2C%20packet%20protection%20and%20password%20hashing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from Crypto.Cipher import AES\nfrom Crypto.Random import get_random_bytes\nkey = get_random_bytes(32)\nnonce = get_random_bytes(12)\ncipher = AES.new(key, AES.MODE_GCM, nonce=nonce)\nciphertext, tag = cipher.encrypt_and_digest(b\"Attack at dawn\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pycryptodome.readthedocs.io/en/latest/src/cipher/modern.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "modern.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F198"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "argontwo-cffi",
          "name": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/hynek/argon2-cffi"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/argon2-cffi"
            },
            {
              "label": "Docs",
              "href": "https://argon2-cffi.readthedocs.io/en/stable/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F217"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://argon2-cffi.readthedocs.io/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F210"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/jupyter-server/jupyter_server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def passwd(passphrase=None, algorithm=\"argon2\"):\n    \"\"\"Generate hashed password and salt for use in server configuration.\n\n    In the server configuration, set `c.ServerApp.password` to\n    the generated string.\n\n    Parameters\n    ----------\n    passphrase : str\n        Password to hash.  If unspecified, the user is asked to input\n        and verify a password.\n    algorithm : str\n        Hashing algorithm to use (e.g, 'sha1' or any argument supported\n        by :func:`hashlib.new`, or 'argon2').\n\n    Returns\n    -------\n    hashed_passphrase : str\n        Hashed password, in the format 'hash_algorithm:salt:passphrase_hash'.\n\n    Examples\n    --------\n    >>> passwd(\"mypassword\")  # doctest: +ELLIPSIS\n    'argon2:...'\n\n    \"\"\"\n    if passphrase is None:\n        for _ in range(3):\n            p0 = getpass.getpass(\"Enter password: \")\n            p1 = getpass.getpass(\"Verify password: \")\n            if p0 == p1:\n                passphrase = p0\n                break\n            warnings.warn(\"Passwords do not match.\", stacklevel=2)\n        else:\n            msg = \"No matching passwords found. Giving up.\"\n            raise ValueError(msg)\n\n    if algorithm == \"argon2\":\n        import argon2\n\n        ph = argon2.PasswordHasher(\n            memory_cost=10240,\n            time_cost=10,\n            parallelism=8,\n        )\n        h_ph = ph.hash(passphrase)\n\n        return f\"{algorithm}:{h_ph}\"\n\n    h = hashlib.new(algorithm)\n    salt = (\"%0\" + str(salt_len) + \"x\") % random.getrandbits(4 * salt_len)\n    h.update(passphrase.encode(\"utf-8\") + salt.encode(\"ascii\"))\n\n    return f\"{algorithm}:{salt}:{h.hexdigest()}\"\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/jupyter-server/jupyter_server/blob/c4c5a51d2cf77d31a266376582ee05c4d661ad4b/jupyter_server/auth/security.py#L23-L77",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=argon2-cffi%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F210"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from argon2 import PasswordHasher\nph = PasswordHasher()\nhash = ph.hash(\"correct horse battery staple\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://argon2-cffi.readthedocs.io/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F215"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ecdsa",
          "name": [
            {
              "t": "fact",
              "fact": "F229"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tlsfuzzer/python-ecdsa"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/ecdsa"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/tlsfuzzer/python-ecdsa",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F229"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mpdavis/python-jose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def verify(self, msg, sig):\n    try:\n        return self.prepared_key.verify(\n            sig, msg, hashfunc=self.hash_alg, sigdecode=ecdsa.util.sigdecode_string, allow_truncate=False\n        )\n    except Exception:\n        return False\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mpdavis/python-jose/blob/018b310ddb8b50dcfd09a0c152117835a21dd656/jose/backends/ecdsa_backend.py#L103-L109",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F246"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=ecdsa%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F229"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from ecdsa import SigningKey, NIST256p\nfrom hashlib import sha256\nkey = SigningKey.generate(curve=NIST256p)\nsignature = key.sign_deterministic(b\"message\", hashfunc=sha256)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ecdsa.readthedocs.io/en/latest/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "passlib",
          "name": [
            {
              "t": "fact",
              "fact": "F249"
            }
          ],
          "links": [
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/passlib"
            },
            {
              "label": "Docs",
              "href": "https://passlib.readthedocs.io/en/stable/lib/passlib.context.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F256"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://passlib.readthedocs.io/en/stable/lib/passlib.context.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F249"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from passlib.context import CryptContext\ncontext = CryptContext(schemes=[\"pbkdf2_sha512\"])\nhash = context.hash(\"password\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://passlib.readthedocs.io/en/stable/narr/context-tutorial.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "context-tutorial.rst"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=passlib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F249"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python cryptography library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#cryptography",
          "label": [
            {
              "t": "text",
              "text": "cryptography"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits most applications, with authenticated encryption recipes and lower-level primitives. "
        },
        {
          "t": "link",
          "href": "#argontwo-cffi",
          "label": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#bcrypt",
          "label": [
            {
              "t": "text",
              "text": "bcrypt"
            }
          ]
        },
        {
          "t": "text",
          "text": " suit password storage. "
        },
        {
          "t": "link",
          "href": "#pynacl",
          "label": [
            {
              "t": "text",
              "text": "PyNaCl"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits code that wants the fixed choices of libsodium."
        }
      ]
    },
    {
      "q": "What is PyCryptodome?",
      "a": [
        {
          "t": "link",
          "href": "#pycryptodome",
          "label": [
            {
              "t": "text",
              "text": "PyCryptodome"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a self-contained package of low-level ciphers, signatures, message authentication codes, and key derivation functions. The caller chooses the cipher mode and parameters for each operation."
        }
      ]
    },
    {
      "q": "What is Passlib?",
      "a": [
        {
          "t": "link",
          "href": "#passlib",
          "label": [
            {
              "t": "text",
              "text": "Passlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a password hashing framework that selects, verifies, and migrates between many hash schemes."
        }
      ]
    },
    {
      "q": "What is bcrypt in Python?",
      "a": [
        {
          "t": "link",
          "href": "#bcrypt",
          "label": [
            {
              "t": "text",
              "text": "bcrypt"
            }
          ]
        },
        {
          "t": "text",
          "text": " generates password records that store the cost factor and salt inside the encoded bytes, then verifies passwords against them. It focuses on password storage rather than general encryption."
        }
      ]
    },
    {
      "q": "What is PyNaCl?",
      "a": [
        {
          "t": "link",
          "href": "#pynacl",
          "label": [
            {
              "t": "text",
              "text": "PyNaCl"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a Python binding to libsodium with authenticated symmetric encryption, public-key signatures, and password hashing helpers."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, cryptography",
      "display": "cryptography",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, cryptography",
      "display": "1.3B",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, cryptography",
      "display": "Apache-2.0 OR BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, cryptography",
      "display": "50.0.2, Sep 2026",
      "asOf": "2026-09-30"
    },
    "F5": {
      "label": "Package release date, cryptography",
      "display": "Sep 2026",
      "asOf": "2026-09-30"
    },
    "F6": {
      "label": "Repository stars, cryptography",
      "display": "7.9K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Authenticated encryption, cryptography",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Public-key signatures, cryptography",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Password hashing, cryptography",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Key derivation, cryptography",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, cryptography",
      "display": "pip install cryptography",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, cryptography",
      "display": "Provides cryptographic recipes and lower-level cryptographic primitives.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, cryptography",
      "display": "Authenticates encrypted messages",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, cryptography",
      "display": "Use Fernet to encrypt messages and detect tampering.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, cryptography",
      "display": "Supports Fernet key rotation",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, cryptography",
      "display": "Rotate encrypted tokens with MultiFernet.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, cryptography",
      "display": "Fernet keeps whole messages in-memory",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, cryptography",
      "display": "Choose a streaming design for data that cannot fit in memory.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, cryptography",
      "display": "Token timestamps stay visible",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, cryptography",
      "display": "Fernet tokens expose creation timestamps while their message payloads remain encrypted.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, cryptography",
      "display": "from cryptography.fernet import Fernet\nkey = Fernet.generate_key()\nf = Fernet(key)\ntoken = f.encrypt(b\"my deep dark secret\")\ntoken\nf.decrypt(token)\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, cryptography",
      "display": "def _write_private_key(\n    self,\n    f: RawIOBase,\n    key: PrivateKey,\n    file_format: FileFormat,\n    password: Optional[str] = None,\n):\n    if password is None:\n        encryption = serialization.NoEncryption()\n    else:\n        encryption = serialization.BestAvailableEncryption(b(password))\n\n    f.write(\n        key.private_bytes(\n            file_format.encoding, file_format.format, encryption\n        ).decode()\n    )\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, cryptography",
      "display": "pkey.py · _write_private_key()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, cryptography",
      "display": "paramiko/paramiko",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, paramiko/paramiko",
      "display": "9.9K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, paramiko/paramiko",
      "display": "Oct 2026",
      "asOf": "2026-10-18"
    },
    "F27": {
      "label": "Library name, PyNaCl",
      "display": "PyNaCl",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, PyNaCl",
      "display": "171.5M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, PyNaCl",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, PyNaCl",
      "display": "1.6.2, Jan 2026",
      "asOf": "2026-01-01"
    },
    "F31": {
      "label": "Package release date, PyNaCl",
      "display": "Jan 2026",
      "asOf": "2026-01-01"
    },
    "F32": {
      "label": "Repository stars, PyNaCl",
      "display": "1.2K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Runtime, PyNaCl",
      "display": "libsodium",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Authenticated encryption, PyNaCl",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Public-key signatures, PyNaCl",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Password hashing, PyNaCl",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Key derivation, PyNaCl",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "Install, PyNaCl",
      "display": "pip install PyNaCl",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "What it does, PyNaCl",
      "display": "Exposes the libsodium cryptography library through Python bindings.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, PyNaCl",
      "display": "Includes authenticated message encryption",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, PyNaCl",
      "display": "Use SecretBox or Aead to encrypt and authenticate messages.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths lead, PyNaCl",
      "display": "Includes memory-hard password hashing",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "strengths, PyNaCl",
      "display": "Use Argon2id, Argon2i, or scrypt through nacl.pwhash.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, PyNaCl",
      "display": "Password keys need saved parameters",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, PyNaCl",
      "display": "Store the salt, chosen derivation function, and its cost settings.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, PyNaCl",
      "display": "from nacl import pwhash, secret, utils\n\npassword = b'password shared between Alice and Bob'\nmessage = b\"This is a message for Bob's eyes only\"\n\nkdf = pwhash.argon2i.kdf\nsalt = utils.random(pwhash.argon2i.SALTBYTES)\nops = pwhash.argon2i.OPSLIMIT_SENSITIVE\nmem = pwhash.argon2i.MEMLIMIT_SENSITIVE\n\n# or, if there is a need to use scrypt:\n# kdf = pwhash.scrypt.kdf\n# salt = utils.random(pwhash.scrypt.SALTBYTES)\n# ops = pwhash.scrypt.OPSLIMIT_SENSITIVE\n# mem = pwhash.scrypt.MEMLIMIT_SENSITIVE\n\nAlices_key = kdf(secret.SecretBox.KEY_SIZE, password, salt,\n                 opslimit=ops, memlimit=mem)\nAlices_box = secret.SecretBox(Alices_key)\nnonce = utils.random(secret.SecretBox.NONCE_SIZE)\n\nencrypted = Alices_box.encrypt(message, nonce)\n\n# now Alice must send to Bob both the encrypted message\n# and the KDF parameters: salt, opslimit and memlimit;\n# using the same kdf mechanism, parameters **and password**\n# Bob is able to derive the correct key to decrypt the message\n\nBobs_key = kdf(secret.SecretBox.KEY_SIZE, password, salt,\n               opslimit=ops, memlimit=mem)\nBobs_box = secret.SecretBox(Bobs_key)\nreceived = Bobs_box.decrypt(encrypted)\nprint(received.decode('utf-8'))\n\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, PyNaCl",
      "display": "def _encrypt_aead_xchacha20_poly1305_rtpsize(self, header: bytes, data) -> bytes:\n    # Esentially the same as _lite\n    # Uses an incrementing 32-bit integer which is appended to the payload\n    # The only other difference is we require AEAD with Additional Authenticated Data (the header)\n    box = nacl.secret.Aead(bytes(self.secret_key))\n    nonce = bytearray(24)\n\n    nonce[:4] = struct.pack('>I', self._incr_nonce)\n    self.checked_add('_incr_nonce', 1, 4294967295)\n\n    return header + box.encrypt(bytes(data), bytes(header), bytes(nonce)).ciphertext + nonce[:4]\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, PyNaCl",
      "display": "voice_client.py · _encrypt_aead_xchacha20_poly1305_rtpsize()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, PyNaCl",
      "display": "Rapptz/discord.py",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, Rapptz/discord.py",
      "display": "16.2K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, Rapptz/discord.py",
      "display": "Sep 2026",
      "asOf": "2026-09-07"
    },
    "F52": {
      "label": "Library name, bcrypt",
      "display": "bcrypt",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, bcrypt",
      "display": "169.8M",
      "asOf": "2026-11-16"
    },
    "F54": {
      "label": "License, bcrypt",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, bcrypt",
      "display": "5.0.0, Sep 2025",
      "asOf": "2025-09-25"
    },
    "F56": {
      "label": "Package release date, bcrypt",
      "display": "Sep 2025",
      "asOf": "2025-09-25"
    },
    "F57": {
      "label": "Repository stars, bcrypt",
      "display": "1.5K",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Password hashing, bcrypt",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Key derivation, bcrypt",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Install, bcrypt",
      "display": "pip install bcrypt",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "What it does, bcrypt",
      "display": "Hashes and checks passwords with bcrypt.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, bcrypt",
      "display": "Tunes password-hashing work",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, bcrypt",
      "display": "Set the work factor when generating a salt.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, bcrypt",
      "display": "Derives OpenSSH-compatible keys",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, bcrypt",
      "display": "Use bcrypt.kdf for OpenSSH’s password-based key derivation.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, bcrypt",
      "display": "Long passwords raise errors",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, bcrypt",
      "display": "Validate encoded password length before calling hashpw.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, bcrypt",
      "display": "New password storage favors alternatives",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, bcrypt",
      "display": "Consider Argon2id or scrypt for new password-storage designs.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Quickstart, bcrypt",
      "display": "import bcrypt\npassword = b\"super secret password\"\n# Hash a password for the first time, with a randomly-generated salt\nhashed = bcrypt.hashpw(password, bcrypt.gensalt())\n# Check that an unhashed password matches one that has previously been\n# hashed\nif bcrypt.checkpw(password, hashed):\n    print(\"It Matches!\")\nelse:\n    print(\"It Does not Match :(\")\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function, bcrypt",
      "display": "def generate_password_hash(self, password, rounds=None, prefix=None):\n    # ...\n\n    if not password:\n        raise ValueError('Password must be non-empty.')\n\n    if rounds is None:\n        rounds = self._log_rounds\n    if prefix is None:\n        prefix = self._prefix\n\n    # Python 3 unicode strings must be encoded as bytes before hashing.\n    password = self._unicode_to_bytes(password)\n    prefix = self._unicode_to_bytes(prefix)\n\n    if self._handle_long_passwords:\n        password = hashlib.sha256(password).hexdigest()\n        password = self._unicode_to_bytes(password)\n\n    salt = bcrypt.gensalt(rounds=rounds, prefix=prefix)\n    return bcrypt.hashpw(password, salt)\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function reference, bcrypt",
      "display": "flask_bcrypt.py · generate_password_hash()",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project repository, bcrypt",
      "display": "maxcountryman/flask-bcrypt",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project stars, maxcountryman/flask-bcrypt",
      "display": "326",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project push date, maxcountryman/flask-bcrypt",
      "display": "Apr 2026",
      "asOf": "2026-04-22"
    },
    "F76": {
      "label": "Library name, pycryptodome",
      "display": "PyCryptodome",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Monthly downloads, pycryptodome",
      "display": "83.0M",
      "asOf": "2026-11-16"
    },
    "F78": {
      "label": "License, pycryptodome",
      "display": "BSD-2-Clause AND Unlicense AND MIT",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Package release, pycryptodome",
      "display": "4.5.0, Nov 2026",
      "asOf": "2026-11-15"
    },
    "F80": {
      "label": "Package release date, pycryptodome",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F81": {
      "label": "Repository stars, pycryptodome",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Authenticated encryption, pycryptodome",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Public-key signatures, pycryptodome",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Password hashing, pycryptodome",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Key derivation, pycryptodome",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, pycryptodome",
      "display": "pip install pycryptodome",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, pycryptodome",
      "display": "Provides a self-contained Python package of low-level cryptographic primitives.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, pycryptodome",
      "display": "Includes authenticated AES modes",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, pycryptodome",
      "display": "Encrypt messages and verify their authentication tags with AES-GCM.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, pycryptodome",
      "display": "Derives password-based keys",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, pycryptodome",
      "display": "Derive encryption keys from passwords with scrypt.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, pycryptodome",
      "display": "Cipher modes have different guarantees",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, pycryptodome",
      "display": "Choose an authenticated mode when ciphertext tampering must be detected.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, pycryptodome",
      "display": "GCM needs unique nonces",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, pycryptodome",
      "display": "Generate a fresh nonce for each message encrypted under the same key.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, pycryptodome",
      "display": "from Crypto.Cipher import AES\nfrom Crypto.Random import get_random_bytes\n\ndata = b'The secret message'\nkey = get_random_bytes(16)\nnonce = get_random_bytes(12)\ncipher = AES.new(key, AES.MODE_GCM, nonce=nonce)\nciphertext, tag = cipher.encrypt_and_digest(data)\n\nfrom Crypto.Cipher import AES\n\ncipher = AES.new(key, AES.MODE_GCM, nonce=nonce)\ntry:\n    plaintext = cipher.decrypt_and_verify(ciphertext, tag)\n    print(\"The message is authentic:\", plaintext)\nexcept ValueError:\n    print(\"Key incorrect or message corrupted\")\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "Authenticated tokens and key rotation",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose cryptography",
      "display": "authenticated Fernet messages",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "authenticated tokens and key rotation",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "When to consider PyNaCl",
      "display": "password hashing needs Argon2id or scrypt",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need",
      "display": "Explicit AES-mode selection",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Why choose pycryptodome",
      "display": "authenticated AES APIs",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need in introduction",
      "display": "explicit AES-mode selection",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "libsodium and password hashing",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose PyNaCl",
      "display": "memory-hard password-hashing choices",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "libsodium and password hashing",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "When to consider pycryptodome",
      "display": "the protocol specifies an AES mode",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need",
      "display": "Configurable bcrypt password storage",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Why choose bcrypt",
      "display": "an adjustable password-hashing work factor",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need in introduction",
      "display": "configurable bcrypt password storage",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "When to consider PyNaCl",
      "display": "a new password-storage design needs Argon2id or scrypt",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Page introduction",
      "display": "Python cryptography libraries let application developers encrypt data and work with cryptographic signatures.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: What is the best Python cryptography library?",
      "display": "cryptography includes high-level recipes and lower-level primitives.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: What is the best Python cryptography library?",
      "display": "PyCryptodome exposes self-contained Python package.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: What is the best Python cryptography library?",
      "display": "PyNaCl binds libsodium and includes memory-hard password hashing.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: What is the best Python cryptography library?",
      "display": "bcrypt focuses on password hashing and its OpenSSH key-derivation function.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Can I use Fernet to encrypt a large file?",
      "display": "Fernet keeps complete message contents in memory, which limits its suitability for very large files.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does encryption alone detect tampering?",
      "display": "Classic modes such as CBC provide confidentiality without message integrity.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does encryption alone detect tampering?",
      "display": "Authenticated-encryption modes combine message encryption and authentication.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Which libraries support Argon-based password hashing?",
      "display": "PyNaCl exposes Argon2id, Argon2i, and scrypt through nacl.pwhash.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Which libraries support Argon-based password hashing?",
      "display": "cryptography also verifies Argon2id PHC-encoded password hashes.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Why does bcrypt reject a long password?",
      "display": "Current bcrypt raises ValueError when hashpw receives a password beyond its byte limit; older versions silently truncated.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: What must I store with a password-derived encryption key?",
      "display": "Keep a reference to the derivation function, the salt, and all cost parameters needed to derive the same key again.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Can Fernet tokens reveal when they were created?",
      "display": "Fernet includes its timestamp in plaintext even while its payload is encrypted.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "Library name, cryptography",
      "display": "cryptography",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Monthly downloads, cryptography",
      "display": "1.4B",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "License, cryptography",
      "display": "Apache-2.0 OR BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Package release, cryptography",
      "display": "50.0.2",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release date, cryptography",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Install, cryptography",
      "display": "python3 -m pip install cryptography",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Quickstart, cryptography",
      "display": "from cryptography.fernet import Fernet\nkey = Fernet.generate_key()\nf = Fernet(key)\ntoken = f.encrypt(b\"my deep dark secret\")\n",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Repository stars, cryptography",
      "display": "7.9K",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Authenticated encryption, cryptography",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Password hash records, cryptography",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Digital signatures, cryptography",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Task and abstraction, cryptography",
      "display": "General cryptographic recipes and primitives, including Fernet authenticated encryption, signatures, and current Argon2id PHC password-record encoding.",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Download scope, cryptography",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project function, cryptography",
      "display": "def _write_private_key(\n    self,\n    f: RawIOBase,\n    key: PrivateKey,\n    file_format: FileFormat,\n    password: Optional[str] = None,\n):\n    if password is None:\n        encryption = serialization.NoEncryption()\n    else:\n        encryption = serialization.BestAvailableEncryption(b(password))\n\n    f.write(\n        key.private_bytes(\n            file_format.encoding, file_format.format, encryption\n        ).decode()\n    )\n",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project source file, cryptography",
      "display": "paramiko/pkey.py",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project full_name, cryptography",
      "display": "paramiko/paramiko",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project stargazers_count, cryptography",
      "display": "9.9K",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Library name, rsa",
      "display": "rsa",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Monthly downloads, rsa",
      "display": "196.7M",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "License, rsa",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release, rsa",
      "display": "4.9.1",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Package release date, rsa",
      "display": "Apr 2025",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Install, rsa",
      "display": "python3 -m pip install rsa",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Quickstart, rsa",
      "display": "import rsa\npublic_key, private_key = rsa.newkeys(2048)\nsignature = rsa.sign(b\"message\", private_key, \"SHA-256\")\n",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Official description, rsa",
      "display": "Implements RSA in pure Python.",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Quickstart source file, rsa",
      "display": "usage.rst",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Repository stars, rsa",
      "display": "490",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Authenticated encryption, rsa",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Password hash records, rsa",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Digital signatures, rsa",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Task and abstraction, rsa",
      "display": "Pure-Python RSA signature/encryption interoperability interface; archived upstream status retained, not a default recommendation for a new security-sensitive system.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Download scope, rsa",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Repository maintenance state, rsa",
      "display": "Archived upstream repository. Published package4.9.1 and its documented API still exist; archive is not an active-maintenance claim.",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project function, rsa",
      "display": "def verify(self, msg, sig):\n    if not self.is_public():\n        warnings.warn(\"Attempting to verify a message with a private key. \" \"This is not recommended.\")\n    try:\n        pyrsa.verify(msg, sig, self._prepared_key)\n        return True\n    except pyrsa.pkcs1.VerificationError:\n        return False\n",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project source file, rsa",
      "display": "jose/backends/rsa_backend.py",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project full_name, rsa",
      "display": "mpdavis/python-jose",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project stargazers_count, rsa",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Library name, PyNaCl",
      "display": "PyNaCl",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Monthly downloads, PyNaCl",
      "display": "177.2M",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "License, PyNaCl",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Package release, PyNaCl",
      "display": "1.6.2",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Package release date, PyNaCl",
      "display": "Jan 2026",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Install, PyNaCl",
      "display": "python3 -m pip install PyNaCl",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Quickstart, PyNaCl",
      "display": "import nacl.secret\nimport nacl.utils\nkey = nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE)\nbox = nacl.secret.SecretBox(key)\nencrypted = box.encrypt(b\"message\")\n",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Repository stars, PyNaCl",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Authenticated encryption, PyNaCl",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Password hash records, PyNaCl",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Digital signatures, PyNaCl",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Task and abstraction, PyNaCl",
      "display": "libsodium-based authenticated symmetric encryption, Ed25519 signatures, and encoded password-hash helpers; nonce ownership matters when overriding the random default.",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Download scope, PyNaCl",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Project function, PyNaCl",
      "display": "def _encrypt_aead_xchacha20_poly1305_rtpsize(self, header: bytes, data) -> bytes:\n    # Esentially the same as _lite\n    # Uses an incrementing 32-bit integer which is appended to the payload\n    # The only other difference is we require AEAD with Additional Authenticated Data (the header)\n    box = nacl.secret.Aead(bytes(self.secret_key))\n    nonce = bytearray(24)\n\n    nonce[:4] = struct.pack('>I', self._incr_nonce)\n    self.checked_add('_incr_nonce', 1, 4294967295)\n\n    return header + box.encrypt(bytes(data), bytes(header), bytes(nonce)).ciphertext + nonce[:4]\n",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Project source file, PyNaCl",
      "display": "discord/voice_client.py",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Project full_name, PyNaCl",
      "display": "Rapptz/discord.py",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Project stargazers_count, PyNaCl",
      "display": "16.2K",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Library name, bcrypt",
      "display": "bcrypt",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Monthly downloads, bcrypt",
      "display": "175.9M",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "License, bcrypt",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Package release, bcrypt",
      "display": "5.0.0",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Package release date, bcrypt",
      "display": "Sep 2025",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Install, bcrypt",
      "display": "python3 -m pip install bcrypt",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart, bcrypt",
      "display": "import bcrypt\nhashed = bcrypt.hashpw(b\"super secret password\", bcrypt.gensalt())\n",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Repository stars, bcrypt",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Authenticated encryption, bcrypt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Password hash records, bcrypt",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Digital signatures, bcrypt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Task and abstraction, bcrypt",
      "display": "Focused bcrypt password record generation/verification with cost and salt in the encoded bytes; current5.0 has explicit72-byte input rejection.",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Download scope, bcrypt",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Password input bound, bcrypt",
      "display": "bcrypt5.0 raises ValueError for passwords over72 bytes; byte length after encoding differs from character count.",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Library name, pycryptodome",
      "display": "PyCryptodome",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Monthly downloads, pycryptodome",
      "display": "86.4M",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "License, pycryptodome",
      "display": "BSD-2-Clause AND Unlicense AND MIT",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Package release, pycryptodome",
      "display": "4.5.0",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Package release date, pycryptodome",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Install, pycryptodome",
      "display": "python3 -m pip install pycryptodome",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Quickstart, pycryptodome",
      "display": "from Crypto.Cipher import AES\nfrom Crypto.Random import get_random_bytes\nkey = get_random_bytes(32)\nnonce = get_random_bytes(12)\ncipher = AES.new(key, AES.MODE_GCM, nonce=nonce)\nciphertext, tag = cipher.encrypt_and_digest(b\"Attack at dawn\")\n",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Repository stars, pycryptodome",
      "display": "3.3K",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Authenticated encryption, pycryptodome",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Password hash records, pycryptodome",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Digital signatures, pycryptodome",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Task and abstraction, pycryptodome",
      "display": "Low-level cipher/signature/MAC/KDF collection under Crypto, including authenticated cipher modes and bcrypt record helpers; caller controls composition and parameters.",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Download scope, pycryptodome",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Project function, pycryptodome",
      "display": "@staticmethod\ndef _encrypt_pycrypto(b_plaintext, b_key1, b_key2, b_iv):\n    # PKCS#7 PAD DATA http://tools.ietf.org/html/rfc5652#section-6.3\n    bs = AES_pycrypto.block_size\n    padding_length = (bs - len(b_plaintext) % bs) or bs\n    b_plaintext += to_bytes(padding_length * chr(padding_length), encoding='ascii', errors='strict')\n\n    # COUNTER.new PARAMETERS\n    # 1) nbits (integer) - Length of the counter, in bits.\n    # 2) initial_value (integer) - initial value of the counter. \"iv\" from _gen_key_initctr\n\n    ctr = Counter_pycrypto.new(128, initial_value=int(b_iv, 16))\n\n    # AES.new PARAMETERS\n    # 1) AES key, must be either 16, 24, or 32 bytes long -- \"key\" from _gen_key_initctr\n    # 2) MODE_CTR, is the recommended mode\n    # 3) counter=<CounterObject>\n\n    cipher = AES_pycrypto.new(b_key1, AES_pycrypto.MODE_CTR, counter=ctr)\n\n    # ENCRYPT PADDED DATA\n    b_ciphertext = cipher.encrypt(b_plaintext)\n\n    # COMBINE SALT, DIGEST AND DATA\n    hmac = HMAC_pycrypto.new(b_key2, b_ciphertext, SHA256_pycrypto)\n\n    return to_bytes(hmac.hexdigest(), errors='surrogate_or_strict'), hexlify(b_ciphertext)\n",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Project source file, pycryptodome",
      "display": "lib/ansible/parsing/vault/__init__.py",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Project full_name, pycryptodome",
      "display": "ansible/ansible",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project stargazers_count, pycryptodome",
      "display": "71.5K",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Library name, argon2-cffi",
      "display": "argon2-cffi",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Monthly downloads, argon2-cffi",
      "display": "83.3M",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "License, argon2-cffi",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Package release, argon2-cffi",
      "display": "25.1.0",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Package release date, argon2-cffi",
      "display": "Jun 2025",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Install, argon2-cffi",
      "display": "python3 -m pip install argon2-cffi",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Quickstart, argon2-cffi",
      "display": "from argon2 import PasswordHasher\nph = PasswordHasher()\nhash = ph.hash(\"correct horse battery staple\")\n",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Official description, argon2-cffi",
      "display": "Hashes passwords with Argon2.",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Quickstart source file, argon2-cffi",
      "display": "docs/index.rst",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Repository stars, argon2-cffi",
      "display": "742",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Authenticated encryption, argon2-cffi",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Password hash records, argon2-cffi",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Digital signatures, argon2-cffi",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Task and abstraction, argon2-cffi",
      "display": "Focused Argon2 password records and verification/rehash helpers with a high-level PasswordHasher interface and optional low-level bindings.",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Download scope, argon2-cffi",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project function, argon2-cffi",
      "display": "def passwd(passphrase=None, algorithm=\"argon2\"):\n    \"\"\"Generate hashed password and salt for use in server configuration.\n\n    In the server configuration, set `c.ServerApp.password` to\n    the generated string.\n\n    Parameters\n    ----------\n    passphrase : str\n        Password to hash.  If unspecified, the user is asked to input\n        and verify a password.\n    algorithm : str\n        Hashing algorithm to use (e.g, 'sha1' or any argument supported\n        by :func:`hashlib.new`, or 'argon2').\n\n    Returns\n    -------\n    hashed_passphrase : str\n        Hashed password, in the format 'hash_algorithm:salt:passphrase_hash'.\n\n    Examples\n    --------\n    >>> passwd(\"mypassword\")  # doctest: +ELLIPSIS\n    'argon2:...'\n\n    \"\"\"\n    if passphrase is None:\n        for _ in range(3):\n            p0 = getpass.getpass(\"Enter password: \")\n            p1 = getpass.getpass(\"Verify password: \")\n            if p0 == p1:\n                passphrase = p0\n                break\n            warnings.warn(\"Passwords do not match.\", stacklevel=2)\n        else:\n            msg = \"No matching passwords found. Giving up.\"\n            raise ValueError(msg)\n\n    if algorithm == \"argon2\":\n        import argon2\n\n        ph = argon2.PasswordHasher(\n            memory_cost=10240,\n            time_cost=10,\n            parallelism=8,\n        )\n        h_ph = ph.hash(passphrase)\n\n        return f\"{algorithm}:{h_ph}\"\n\n    h = hashlib.new(algorithm)\n    salt = (\"%0\" + str(salt_len) + \"x\") % random.getrandbits(4 * salt_len)\n    h.update(passphrase.encode(\"utf-8\") + salt.encode(\"ascii\"))\n\n    return f\"{algorithm}:{salt}:{h.hexdigest()}\"\n",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Project source file, argon2-cffi",
      "display": "jupyter_server/auth/security.py",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Project full_name, argon2-cffi",
      "display": "jupyter-server/jupyter_server",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Project stargazers_count, argon2-cffi",
      "display": "573",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Library name, ecdsa",
      "display": "ecdsa",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Monthly downloads, ecdsa",
      "display": "43.4M",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "License, ecdsa",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Package release, ecdsa",
      "display": "0.19.2",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Package release date, ecdsa",
      "display": "Mar 2026",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Install, ecdsa",
      "display": "python3 -m pip install ecdsa",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Quickstart, ecdsa",
      "display": "from ecdsa import SigningKey, NIST256p\nfrom hashlib import sha256\nkey = SigningKey.generate(curve=NIST256p)\nsignature = key.sign_deterministic(b\"message\", hashfunc=sha256)\n",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Official description, ecdsa",
      "display": "Signs and verifies ECDSA signatures in pure Python.",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Quickstart source file, ecdsa",
      "display": "docs/source/quickstart.rst",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Repository stars, ecdsa",
      "display": "978",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Authenticated encryption, ecdsa",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Password hash records, ecdsa",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Digital signatures, ecdsa",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Task and abstraction, ecdsa",
      "display": "Portable pure-Python EC signing/verification and interoperability/reference tooling; publisher warns it is not protected against side-channel attacks.",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Download scope, ecdsa",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Publisher security scope, ecdsa",
      "display": "Publisher says the library should not be used in production settings and does not protect against side-channel attacks; describes interoperability/testing as its primary role.",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Project function, ecdsa",
      "display": "def verify(self, msg, sig):\n    try:\n        return self.prepared_key.verify(\n            sig, msg, hashfunc=self.hash_alg, sigdecode=ecdsa.util.sigdecode_string, allow_truncate=False\n        )\n    except Exception:\n        return False\n",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Project source file, ecdsa",
      "display": "jose/backends/ecdsa_backend.py",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Project full_name, ecdsa",
      "display": "mpdavis/python-jose",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Project stargazers_count, ecdsa",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Library name, passlib",
      "display": "Passlib",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Monthly downloads, passlib",
      "display": "35.2M",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "License, passlib",
      "display": "BSD",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Package release, passlib",
      "display": "1.7.4",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Package release date, passlib",
      "display": "Oct 2020",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Install, passlib",
      "display": "python3 -m pip install passlib",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Quickstart, passlib",
      "display": "from passlib.context import CryptContext\ncontext = CryptContext(schemes=[\"pbkdf2_sha512\"])\nhash = context.hash(\"password\")\n",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Official description, passlib",
      "display": "Hashes passwords through a framework that supports over 30 schemes.",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Quickstart source file, passlib",
      "display": "docs/narr/context-tutorial.rst",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Authenticated encryption, passlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Password hash records, passlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Digital signatures, passlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Task and abstraction, passlib",
      "display": "Password-hash scheme selection, verification, and migration policy; selected PBKDF2 example avoids attributing modern bcrypt backend compatibility to old Passlib1.7.4.",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Download scope, passlib",
      "display": "Whole distribution installations with overlapping dependencies. Not unique developers, security adoption, or a sum across namespace/implementation alternatives.",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Backend scope, passlib",
      "display": "Selected current-code proof covers PBKDF2-SHA512 policy. It does not certify old Passlib bcrypt backend behavior against bcrypt5 or recommend retaining plaintext/MD5/DES for new hashes.",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python cryptography libraries cryptography PyCryptodome PyNaCl bcrypt encryption signatures password hashing code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
