Skip to main content

Decrypt and encrypt messages compatible to the 'Stanford Javascript Crypto Library (SJCL)' message format.

Project description


Travis CI Python versions new-style BSD

NOTE: this is repo fork from , I only change the output result to json string, since the json string will work better together with the origin javascript version.

Decrypt and encrypt messages compatible to the "Stanford Javascript Crypto Library (SJCL)" message format. This is a wrapper around pycrypto.

This module was created while programming and testing the encrypted blog platform on which is based on sjcl.

Typical usage may look like this:

    #!/usr/bin/env python

    from sjcl import SJCL

    cyphertext = SJCL().encrypt(b"secret message to encrypt", "shared_secret")

    print(SJCL().decrypt(cyphertext, "shared_secret"))

Public repository


Code and documentation copyright Ulf Bartel. Code is licensed under the new-style BSD license.

v0.1.1, 2014-05-21 -- Initial public release. v0.1.4, 2016-04-17 -- Re-init of repository after homepage changed. v0.1.5, 2016-07-12 -- Python3 compat v0.1.6, 2017-07-31 -- Now dependent on pycryptodome v0.2.0, 2018-02-22 -- AES-GCM mode support v0.2.1, 2018-08-16 -- Fixed (missing 'b' prefix for use with python3) v0.2.2, 2020-01-12 -- Aaron/Arstman, use json to for the result to make more copmatible with javascript version

Project details

Download files

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

Files for sjcl-json, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size sjcl_json-0.2.3-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page