diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-03-05 07:01:54 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-03-05 07:01:54 -0800 |
commit | 0fae008e5d1567588aa5bc85957945c82fcb3498 (patch) | |
tree | 38c55d62c26dfd948c3b7e34ba53125d395e89e3 | |
parent | a470788a316546c4e9fbc5454c97db8d53cd30ac (diff) | |
download | txr-0fae008e5d1567588aa5bc85957945c82fcb3498.tar.gz txr-0fae008e5d1567588aa5bc85957945c82fcb3498.tar.bz2 txr-0fae008e5d1567588aa5bc85957945c82fcb3498.zip |
doc: justify lack of seed keyword in hash construction.
* txr.1: The hash function doesn't support a keyword
like :seed <n> to specify the hash seed. Adding an explanation
of why. Spoiler: security reason.
-rw-r--r-- | txr.1 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -40971,6 +40971,14 @@ specifies the user data for the hash table, which can be retrieved using the .code hash-userdata function. +Note: there doesn't exist a keyword for specifying the seed. +This omission is deliberate. These hash construction keywords may appear in the +hash literal +.code #H +syntax. A seed keyword would allow literals to specify their own seed, which +would allow malicious hash literals to be crafted that perpetrate a hash +collision attack against the parser. + .coNP Functions @, hash-construct @ hash-from-pairs and @ hash-from-alist .synb .mets (hash-construct < hash-args << key-val-pairs ) |