[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] Luatweetnacl - a binding to the NaCl crypto library
- From: Phil Leblanc <philanc@...>
- Date: Sun, 28 Aug 2016 01:18:31 -0400
This is a Lua binding to the wonderful NaCl crypto library by Dan
Bernstein, Tanja Lange et al. -- http://nacl.cr.yp.to/
Available functions include
- elliptic curve public key cryptography (curve25519)
- authenticated encryption (salsa20 encryption and poly1305 MAC)
- stream encryption (raw salsa20)
- MAC (poly1305)
- hash (sha512)
- elliptic curve digital signature (ed25519)
- random number generation (based on /dev/urandom)
The version included here is the "Tweet" version ("NaCl in 100
tweets") by Dan Bernstein et al. --
http://tweetnacl.cr.yp.to/index.html (all the tweet nacl code is
included in this library)
This Lua binding is small: luatweetnacl.so, including all the crypto
code, is only 34 KB.
The binding hides the NaCl weird constraints (32 mandatory leading
null bytes for the text to encrypt and 16 leading null bytes in the
encrypted text). So the user does not need to provide or take care of
these leading null spaces.
It is available at: https://github.com/philanc/luatweetnacl
- adjust the path to the Lua include files in the Makefile
- run make
The binding has been built and tested on Linux with Lua-5.3.3,
Lua-5.2.4 and Lua-5.1.5
A very limited test file is provided ("smoketest.lua")
License: MIT (the included Tweet NaCl C code by Dan Bernstein et al.
is public domain)
All suggestions, bug reports and contributions are welcome.