• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created about 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

wrapper for libsodium providing high level crypto primitives

This is a very simple wrapper around libsodium masquerading as nacl.

Build Status

This wrapper requires a pre-installed libsodium from:

https://github.com/jedisct1/libsodium

then it provides access to the following functions:

crypto_aead_chacha20poly1305_decrypt(ciphertext, ad, nonce, key)
crypto_aead_chacha20poly1305_encrypt(message, ad, nonce, key)
crypto_aead_chacha20poly1305_decrypt_detached(ciphertext, mac, ad, nonce, key)
crypto_aead_chacha20poly1305_encrypt_detached(message, ad, nonce, key)
crypto_aead_chacha20poly1305_ietf_decrypt(ciphertext, ad, nonce, key)
crypto_aead_chacha20poly1305_ietf_encrypt(message, ad, nonce, key)
crypto_aead_chacha20poly1305_ietf_decrypt_detached(ciphertext, mac, ad, nonce, key)
crypto_aead_chacha20poly1305_ietf_encrypt_detached(message, ad, nonce, key)
crypto_aead_xchacha20poly1305_ietf_decrypt(ciphertext, ad, nonce, key)
crypto_aead_xchacha20poly1305_ietf_encrypt(message, ad, nonce, key)
crypto_auth(message, key)
crypto_auth_verify(tag, message, key)
crypto_box_afternm(msg, nonce, k)
crypto_box_beforenm(pk, sk)
crypto_box_detached(msg, nonce, pk, sk)
crypto_box_keypair()
crypto_box(msg, nonce, pk, sk)
crypto_box_open_afternm(c, nonce, k)
crypto_box_open(c, nonce, pk, sk)
crypto_box_open_detached(c, mac, nonce, pk, sk)
crypto_box_seal(msg, pk)
crypto_box_seal_open(c, pk, sk)
crypto_box_seed_keypair(seed)
crypto_generichash_blake2b_salt_personal(message, outlen = crypto_generichash_blake2b_BYTES, key = b'', salt = b'', personal = b'')
crypto_generichash_final(state, outlen=crypto_generichash_BYTES)
crypto_generichash_init(outlen=crypto_generichash_BYTES, k=b'')
crypto_generichash(m, k=b'', outlen=crypto_generichash_BYTES)
crypto_generichash_update(state, m)
crypto_hash_sha256(message)
crypto_hash_sha512(message)
crypto_hash_sha512_init()
crypto_hash_sha512_update(state, data)
crypto_hash_sha512_final(state)
crypto_kx_client_session_keys(client_pk, client_sk, server_pk)
crypto_kx_keypair()
crypto_kx_server_session_keys(server_pk, server_sk, client_pk)
crypto_pwhash(outlen, passwd, salt, opslimit, memlimit, alg)
crypto_pwhash_scryptsalsa208sha256(outlen, passwd, salt, opslimit, memlimit)
crypto_pwhash_scryptsalsa208sha256_str(passwd, opslimit, memlimit)
crypto_pwhash_scryptsalsa208sha256_str_verify(stored, passwd)
crypto_pwhash_str(passwd, opslimit, memlimit)
crypto_pwhash_str_verify(pstr, passwd)
crypto_scalarmult_base(n)
crypto_scalarmult_curve25519_base(n)
crypto_scalarmult_curve25519(n, p)
crypto_secretbox(msg, nonce, k)
crypto_secretbox_detached(msg, nonce, k)
crypto_secretbox_open(c, nonce, k)
crypto_secretbox_open_detached(c, mac, nonce, k)
crypto_secretstream_xchacha20poly1305_keygen():
crypto_secretstream_xchacha20poly1305_init_push(key):
crypto_secretstream_xchacha20poly1305_init_pull(header, key):
crypto_secretstream_xchacha20poly1305_rekey(state):
crypto_secretstream_xchacha20poly1305_push(state, message, ad, tag):
crypto_secretstream_xchacha20poly1305_pull(state, ciphertext, ad):
crypto_sign_init()
crypto_sign_update(state, m)
crypto_sign_final_create(state, sk)
crypto_sign_final_verify(state, sig, pk)
crypto_sign_detached(m, sk)
crypto_sign_keypair()
crypto_sign(m, sk)
crypto_sign_open(sm, pk)
crypto_sign_pk_to_box_pk(pk)
crypto_sign_seed_keypair(seed)
crypto_sign_sk_to_box_sk(sk)
crypto_sign_sk_to_pk(sk)
crypto_sign_sk_to_seed(sk)
crypto_sign_verify_detached(sig, msg, pk)
crypto_stream_chacha20_xor(message, nonce, key)
crypto_stream_chacha20_xor_ic(message, nonce, initial_counter, key)
crypto_stream_xchacha20_xor(message, nonce, key)
crypto_stream_xchacha20_xor_ic(message, nonce, initial_counter, key)
crypto_stream(cnt, nonce=None, key=None)
crypto_stream_xor(msg, cnt, nonce=None, key=None)
randombytes(size)
sodium_increment(bytes)
crypto_core_ristretto255_is_valid_point(p)
crypto_core_ristretto255_from_hash(r)
crypto_scalarmult_ristretto255(n, p)
crypto_scalarmult_ristretto255_base(n)
crypto_core_ristretto255_scalar_random()
crypto_core_ristretto255_scalar_invert(s)
crypto_core_ristretto255_scalar_reduce(s)
crypto_core_ristretto255_add(p, q)
crypto_core_ristretto255_sub(p,q)
crypto_core_ristretto255_random()
crypto_core_ristretto255_scalar_negate(s)
crypto_core_ristretto255_scalar_complement(s)
crypto_core_ristretto255_scalar_add(x,y)
crypto_core_ristretto255_scalar_sub(x,y)
crypto_core_ristretto255_scalar_mul(x,y)

Constants:

crypto_aead_chacha20poly1305_ABYTES
crypto_aead_chacha20poly1305_KEYBYTES
crypto_aead_chacha20poly1305_NPUBBYTES
crypto_aead_chacha20poly1305_ietf_KEYBYTES
crypto_aead_chacha20poly1305_ietf_NPUBBYTES
crypto_aead_chacha20poly1305_ietf_ABYTES
crypto_aead_xchacha20poly1305_ietf_KEYBYTES
crypto_aead_xchacha20poly1305_ietf_NPUBBYTES
crypto_aead_xchacha20poly1305_ietf_ABYTES
crypto_auth_BYTES
crypto_auth_KEYBYTES
crypto_box_BEFORENMBYTES
crypto_box_BOXZEROBYTES
crypto_box_MACBYTES
crypto_box_NONCEBYTES
crypto_box_PUBLICKEYBYTES
crypto_box_SEALBYTES
crypto_box_SECRETKEYBYTES
crypto_box_SEEDBYTES
crypto_box_ZEROBYTES
crypto_generichash_KEYBYTES_MAX
crypto_generichash_BYTES
crypto_generichash_BYTES_MAX
crypto_generichash_BYTES_MIN
crypto_generichash_STATEBYTES
crypto_generichash_blake2b_BYTES
crypto_generichash_blake2b_BYTES_MAX
crypto_generichash_blake2b_BYTES_MIN
crypto_generichash_blake2b_KEYBYTES_MAX
crypto_generichash_blake2b_PERSONALBYTES
crypto_generichash_blake2b_SALTBYTES
crypto_hash_sha256_BYTES
crypto_hash_sha512_BYTES
crypto_hash_sha512_STATEBYTES
crypto_kx_PUBLICKEYBYTES
crypto_kx_SECRETKEYBYTES
crypto_kx_SESSIONKEYBYTES
crypto_pwhash_ALG_DEFAULT
crypto_pwhash_ALG_ARGON2I13
crypto_pwhash_ALG_ARGON2ID13
crypto_pwhash_BYTES_MAX
crypto_pwhash_BYTES_MIN
crypto_pwhash_MEMLIMIT_MAX
crypto_pwhash_MEMLIMIT_MIN
crypto_pwhash_MEMLIMIT_INTERACTIVE
crypto_pwhash_MEMLIMIT_MODERATE
crypto_pwhash_MEMLIMIT_SENSITIVE
crypto_pwhash_OPSLIMIT_MAX
crypto_pwhash_OPSLIMIT_MIN
crypto_pwhash_OPSLIMIT_INTERACTIVE
crypto_pwhash_OPSLIMIT_MODERATE
crypto_pwhash_OPSLIMIT_SENSITIVE
crypto_pwhash_PASSWD_MAX
crypto_pwhash_PASSWD_MIN
crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE
crypto_pwhash_argon2i_MEMLIMIT_MODERATE
crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE
crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE
crypto_pwhash_argon2i_OPSLIMIT_MODERATE
crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE
crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE
crypto_pwhash_argon2id_MEMLIMIT_MODERATE
crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE
crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE
crypto_pwhash_argon2id_OPSLIMIT_MODERATE
crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE
crypto_pwhash_SALTBYTES
crypto_pwhash_STRBYTES
crypto_pwhash_scryptsalsa208sha256_BYTES_MAX
crypto_pwhash_scryptsalsa208sha256_BYTES_MIN
crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX
crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN
crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE
crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX
crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN
crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE
crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE
crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX
crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN
crypto_pwhash_scryptsalsa208sha256_SALTBYTES
crypto_pwhash_scryptsalsa208sha256_STRBYTES
crypto_pwhash_scryptsalsa208sha256_STRPREFIX
crypto_scalarmult_BYTES
crypto_scalarmult_SCALARBYTES
crypto_scalarmult_curve25519_BYTES
crypto_secretbox_BOXZEROBYTES
crypto_secretbox_KEYBYTES
crypto_secretbox_KEYBYTES
crypto_secretbox_MACBYTES
crypto_secretbox_NONCEBYTES
crypto_secretbox_ZEROBYTES
crypto_secretstream_xchacha20poly1305_STATEBYTES
crypto_secretstream_xchacha20poly1305_ABYTES
crypto_secretstream_xchacha20poly1305_HEADERBYTES
crypto_secretstream_xchacha20poly1305_KEYBYTES
crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX
crypto_secretstream_xchacha20poly1305_TAG_MESSAGE
crypto_secretstream_xchacha20poly1305_TAG_PUSH
crypto_secretstream_xchacha20poly1305_TAG_REKEY
crypto_secretstream_xchacha20poly1305_TAG_FINAL
crypto_sign_BYTES
crypto_sign_PUBLICKEYBYTES
crypto_sign_SECRETKEYBYTES
crypto_sign_SEEDBYTES
crypto_sign_ed25519_PUBLICKEYBYTES
crypto_sign_ed25519_SECRETKEYBYTES
crypto_stream_KEYBYTES
crypto_stream_NONCEBYTES
crypto_stream_chacha20_NONCEBYTES
crypto_stream_chacha20_KEYBYTES
crypto_stream_xchacha20_NONCEBYTES
crypto_stream_xchacha20_KEYBYTES
crypto_core_ristretto255_BYTES
crypto_core_ristretto255_HASHBYTES
crypto_core_ristretto255_SCALARBYTES
crypto_core_ristretto255_NONREDUCEDSCALARBYTES

Note

most of the the *_easy functions are not implemented as the "non-easy" functions provide already the "easy" interface, which hides the placement of buffers in memory, which makes little sense in python, so this wrapper handles this.

More Repositories

1

libsphinx

Sphinx-based Password Storage low-level library
C
121
star
2

pyrsp

python implementation of the GDB Remote Serial Protocol
Python
76
star
3

libopaque

c implementation of the OPAQUE protocol with bindings for python, php, ruby, lua, zig, java, erlang, golang, js and SASL.
C
69
star
4

wireless-radar

DF and other tools to explore a 2.4GHz environment.
Python
65
star
5

pbp

salty privacy
Python
53
star
6

smeter

reading dumbmeters with gnuradio
Python
45
star
7

timecloud

jQuery Timecloud - a javascript visualization widget
JavaScript
35
star
8

utterson

a minimal static blog generator written using old-school unix tools (make, ksh, m4, awk, procmail and a pinch of elisp)
Shell
35
star
9

flask-tlsauth

flask extension for doing TLS client cert authentication
Python
31
star
10

libsaxolotl

axolotl based on libsodium
C
23
star
11

urlclean

module that resolves and cleans up urls
Python
23
star
12

tlsauth

a simple framework for nginx based tls auth with a flask example
Python
22
star
13

pwd.sh

a simple password manager
Shell
19
star
14

stash

a private dropbox
Python
17
star
15

px1000cr

Files related to PoC||GTFO 21:21 - NSA’s Backdoor of the PX1000-Cr
Python
16
star
16

pwdsphinx

python bindings for libsphinx, a reference client/server and a native backend for web-extensions for Sphinx-based password storage
Python
13
star
17

nnmon

a bugtracker for teh internetz
JavaScript
12
star
18

le-n-x

aka Pippi Longstrings
Python
10
star
19

gpk

automatically generate pgp keys
Shell
10
star
20

stfs

st filesystem for embedded flash systems
C
10
star
21

ksh-scraper

scraper for the hungarian statistics office
Python
9
star
22

liboprf

library providing OPRF and Threshold OPRF based on libsodium
C
9
star
23

cryptokraaken

scans for OpenPGP encrypted messages and key material
Python
8
star
24

pitchforkedsphinx

SPHINX based password protocol
JavaScript
8
star
25

grindr

tools to interact with websites, feeds and im
8
star
26

idapro-cortex-m-hwregs

An IDA Pro plugin that sets up the addresses and structures for Cortex M series MCUs (currently stm32f2xx only)
C
8
star
27

nb-fomu-hw

non-blinky fomu hello world (fpga usb uart demos)
Verilog
7
star
28

torpy

tool and python module to manipulate tor hidden services
Python
7
star
29

websphinx-firefox

Firefox Addon for Sphinx-based password storage
JavaScript
7
star
30

magnus23

shell ircbot based on John-Henry used on telecomix #telekompaketet
Shell
6
star
31

kernelbuild

builds automatically a kernel with grsec and tpsmapi for lenovo thinkpads
Shell
6
star
32

ctrace

dp3t covid19 contact tracer based on zephyr os for nrf51
C
5
star
33

mcabber

unofficial fork of http://mcabber.com
C
5
star
34

burnstation2

this is a fork of pyjama - changed to act as a burnstation
Python
5
star
35

saxolotl

salty axolotl ratchet
Python
5
star
36

pywik

webserver log analyzer
Python
5
star
37

aports-ugly

ugly apkbuilds for alpine linux
Shell
5
star
38

zphinx-zerver

a sphinx server in zig
Python
5
star
39

cr3

simple pipe using crazy/crappy crypto for encryption and signing
C
5
star
40

opaque-store

simple opaque based online store of small blobs
Python
4
star
41

ngx_http_auth_sasl_module

SASL authentication module for nginx
C
4
star
42

credlib

credlib is a credential library providing a simple interface to Brands credentials (by Dr Stefan Brands), and also Chaumian credentials (by Dr David Chaum). The library is based on openSSL.
C
4
star
43

sasl-opaque

Specification of OPAQUE SASL Mechanism
Makefile
4
star
44

pkrecover

recovers pgp rsa pubkeys from two signed blobs
Python
4
star
45

klutshnik

data-at-rest encryption and generic (t)OPRF server and client
C
4
star
46

arduino-cli

develop for arduinos without java
Python
4
star
47

wshare

lightweight network sharing - share your mobile connection via wifi
3
star
48

minijail

fork of chromiumos minijail
C
3
star
49

epc2203

gathers information from epc2203 cable modems (munin plugin inclusive)
Python
2
star
50

maelstrom

visualizing email contacts (dataretention)
PHP
2
star
51

tunnel-daemons

runit scripts for building tunnels
Shell
2
star
52

websphinx-chrom

Chrom* Addon for Sphinx-based Password Storage
JavaScript
2
star
53

hgpoison

poison your strings with unicode homoglyphs
Python
2
star
54

django-tlsauth

django app for doing TLS client cert authentication
Python
2
star
55

obfuscat

simple tool to handle code-phrase mappings
Python
2
star
56

tubetest

shell based network traffic test
JavaScript
2
star
57

ed448goldilocks

Fork of git://git.code.sf.net/p/ed448goldilocks/code with "support" of cross-compiling with mingw
C
2
star
58

pitchfork-5x5

a small font for small displays
C
2
star
59

privacy-challenge

parts of the ono privacy challenge
Python
2
star
60

eumirror

chapter files for videos from eu institutions
2
star
61

mepranking

ranks meps according to perfomance on various policyfields.
Python
2
star
62

kchain

is a set of scripts that help to keep all encryption keys on a USB stick
Shell
1
star
63

Persistent-Crypto-Dictionary

An encrypted persistent dictionary
Python
1
star
64

daemonize

create a simple skeleton for runit/daemontools services
Shell
1
star
65

tmsg

very simple tor-based chat and file sharing
Shell
1
star
66

herrnilsson

a mediawiki bot that imports parltrack dossiers
Python
1
star
67

libtcn

implementation of Temporary Contact Numbers from the TCNCoalition
C
1
star
68

swram

swarm simulation
Erlang
1
star
69

ec-experts

expert groups mining
Python
1
star
70

stm103-rfm12b

simple transmitter on a stm103 using an rfm12b, and a receiver using gnuradio and an rtl-sdr
C
1
star
71

monky

minimalistic console system monitor
C
1
star
72

MACC

multi agent encrypted communication PoC
Shell
1
star
73

pc-mailer

the mailserver of the the privacy challenge
Python
1
star
74

putbag

provides expiration of access to files served by webservers
Shell
1
star
75

omnom

a replacement for del.icio.us - with snapshotting of webpages
JavaScript
1
star
76

jw

jaromils world
C++
1
star
77

pwn_the_game

prototype for a game about hacking
Python
1
star
78

i3c

ksh bindings to i3wm IPC - no dox? use the src
Shell
1
star
79

pycredlib

python bindings for credlib
Python
1
star
80

winsphinx

package native messaging backend for Windows 64
Makefile
1
star
81

certcheck

educating users shaming browsers on handling https certs
HTML
1
star
82

objchanges

diffs and patches python objects
Python
1
star
83

stm32f407Vxxx-devboard

devboard for stm32f40xVx cpus
IDL
1
star
84

kuka-yoga

KUKA Robot C2 example using interrupts controlled via serial port
1
star
85

s6-services

setups for s6
Shell
1
star