Markus Triska
7b30daf88d
ADDED: Encrypted client connections in library(sockets) via new option tls/1.
...
Use tls(true) to negotiate an encrypted network connection via TLS.
2020-06-09 07:43:29 +02:00
Markus Triska
b586618411
ENHANCED: Faster Rust-based crypto_curve_scalar_mult/4 using OpenSSL.
2020-06-07 11:04:24 +02:00
Mark Thom
72c5908f09
update prolog_parser version, correct atom_chars/2 ( #379 )
2020-06-04 23:23:49 -06:00
Mark Thom
2a588ff943
remove double_quotes checks from unnecessary places in system_calls.rs and elsewhere ( #513 , #542 )
2020-06-04 21:03:41 -06:00
Mark Thom
24f11b5ae9
remove unreachable branch in increment_s_ptr ( #575 )
2020-06-03 22:05:46 -06:00
Markus Triska
b0df981b01
ADDED: halt/1, halting with specified exit code
2020-05-23 19:28:17 +02:00
Mark Thom
15db77558c
throw evaluable type error for unrecognized atoms in arith_eval_by_metacall
2020-05-23 13:33:05 -06:00
Mark Thom
18cf4a3bd3
Add type errors where appropriate in arith_eval_by_metacall ( #392 )
2020-05-23 13:07:40 -06:00
Mark Thom
e0378acfc2
throw type_error(number, E) in arith_eval_by_metacall ( #392 )
2020-05-23 12:39:29 -06:00
Mark Thom
53cb2af202
(**)/2 should always evaluate to floating point ( #558 )
2020-05-23 12:24:00 -06:00
Mark Thom
f74005a166
update (^)/2 in light of Draft Technical Corrigendum 3 ( #559 )
2020-05-23 12:13:48 -06:00
Mark Thom
888d844ec5
address arity discrepancies in builtins.n and call/N ( #525 )
2020-05-22 23:57:32 -06:00
Mark Thom
0060c8988a
use -1 as eof_code for binary streams ( #555 )
2020-05-22 15:58:07 -06:00
Mark Thom
f9aad34d28
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-05-22 14:50:51 -06:00
Mark Thom
b2d720b853
correct get_byte/1 not emitted -1 upon discovery of end_of_stream position ( #555 )
2020-05-22 14:50:40 -06:00
Markus Triska
48c0b0ab3c
ENHANCED: Faster format/3 for binary streams.
...
This speeds up web servers considerably when sending binary files.
2020-05-22 17:30:29 +02:00
Mark Thom
9e9c3b6342
modify int_pow so that a power of -1 is valid ( #548 )
2020-05-21 22:33:22 -06:00
Markus Triska
b43f27030e
require PKCS#8 v2 format for better security
...
Notably, this format requires that the public key also be present.
This format is what ed25519_new_keypair/1 generates, and it is
strongly encouraged for higher security.
2020-05-20 23:55:21 +02:00
Markus Triska
2845f55157
ADDED: ed25519_keypair_public_key/2, relating a key pair to its public key
2020-05-20 23:43:28 +02:00
Markus Triska
0ef7b5488d
ADDED: ed25519_new_keypair/1 to dynamically create a new Ed25519 key pair
2020-05-20 23:11:56 +02:00
Markus Triska
56b04f8df8
use LessSafeKey to simplify the implementation of authenticated encryption
...
The nonce is explicitly specified, and the application programmer
must (and always had to) ensure that it is unique for a given key.
2020-05-20 22:32:39 +02:00
Markus Triska
ad3be5c848
ADDED: Public key signatures and signature verification with Ed25519
2020-05-20 22:32:39 +02:00
Mark Thom
ad6fc89a24
Merge pull request #533 from triska/master
...
ADDED: Support for SHA-3 algorithms in crypto_data_hash/3
2020-05-19 14:23:12 -03:00
Markus Triska
0bd9831eec
ADDED: phrase_from_file/3 in library(pio)
...
This allows us to specify type(binary), and read from binary files
with DCGs.
2020-05-19 18:52:18 +02:00
Markus Triska
d19d8ea770
crypto_data_hkdf/4: do not crash for length > usize::max_value()
...
For now, we fail silently in such cases.
Noted by @notoria in #533 . Many thanks!
2020-05-19 17:31:36 +02:00
Markus Triska
34f7752c0f
use more fixnums in cryptographic routines
2020-05-19 17:03:02 +02:00
Markus Triska
85155439be
use Fixnums for bytes in hashing.
...
Suggested by @notoria in #533 . Many thanks!
2020-05-19 16:43:44 +02:00
Markus Triska
dd32e69061
use matching to select the hashing algorithm
...
Suggested by @notoria in #533 . Many thanks!
2020-05-19 16:37:50 +02:00
Markus Triska
9f5322d309
ADDED: Support for BLAKE2 algorithms in crypto_data_hash/3.
2020-05-19 12:44:10 +02:00
Markus Triska
f5c2f6f9e9
ADDED: Support for SHA-3 algorithms in crypto_data_hash/3
2020-05-19 12:10:46 +02:00
Mark Thom
e0e3b180e7
accomodate \0\ in partial strings, print null as \0\ ( #267 , #526 ), update prolog parser, version bump
2020-05-18 23:45:34 -06:00
Mark Thom
041dc039d4
add Addr::Lis as case in PartialStringTail ( #530 )
2020-05-18 12:27:26 -06:00
Mark Thom
ac755b0ada
Merge pull request #527 from triska/master
...
Add type checks to increase robustness of library(crypto)
2020-05-18 11:18:58 -03:00
Mark Thom
c14259060c
fix partial_string_tail panic ( #530 )
2020-05-18 11:14:27 -06:00
Markus Triska
fd732550d8
crypto_data_hkdf/4: Fail if the length is too long.
...
Due to the way the counter is constructed in the HKDF specification,
the requested output length can be at most 255 times the size of the
digest algorithm's output.
Reported by @notoria in #527 . Many thanks!
2020-05-18 13:21:38 +02:00
Markus Triska
fac7ba70c8
crypto_password_hash/3: fail if the number of iterations is too high
...
Discussed in #527 .
2020-05-18 13:11:39 +02:00
Mark Thom
eecd809d9a
fix atom_codes ( #521 )
2020-05-17 16:34:52 -06:00
Mark Thom
5720b7b94c
eliminate Addr::CharCode ( #519 ), fix atom_code panic ( #521 ), fix failure involving lists of character codes ( #520 ), bump version number
2020-05-17 15:19:27 -06:00
Mark Thom
9f3351469d
solve overflow of left arithmetic shift ( #518 )
2020-05-17 12:20:22 -06:00
Mark Thom
b3cff6555f
propagate syntax errors from read_term when they're not UnexpectedEOF ( #507 )
2020-05-16 23:10:38 -06:00
Mark Thom
69706ecab0
fix sign error in shl on fixnum with n >= 63 ( #499 )
2020-05-16 23:00:37 -06:00
Mark Thom
05d3b97eae
correct for second argument when (is)/2 is a tail call
2020-05-16 20:22:17 -06:00
Markus Triska
862ae26631
Authenticated encryption in library(crypto), new encoding/1 option for hashes ( #515 )
...
* shorten n_newlines//1
* remove unneeded variable
* ADDED: authenticated encryption and decryption with ChaCha20-Poly1305
* ADDED: encoding/1 option for crypto_data_hash/3 and crypto_data_hkdf/4
2020-05-16 11:51:41 -06:00
Mark Thom
9e0208ec71
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-05-15 22:51:24 -06:00
Mark Thom
510530973c
correct mishandled Addr::CharCode case in eq_test ( #505 )
2020-05-15 22:51:18 -06:00
Markus Triska
4e69301562
ADDED: Password-based key derivation (PBKDF2) ( #509 )
...
The new predicates crypto_password_hash/[2,3] let you store
passwords safely, and easily verify passwords later.
2020-05-15 10:49:23 -06:00
Mark Thom
fffa503968
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-05-14 22:25:50 -06:00
Mark Thom
8754157810
implement (div)/2 properly ( #435 )
2020-05-14 22:25:39 -06:00
Markus Triska
50776748a7
ADDED: HMAC-based key derivation (HKDF) via crypto_data_hkdf/4
...
This is useful to generate keys and initialization vectors
from suitable input keying material, so that future predicates
for symmetric encryption can be used with appropriate parameters.
2020-05-14 20:07:59 +02:00
Markus Triska
fd761735d4
ADDED: ripemd160 digest algorithm
...
This is used for example for Bitcoin address generation.
2020-05-13 22:36:40 +02:00