mgregoro / crypt-sodium Goto Github PK
View Code? Open in Web Editor NEWPerl bindings for libsodium (NaCL)
License: Artistic License 2.0
Perl bindings for libsodium (NaCL)
License: Artistic License 2.0
Version detection has already been implemented see c7ab096, just have to add newer functionality and make use of the Crypt_Sodium_XS_sufficient_libsodium_version
guard function. Make sure this is done for the xchacha20poly1305
functions before closing #9
crypto_x features introduced in:
Base Support: 1.0.8
ARGON2: 1.0.9
aead_xchacha20poly1305: 1.0.12
Newest: 1.0.16
Allow build against 1.0.8
$ perl t/Crypt-Sodium.t
ok 1 - use Crypt::Sodium;
ok 2 - Testing roundtrip of crypto_stream_xor
ok 3 - Testing roundtrip of ''
Aborted
$ perl t/Crypt-Sodium.t
ok 1 - use Crypt::Sodium;
ok 2 - Testing roundtrip of crypto_stream_xor
ok 3 - Testing roundtrip of ''
ok 4 - Testing roundtrip of crypto_secretbox
ok 5 - Testing roundtrip of crypto_box
Segmentation fault (core dumped)
Hi,
Do you have any plans to update for newer versions of libsodium ? For example you don't appear to have implemented Argon2 based password hashing, looks like its still Scrypt based in your code ?
It would be helpful if crypto_scalarmult_base was also exposed.
Originally requested by @udf2456 in #6 ...
https://download.libsodium.org/doc/public-key_cryptography/sealed_boxes.html
FYI, build of current version (git 6116470) is failing (Ubuntu 16.04LTS)
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Crypt::Sodium
Writing MYMETA.yml and MYMETA.json
foo@bar:~/test/Crypt-Sodium$ make
cp lib/Crypt/Sodium/GenericHash/State.pm blib/lib/Crypt/Sodium/GenericHash/State.pm
cp lib/Crypt/Sodium.pm blib/lib/Crypt/Sodium.pm
Running Mkbootstrap for Crypt::Sodium ()
chmod 644 "Sodium.bs"
"/usr/bin/perl" "/usr/share/perl/5.22/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.22/ExtUtils/typemap" Sodium.xs > Sodium.xsc && mv Sodium.xsc Sodium.c
x86_64-linux-gnu-gcc -c -I/usr/local/include -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.12\" -DXS_VERSION=\"0.12\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE" -Wno-pointer-sign Sodium.c
Sodium.xs: In function ‘XS_Crypt__Sodium_real_crypto_aead_xchacha20poly1305_ietf_keygen’:
Sodium.xs:940:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
unsigned char k* = sodium_malloc(crypto_aead_xchacha20poly1305_ietf_KEYBYTES);
^
Sodium.xs:940:26: error: expected expression before ‘=’ token
unsigned char k* = sodium_malloc(crypto_aead_xchacha20poly1305_ietf_KEYBYTES);
^
Sodium.xs:941:51: error: ‘k’ undeclared (first use in this function)
crypto_aead_xchacha20poly1305_ietf_keygen(k);
^
Sodium.xs:941:51: note: each undeclared identifier is reported only once for each function it appears in
Makefile:344: recipe for target 'Sodium.o' failed
make: *** [Sodium.o] Error 1
Originally requested by @udf2456 in #6 ...
https://download.libsodium.org/doc/public-key_cryptography/authenticated_encryption.html
Originally requested by @udf2456 in #6 .
Originally requested by @udf2456 in #6 .
https://download.libsodium.org/doc/secret-key_cryptography/aes-256-gcm.html
Originally requested by @udf2456 in #6 .
https://download.libsodium.org/doc/secret-key_cryptography/xchacha20-poly1305_construction.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.