]>
Repositorios git - scryer-prolog.git/log
Mark Thom [Sat, 23 May 2020 05:57:32 +0000 (23:57 -0600)]
address arity discrepancies in builtins.n and call/N (#525)
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
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
notoria [Fri, 22 May 2020 23:55:53 +0000 (01:55 +0200)]
Added some informations in Cargo.toml
Mark Thom [Fri, 22 May 2020 21:58:07 +0000 (15:58 -0600)]
use -1 as eof_code for binary streams (#555)
Mark Thom [Fri, 22 May 2020 21:54:10 +0000 (18:54 -0300)]
Merge pull request #556 from panasenco/docker
Valid Dockerfile and README
panasenco [Fri, 22 May 2020 21:01:10 +0000 (14:01 -0700)]
Phrasing
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.
panasenco [Fri, 22 May 2020 20:35:14 +0000 (13:35 -0700)]
Revert "Revert "Created and Tested Dockerfile""
This reverts commit
e00d864199549c179a4403fba910b234646cdba5 .
Mark Thom [Fri, 22 May 2020 20:50:51 +0000 (14:50 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
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)
Mark Thom [Fri, 22 May 2020 19:04:03 +0000 (16:04 -0300)]
Merge pull request #552 from mthom/master
Scryer Dockerfile
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
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.
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.
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)
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
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.
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!
Markus Triska [Wed, 20 May 2020 22:14:15 +0000 (00:14 +0200)]
"PrivateKey" --> "KeyPair"
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.
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.
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
Markus Triska [Wed, 20 May 2020 21:17:42 +0000 (23:17 +0200)]
clarify format of public key
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
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.
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.
Markus Triska [Wed, 20 May 2020 16:30:34 +0000 (18:30 +0200)]
ADDED: Public key signatures and signature verification with
Ed25519
Mark Thom [Tue, 19 May 2020 23:34:55 +0000 (17:34 -0600)]
revert printing of characters
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)
Markus Triska [Tue, 19 May 2020 18:10:45 +0000 (20:10 +0200)]
import member/2 from library(lists)
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"
Mark Thom [Tue, 19 May 2020 17:59:06 +0000 (11:59 -0600)]
Revert "Created and Tested Dockerfile"
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
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)
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.
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!
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!
Markus Triska [Tue, 19 May 2020 15:02:15 +0000 (17:02 +0200)]
use more fixnums in cryptographic routines
Markus Triska [Tue, 19 May 2020 14:56:34 +0000 (16:56 +0200)]
correct option processing in crypto_data_decrypt/6
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!
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!
Mark Thom [Tue, 19 May 2020 14:30:08 +0000 (11:30 -0300)]
Merge pull request #517 from panasenco/docker
Created and Tested Dockerfile
Mark Thom [Tue, 19 May 2020 16:45:54 +0000 (10:45 -0600)]
correct fixnum overflow on negation (#528)
Markus Triska [Tue, 19 May 2020 10:22:49 +0000 (12:22 +0200)]
ADDED: Support for BLAKE2 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
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
Mark Thom [Mon, 18 May 2020 18:27:26 +0000 (12:27 -0600)]
add Addr::Lis as case in PartialStringTail (#530)
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)
Mark Thom [Mon, 18 May 2020 17:14:27 +0000 (11:14 -0600)]
fix partial_string_tail panic (#530)
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!
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!
Markus Triska [Mon, 18 May 2020 11:11:39 +0000 (13:11 +0200)]
crypto_password_hash/3: fail if the number of iterations is too high
Discussed in #527.
Markus Triska [Mon, 18 May 2020 09:29:35 +0000 (11:29 +0200)]
centralize reasoning about encoding
Markus Triska [Mon, 18 May 2020 09:21:38 +0000 (11:21 +0200)]
raise instantiation errors for variable encoding
Reported by notoria in #527.
Note that from a declarative perspective, it would indeed be valid to
give answers for both available encodings.
Markus Triska [Mon, 18 May 2020 09:12:59 +0000 (11:12 +0200)]
type check for length argument in crypto_data_hkdf/4
Reported by @notoria in #527.
Markus Triska [Mon, 18 May 2020 07:58:09 +0000 (09:58 +0200)]
throw instantiation error if the list of options contains a variable (#523)
Many thanks to @notoria for the test case!
panasenco [Mon, 18 May 2020 03:49:44 +0000 (20:49 -0700)]
Updated README with Docker install instructions
panasenco [Sun, 17 May 2020 04:04:45 +0000 (21:04 -0700)]
Managed to create a 77MB scryer-prolog Docker image
panasenco [Sat, 16 May 2020 23:30:47 +0000 (16:30 -0700)]
New Dockerfile based on Fredrik Park's blog post - compilation fails with linker error
panasenco [Sat, 16 May 2020 22:57:50 +0000 (15:57 -0700)]
Created initial working Docker deployment
Mark Thom [Sun, 17 May 2020 22:34:52 +0000 (16:34 -0600)]
fix atom_codes (#521)
Mark Thom [Sun, 17 May 2020 21:20:02 +0000 (15:20 -0600)]
add Cargo.lock
Mark Thom [Sun, 17 May 2020 21:19:27 +0000 (15:19 -0600)]
eliminate Addr::CharCode (#519), fix atom_code panic (#521), fix failure involving lists of character codes (#520), bump version number
Markus Triska [Sun, 17 May 2020 20:01:22 +0000 (22:01 +0200)]
type test for salt in crypto_password_hash/3
Mark Thom [Sun, 17 May 2020 18:20:22 +0000 (12:20 -0600)]
solve overflow of left arithmetic shift (#518)
Mark Thom [Sun, 17 May 2020 05:13:57 +0000 (23:13 -0600)]
update Cargo.lock
Mark Thom [Sun, 17 May 2020 05:12:43 +0000 (23:12 -0600)]
scryer version bump
Mark Thom [Sun, 17 May 2020 05:10:38 +0000 (23:10 -0600)]
propagate syntax errors from read_term when they're not UnexpectedEOF (#507)
Mark Thom [Sun, 17 May 2020 05:00:37 +0000 (23:00 -0600)]
fix sign error in shl on fixnum with n >= 63 (#499)
Mark Thom [Sun, 17 May 2020 02:22:17 +0000 (20:22 -0600)]
correct for second argument when (is)/2 is a tail call
Mark Thom [Sat, 16 May 2020 20:51:19 +0000 (14:51 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sat, 16 May 2020 20:51:04 +0000 (14:51 -0600)]
restore old clpz.pl
notoria [Sat, 16 May 2020 17:51:53 +0000 (19:51 +0200)]
Enhanced Travis-CI (#512)
Markus Triska [Sat, 16 May 2020 17:51:41 +0000 (19:51 +0200)]
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
Mark Thom [Sat, 16 May 2020 04:51:24 +0000 (22:51 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sat, 16 May 2020 04:51:18 +0000 (22:51 -0600)]
correct mishandled Addr::CharCode case in eq_test (#505)
Markus Triska [Fri, 15 May 2020 16:49:23 +0000 (18:49 +0200)]
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.
Matthieu Wipliez [Fri, 15 May 2020 16:05:04 +0000 (18:05 +0200)]
Work in progress: add char_utf8bytes (#493)
* Add char_utf8bytes to library
* Improved implementation
* Improve code + add chars predicate
* Update example
* Renamed string_utf8bytes to char_utf8bytes
Mark Thom [Fri, 15 May 2020 04:33:28 +0000 (22:33 -0600)]
fix existence_error in atom_chars/2, atom_codes/2 (#504, #506)
Mark Thom [Fri, 15 May 2020 04:25:50 +0000 (22:25 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Fri, 15 May 2020 04:25:39 +0000 (22:25 -0600)]
implement (div)/2 properly (#435)
Mark Thom [Thu, 14 May 2020 18:13:32 +0000 (15:13 -0300)]
Merge pull request #502 from triska/hkdf
ADDED: HMAC-based key derivation (HKDF) via crypto_data_hkdf/4
Markus Triska [Thu, 14 May 2020 18:07:59 +0000 (20:07 +0200)]
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.
Mark Thom [Wed, 13 May 2020 23:58:39 +0000 (20:58 -0300)]
Merge pull request #501 from triska/elliptic_curves
ADDED: Reasoning about elliptic curves in library(crypto).
Markus Triska [Wed, 13 May 2020 18:50:54 +0000 (20:50 +0200)]
ADDED: Reasoning about elliptic curves in library(crypto).
This is useful to establish shared secrets, using ECDH key exchange.
Note that CLP(ℤ) goal expansion is currently disabled due to #445,
and this slows down the computations considerably for the time being.
Mark Thom [Wed, 13 May 2020 20:39:24 +0000 (17:39 -0300)]
Merge pull request #500 from triska/master
ADDED: ripemd160 digest algorithm
Markus Triska [Wed, 13 May 2020 18:36:25 +0000 (20:36 +0200)]
ADDED: ripemd160 digest algorithm
This is used for example for Bitcoin address generation.
Mark Thom [Wed, 13 May 2020 20:32:46 +0000 (17:32 -0300)]
Merge pull request #496 from triska/master
ADDED: crypto_data_hash/3, computing cryptographically secure digests
Mark Thom [Wed, 13 May 2020 20:32:31 +0000 (17:32 -0300)]
Merge pull request #498 from notoria/between
Enhanced between/3
notoria [Wed, 13 May 2020 19:19:47 +0000 (21:19 +0200)]
Enhanced between/3
Markus Triska [Wed, 13 May 2020 17:13:20 +0000 (19:13 +0200)]
ADDED: crypto_data_hash/3, computing cryptographically secure digests
Mark Thom [Wed, 13 May 2020 02:36:21 +0000 (20:36 -0600)]
resolve warning messages (#495)
Mark Thom [Wed, 13 May 2020 02:28:42 +0000 (20:28 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Wed, 13 May 2020 02:28:39 +0000 (20:28 -0600)]
throw existence_error on failed put_byte write (#492)
Mark Thom [Wed, 13 May 2020 00:51:34 +0000 (18:51 -0600)]
do not unwrap stream write, TcpStream::shutdown results (#492)
Mark Thom [Wed, 13 May 2020 00:22:41 +0000 (18:22 -0600)]
return true on unmatching partial strings in eq_test to indicate failure (#491)
Mark Thom [Tue, 12 May 2020 22:44:07 +0000 (19:44 -0300)]
Merge pull request #494 from triska/master
ADDED: crypto_n_random_bytes/2, creating cryptographically secure random bytes
Markus Triska [Tue, 12 May 2020 22:22:17 +0000 (00:22 +0200)]
ADDED: crypto_n_random_bytes/2, creating cryptographically secure random bytes
The ring crate is used since it will be needed also for future
predicates in library(crypto).
Mark Thom [Mon, 11 May 2020 21:29:28 +0000 (15:29 -0600)]
reset current input in ReadQueryTerm