]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sat, 13 Jun 2020 00:28:07 +0000 (18:28 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoremove vestigial prolog/ directory (#444)
Mark Thom [Sat, 13 Jun 2020 00:26:38 +0000 (18:26 -0600)]
remove vestigial prolog/ directory (#444)

6 years agoMerge pull request #587 from triska/lazy_pio
Mark Thom [Fri, 12 Jun 2020 14:24:52 +0000 (11:24 -0300)]
Merge pull request #587 from triska/lazy_pio

ENHANCED: phrase_from_file/[2,3] now read the file lazily.

6 years agoadd missing ! in int_pow (#580)
Mark Thom [Fri, 12 Jun 2020 04:28:05 +0000 (22:28 -0600)]
add missing ! in int_pow (#580)

6 years agoadjust the tail created by CreatePartialString to point to the last cell it pushed...
Mark Thom [Fri, 12 Jun 2020 03:25:20 +0000 (21:25 -0600)]
adjust the tail created by CreatePartialString to point to the last cell it pushed to the heap (#586)

6 years agocredit Ulrich Neumerkel for partial strings in README
Mark Thom [Fri, 12 Jun 2020 03:24:20 +0000 (21:24 -0600)]
credit Ulrich Neumerkel for partial strings in README

6 years agoinclude library(pio) and library(charsio) in the itemization
Markus Triska [Thu, 11 Jun 2020 14:44:23 +0000 (16:44 +0200)]
include library(pio) and library(charsio) in the itemization

6 years agoENHANCED: phrase_from_file/[2,3] now read the file lazily.
Markus Triska [Thu, 11 Jun 2020 13:29:06 +0000 (15:29 +0200)]
ENHANCED: phrase_from_file/[2,3] now read the file lazily.

This allows processing extremely large files. In addition, the
efficient string representation helps to reduce memory usage.

These features unleash the full power of Prolog for text processing,
the exact use case Prolog was designed for.

6 years agoremove most cuts from bimetatrans_ruleml.pl
Mark Thom [Thu, 11 Jun 2020 18:22:35 +0000 (12:22 -0600)]
remove most cuts from bimetatrans_ruleml.pl

6 years agofix printing of atoms like '.x' (#585)
Mark Thom [Thu, 11 Jun 2020 17:11:04 +0000 (11:11 -0600)]
fix printing of atoms like '.x' (#585)

6 years agoeliminate unnecessary find_min_time_ predicate in least_time.pl example
Mark Thom [Thu, 11 Jun 2020 04:25:23 +0000 (22:25 -0600)]
eliminate unnecessary find_min_time_ predicate in least_time.pl example

6 years agoMerge pull request #582 from triska/format_time
Mark Thom [Wed, 10 Jun 2020 23:21:44 +0000 (20:21 -0300)]
Merge pull request #582 from triska/format_time

ADDED: format_time//2 for describing strings involving dates and times

6 years agoADDED: format_time//2 for describing strings involving dates and times
Markus Triska [Wed, 10 Jun 2020 21:13:14 +0000 (23:13 +0200)]
ADDED: format_time//2 for describing strings involving dates and times

current_time/1 yields the current system time as an opaque time stamp.

6 years agoscryer and prolog_parser version bump (#581)
Mark Thom [Wed, 10 Jun 2020 20:29:13 +0000 (14:29 -0600)]
scryer and prolog_parser version bump (#581)

6 years agoprolog_parser version bump, scryer version bump
Mark Thom [Wed, 10 Jun 2020 04:15:11 +0000 (22:15 -0600)]
prolog_parser version bump, scryer version bump

6 years agoMerge pull request #579 from triska/master
Mark Thom [Tue, 9 Jun 2020 21:56:29 +0000 (18:56 -0300)]
Merge pull request #579 from triska/master

ENHANCED: throw Prolog exception on expired certificates

6 years agoENHANCED: throw Prolog exception on expired certificates
Markus Triska [Tue, 9 Jun 2020 21:01:28 +0000 (23:01 +0200)]
ENHANCED: throw Prolog exception on expired certificates

Example:

    ?- socket_client_open('expired.badssl.com':443, S, [tls(true)]).
    caught: error(permission_error(open,source_sink,'expired.badssl.com'),socket_client_open/3)

6 years agoMerge pull request #577 from triska/tls
Mark Thom [Tue, 9 Jun 2020 13:56:17 +0000 (10:56 -0300)]
Merge pull request #577 from triska/tls

ADDED: Encrypted client connections in library(sockets) via new option tls/1.

6 years agoADDED: Encrypted client connections in library(sockets) via new option tls/1.
Markus Triska [Sun, 7 Jun 2020 16:12:29 +0000 (18:12 +0200)]
ADDED: Encrypted client connections in library(sockets) via new option tls/1.

Use tls(true) to negotiate an encrypted network connection via TLS.

6 years agoADDED: type checks for type boolean
Markus Triska [Sun, 7 Jun 2020 17:24:51 +0000 (19:24 +0200)]
ADDED: type checks for type boolean

6 years agoMerge pull request #578 from triska/format_improvements
Mark Thom [Sun, 7 Jun 2020 22:36:16 +0000 (19:36 -0300)]
Merge pull request #578 from triska/format_improvements

Various improvements for format_//2

6 years agoMerge pull request #576 from triska/crypto_curve_scalar_mult
Mark Thom [Sun, 7 Jun 2020 22:34:12 +0000 (19:34 -0300)]
Merge pull request #576 from triska/crypto_curve_scalar_mult

ENHANCED: Faster Rust-based crypto_curve_scalar_mult/4 using OpenSSL.

6 years agotype check for ~d and ~D specifiers
Markus Triska [Sun, 7 Jun 2020 22:07:24 +0000 (00:07 +0200)]
type check for ~d and ~D specifiers

6 years agoENHANCED: format_//2 now evaluates arithmetic expressions for ~d, ~D, ~f, ~r and ~R
Markus Triska [Sun, 7 Jun 2020 21:14:23 +0000 (23:14 +0200)]
ENHANCED: format_//2 now evaluates arithmetic expressions for ~d, ~D, ~f, ~r and ~R

Example:

    ?- phrase(format_("~d", [1+2]), Cs).
       Cs = "3"
    ;  false.

6 years agobetter domain error in format_//2
Markus Triska [Sun, 7 Jun 2020 21:04:42 +0000 (23:04 +0200)]
better domain error in format_//2

Example:

    ?- format("", [hello]).
    caught: error(domain_error(empty_list,[hello]),format_//2)

6 years agoadd type check for scalar argument in crypto_curve_scalar_mult/4
Markus Triska [Sun, 7 Jun 2020 16:50:36 +0000 (18:50 +0200)]
add type check for scalar argument in crypto_curve_scalar_mult/4

Suggested by @notoria in #576. Many thanks!

6 years agouse secp256k1 in the example
Markus Triska [Sun, 7 Jun 2020 09:02:18 +0000 (11:02 +0200)]
use secp256k1 in the example

6 years agoENHANCED: Faster Rust-based crypto_curve_scalar_mult/4 using OpenSSL.
Markus Triska [Sun, 7 Jun 2020 08:58:40 +0000 (10:58 +0200)]
ENHANCED: Faster Rust-based crypto_curve_scalar_mult/4 using OpenSSL.

6 years agos/prolog-implementation/prolog-system (cargo does not allow keywords to exceed 20...
Mark Thom [Fri, 5 Jun 2020 05:29:48 +0000 (23:29 -0600)]
s/prolog-implementation/prolog-system (cargo does not allow keywords to exceed 20 characters)

6 years agobump version number
Mark Thom [Fri, 5 Jun 2020 05:25:21 +0000 (23:25 -0600)]
bump version number

6 years agoupdate prolog_parser version, correct atom_chars/2 (#379)
Mark Thom [Fri, 5 Jun 2020 05:23:49 +0000 (23:23 -0600)]
update prolog_parser version, correct atom_chars/2 (#379)

6 years agoremove double_quotes checks from unnecessary places in system_calls.rs and elsewhere...
Mark Thom [Fri, 5 Jun 2020 03:03:16 +0000 (21:03 -0600)]
remove double_quotes checks from unnecessary places in system_calls.rs and elsewhere (#513, #542)

6 years agoremove unreachable branch in increment_s_ptr (#575)
Mark Thom [Thu, 4 Jun 2020 04:05:46 +0000 (22:05 -0600)]
remove unreachable branch in increment_s_ptr (#575)

6 years agocorrect unexpected bad variables while ensuring better names are generated in order...
Mark Thom [Sat, 30 May 2020 06:17:34 +0000 (00:17 -0600)]
correct unexpected bad variables while ensuring better names are generated in order (#571)

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Wed, 27 May 2020 17:11:37 +0000 (11:11 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoorder generation of variable names in attributed goals after toplevel variables ...
Mark Thom [Wed, 27 May 2020 17:11:26 +0000 (11:11 -0600)]
order generation of variable names in attributed goals after toplevel variables (#465)

6 years agoplug missing variables in equations (#488), exclude/3 regression (#452), incorrect...
Mark Thom [Wed, 27 May 2020 05:46:09 +0000 (23:46 -0600)]
plug missing variables in equations (#488), exclude/3 regression (#452), incorrect answer substitution (#326)

6 years agoMerge pull request #568 from triska/logo
Mark Thom [Wed, 27 May 2020 03:19:41 +0000 (00:19 -0300)]
Merge pull request #568 from triska/logo

How about an actual raven for a logo?

6 years agoADDED: Logo.
Markus Triska [Tue, 26 May 2020 17:23:33 +0000 (19:23 +0200)]
ADDED: Logo.

Motivation and considerations:

- A Scryer certainly needs a raven. Ravens are among the most
  intelligent animals on earth.
- When writing Prolog programs, a few strokes are often enough.
- Purple is the colour most associated with magic and royalty,
  indicating the almost surreal and pure features provided by Scryer,
  in the lineage of Marseille Prolog.
- The shape of the silhouette looks a bit like an "S" for "Scryer".
- A square which surrounds the image is traditionally associated with
  finishing a proof (square, Latin "quadratum", has the same starting
  letters as "quod erat demonstrandum").

I call this raven: *Cryer*. Cryer is an archaic spelling for "crier",
an officer who makes public announcements in a court of justice.
The Prolog top-level likewise makes announcements about what is true.

6 years agoMerge pull request #524 from matt2xu/decode_utf8
Mark Thom [Tue, 26 May 2020 16:42:42 +0000 (13:42 -0300)]
Merge pull request #524 from matt2xu/decode_utf8

Add decoding of UTF-8 sequences

6 years agoMerge pull request #563 from triska/master
Mark Thom [Sat, 23 May 2020 19:02:05 +0000 (16:02 -0300)]
Merge pull request #563 from triska/master

ADDED: halt/1, halting with specified exit code

6 years agothrow evaluable type error for unrecognized atoms in arith_eval_by_metacall
Mark Thom [Sat, 23 May 2020 19:33:05 +0000 (13:33 -0600)]
throw evaluable type error for unrecognized atoms in arith_eval_by_metacall

6 years agoAdd type errors where appropriate in arith_eval_by_metacall (#392)
Mark Thom [Sat, 23 May 2020 19:07:40 +0000 (13:07 -0600)]
Add type errors where appropriate in arith_eval_by_metacall (#392)

6 years agothrow type_error(number, E) in arith_eval_by_metacall (#392)
Mark Thom [Sat, 23 May 2020 18:39:29 +0000 (12:39 -0600)]
throw type_error(number, E) in arith_eval_by_metacall (#392)

6 years ago(**)/2 should always evaluate to floating point (#558)
Mark Thom [Sat, 23 May 2020 18:24:00 +0000 (12:24 -0600)]
(**)/2 should always evaluate to floating point (#558)

6 years agoupdate (^)/2 in light of Draft Technical Corrigendum 3 (#559)
Mark Thom [Sat, 23 May 2020 18:12:34 +0000 (12:12 -0600)]
update (^)/2 in light of Draft Technical Corrigendum 3 (#559)

6 years agoADDED: halt/1, halting with specified exit code
Markus Triska [Sat, 23 May 2020 17:14:29 +0000 (19:14 +0200)]
ADDED: halt/1, halting with specified exit code

6 years agoaddress arity discrepancies in builtins.n and call/N (#525) v0.8.123
Mark Thom [Sat, 23 May 2020 05:57:32 +0000 (23:57 -0600)]
address arity discrepancies in builtins.n and call/N (#525)

6 years agoMerge pull request #560 from notoria/cargo
Mark Thom [Sat, 23 May 2020 02:43:06 +0000 (23:43 -0300)]
Merge pull request #560 from notoria/cargo

Added some informations in Cargo.toml

6 years agoMerge pull request #557 from mthom/docker
Mark Thom [Sat, 23 May 2020 02:42:55 +0000 (23:42 -0300)]
Merge pull request #557 from mthom/docker

Merge Master with Docker branch

6 years agoAdded some informations in Cargo.toml
notoria [Fri, 22 May 2020 23:55:53 +0000 (01:55 +0200)]
Added some informations in Cargo.toml

6 years agouse -1 as eof_code for binary streams (#555)
Mark Thom [Fri, 22 May 2020 21:58:07 +0000 (15:58 -0600)]
use -1 as eof_code for binary streams (#555)

6 years agoMerge pull request #556 from panasenco/docker docker origin/docker
Mark Thom [Fri, 22 May 2020 21:54:10 +0000 (18:54 -0300)]
Merge pull request #556 from panasenco/docker

Valid Dockerfile and README

6 years agoImplementation of UTF-8 bytes to chars
Matthieu Wipliez [Sun, 17 May 2020 21:37:41 +0000 (23:37 +0200)]
Implementation of UTF-8 bytes to chars

6 years agoPhrasing
panasenco [Fri, 22 May 2020 21:01:10 +0000 (14:01 -0700)]
Phrasing

6 years agoFixed link in Dockerfile documentation. Updated README with working Docker link....
panasenco [Fri, 22 May 2020 20:57:10 +0000 (13:57 -0700)]
Fixed link in Dockerfile documentation. Updated README with working Docker link. Made general improvements to the Docker section of the README now that I'm not in a sleep-deprived zombie state.

6 years agoRevert "Revert "Created and Tested Dockerfile""
panasenco [Fri, 22 May 2020 20:35:14 +0000 (13:35 -0700)]
Revert "Revert "Created and Tested Dockerfile""

This reverts commit e00d864199549c179a4403fba910b234646cdba5.

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Fri, 22 May 2020 20:50:51 +0000 (14:50 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agocorrect get_byte/1 not emitted -1 upon discovery of end_of_stream position (#555)
Mark Thom [Fri, 22 May 2020 20:50:40 +0000 (14:50 -0600)]
correct get_byte/1 not emitted -1 upon discovery of end_of_stream position (#555)

6 years agoMerge pull request #552 from mthom/master
Mark Thom [Fri, 22 May 2020 19:04:03 +0000 (16:04 -0300)]
Merge pull request #552 from mthom/master

Scryer Dockerfile

6 years agoMerge pull request #554 from triska/format3
Mark Thom [Fri, 22 May 2020 17:32:44 +0000 (14:32 -0300)]
Merge pull request #554 from triska/format3

ADDED: format/3, writing formatted output to a stream

6 years agoENHANCED: Faster format/3 for binary streams.
Markus Triska [Fri, 22 May 2020 15:30:29 +0000 (17:30 +0200)]
ENHANCED: Faster format/3 for binary streams.

This speeds up web servers considerably when sending binary files.

6 years agoADDED: format/3, writing formatted output to a stream
Markus Triska [Fri, 22 May 2020 15:21:50 +0000 (17:21 +0200)]
ADDED: format/3, writing formatted output to a stream

Both binary and text streams are supported.

6 years agomodify int_pow so that a power of -1 is valid (#548)
Mark Thom [Fri, 22 May 2020 04:33:22 +0000 (22:33 -0600)]
modify int_pow so that a power of -1 is valid (#548)

6 years agoMerge pull request #545 from triska/ed25519
Mark Thom [Thu, 21 May 2020 14:30:47 +0000 (11:30 -0300)]
Merge pull request #545 from triska/ed25519

ADDED: Public key signatures and signature verification with Ed25519

6 years agodocument that lists of integers can be specified if encoding(octet) is used
Markus Triska [Thu, 21 May 2020 11:41:57 +0000 (13:41 +0200)]
document that lists of integers can be specified if encoding(octet) is used

This seems to be a good compromise: The API now strongly encourages
lists of characters, which are ideally suited to represent text, and
also allows lists of bytes if the encoding(octet) option is used.

6 years agocorrect mode indication for ed25519_verify/4
Markus Triska [Wed, 20 May 2020 23:27:06 +0000 (01:27 +0200)]
correct mode indication for ed25519_verify/4

Noted by @notoria in #545. Many thanks!

6 years ago"PrivateKey" --> "KeyPair"
Markus Triska [Wed, 20 May 2020 22:14:15 +0000 (00:14 +0200)]
"PrivateKey" --> "KeyPair"

6 years agoremove several mentions of list of bytes in predicate descriptions
Markus Triska [Wed, 20 May 2020 22:07:28 +0000 (00:07 +0200)]
remove several mentions of list of bytes in predicate descriptions

This is to focus more on the intended core representation of text: In
Prolog, text is ideally represented as a list of characters, and this
is what we want to encourage, especially given Scryer's compact
representation for strings.

For the time being, library(crypto) still also supports lists of bytes in
several predicates. This will likely be removed at some point in the
future. Please use lists of characters to make your code future-proof.

6 years agorequire PKCS#8 v2 format for better security
Markus Triska [Wed, 20 May 2020 21:51:31 +0000 (23:51 +0200)]
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.

6 years agoADDED: ed25519_keypair_public_key/2, relating a key pair to its public key
Markus Triska [Wed, 20 May 2020 21:32:46 +0000 (23:32 +0200)]
ADDED: ed25519_keypair_public_key/2, relating a key pair to its public key

6 years agoclarify format of public key
Markus Triska [Wed, 20 May 2020 21:17:42 +0000 (23:17 +0200)]
clarify format of public key

6 years agoADDED: ed25519_new_keypair/1 to dynamically create a new Ed25519 key pair
Markus Triska [Wed, 20 May 2020 21:06:09 +0000 (23:06 +0200)]
ADDED: ed25519_new_keypair/1 to dynamically create a new Ed25519 key pair

6 years agouse LessSafeKey to simplify the implementation of authenticated encryption
Markus Triska [Wed, 20 May 2020 18:13:07 +0000 (20:13 +0200)]
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.

6 years ago"codes" --> "bytes"
Markus Triska [Wed, 20 May 2020 18:10:26 +0000 (20:10 +0200)]
"codes" --> "bytes"

Support for lists of bytes may be dropped from library(crypto). Use
lists of characters to make your code future-proof. Lists of
characters will always be supported due to their compactness,
and because Prolog applications should move towards characters.

6 years agoADDED: Public key signatures and signature verification with Ed25519
Markus Triska [Wed, 20 May 2020 16:30:34 +0000 (18:30 +0200)]
ADDED: Public key signatures and signature verification with Ed25519

6 years agorevert printing of characters
Mark Thom [Tue, 19 May 2020 23:34:55 +0000 (17:34 -0600)]
revert printing of characters

6 years agoMerge pull request #537 from triska/master
Mark Thom [Tue, 19 May 2020 18:16:38 +0000 (15:16 -0300)]
Merge pull request #537 from triska/master

import member/2 from library(lists)

6 years agoimport member/2 from library(lists)
Markus Triska [Tue, 19 May 2020 18:10:45 +0000 (20:10 +0200)]
import member/2 from library(lists)

6 years agoMerge pull request #536 from mthom/revert-517-docker
Mark Thom [Tue, 19 May 2020 18:00:29 +0000 (15:00 -0300)]
Merge pull request #536 from mthom/revert-517-docker

Revert "Created and Tested Dockerfile"

6 years agoRevert "Created and Tested Dockerfile" revert-517-docker origin/revert-517-docker
Mark Thom [Tue, 19 May 2020 17:59:06 +0000 (11:59 -0600)]
Revert "Created and Tested Dockerfile"

6 years agoMerge pull request #533 from triska/master
Mark Thom [Tue, 19 May 2020 17:23:12 +0000 (14:23 -0300)]
Merge pull request #533 from triska/master

ADDED: Support for SHA-3 algorithms in crypto_data_hash/3

6 years agoMerge pull request #534 from triska/phrase_from_file_3
Mark Thom [Tue, 19 May 2020 17:22:59 +0000 (14:22 -0300)]
Merge pull request #534 from triska/phrase_from_file_3

ADDED: phrase_from_file/3 in library(pio)

6 years agoADDED: phrase_from_file/3 in library(pio)
Markus Triska [Tue, 19 May 2020 16:44:28 +0000 (18:44 +0200)]
ADDED: phrase_from_file/3 in library(pio)

This allows us to specify type(binary), and read from binary files
with DCGs.

6 years agobetter error handling in crypto_data_hkdf/4
Markus Triska [Tue, 19 May 2020 16:21:07 +0000 (18:21 +0200)]
better error handling in crypto_data_hkdf/4

Noted by @notoria in #533. Many thanks!

6 years agocrypto_data_hkdf/4: do not crash for length > usize::max_value()
Markus Triska [Tue, 19 May 2020 15:31:36 +0000 (17:31 +0200)]
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!

6 years agouse more fixnums in cryptographic routines
Markus Triska [Tue, 19 May 2020 15:02:15 +0000 (17:02 +0200)]
use more fixnums in cryptographic routines

6 years agocorrect option processing in crypto_data_decrypt/6
Markus Triska [Tue, 19 May 2020 14:56:34 +0000 (16:56 +0200)]
correct option processing in crypto_data_decrypt/6

6 years agouse Fixnums for bytes in hashing.
Markus Triska [Tue, 19 May 2020 14:43:44 +0000 (16:43 +0200)]
use Fixnums for bytes in hashing.

Suggested by @notoria in #533. Many thanks!

6 years agouse matching to select the hashing algorithm
Markus Triska [Tue, 19 May 2020 14:36:06 +0000 (16:36 +0200)]
use matching to select the hashing algorithm

Suggested by @notoria in #533. Many thanks!

6 years agoMerge pull request #517 from panasenco/docker
Mark Thom [Tue, 19 May 2020 14:30:08 +0000 (11:30 -0300)]
Merge pull request #517 from panasenco/docker

Created and Tested Dockerfile

6 years agocorrect fixnum overflow on negation (#528)
Mark Thom [Tue, 19 May 2020 16:45:54 +0000 (10:45 -0600)]
correct fixnum overflow on negation (#528)

6 years agoADDED: Support for BLAKE2 algorithms in crypto_data_hash/3.
Markus Triska [Tue, 19 May 2020 10:22:49 +0000 (12:22 +0200)]
ADDED: Support for BLAKE2 algorithms in crypto_data_hash/3.

6 years agoADDED: Support for SHA-3 algorithms in crypto_data_hash/3
Markus Triska [Tue, 19 May 2020 08:50:33 +0000 (10:50 +0200)]
ADDED: Support for SHA-3 algorithms in crypto_data_hash/3

6 years agoaccomodate \0\ in partial strings, print null as \0\ (#267, #526), update prolog...
Mark Thom [Tue, 19 May 2020 05:45:21 +0000 (23:45 -0600)]
accomodate \0\ in partial strings, print null as \0\ (#267, #526), update prolog parser, version bump

6 years agoadd Addr::Lis as case in PartialStringTail (#530)
Mark Thom [Mon, 18 May 2020 18:27:26 +0000 (12:27 -0600)]
add Addr::Lis as case in PartialStringTail (#530)

6 years agoMerge pull request #527 from triska/master
Mark Thom [Mon, 18 May 2020 14:18:58 +0000 (11:18 -0300)]
Merge pull request #527 from triska/master

Add type checks to increase robustness of library(crypto)

6 years agofix partial_string_tail panic (#530)
Mark Thom [Mon, 18 May 2020 17:14:27 +0000 (11:14 -0600)]
fix partial_string_tail panic (#530)

6 years agostronger validation of input lists for cryptographic routines
Markus Triska [Mon, 18 May 2020 11:28:52 +0000 (13:28 +0200)]
stronger validation of input lists for cryptographic routines

Example:

    ?- crypto_data_hkdf(Var, 32, Bs, []).
    caught: error(instantiation_error,must_be/2)

Reported by @notoria in #527. Many thanks!

6 years agocrypto_data_hkdf/4: Fail if the length is too long.
Markus Triska [Mon, 18 May 2020 11:21:20 +0000 (13:21 +0200)]
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!