Stream functions in separate files #453
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt!453
Loading…
Reference in a new issue
No description provided.
Delete branch "streams-functions_in_separate_files"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some stream ciphers had multiple functions in a file. This PR breaks each callable function out into separate files. Common declarations and some definitions unique to that cipher will be found in a separate local .h file for that cipher. Some guards were added to avoid warnings. Leading underscores were added to the names of sober128's helper functions.
Checklist
I suggest just keeping separate NN_memory, NN_test, NN_keystream and perhaps NN_done like:
plus perhaps also get rid of
sober128tab.cAfter careful consideration I'm leaning toward each callable function in its own file for reasons of consistency. IMO there is not sufficient advantage to combining some functions, each cipher differently, when some optional and sometine required functions need to be called out for linking individually. For example, the inconsistent model for...
streams combining _setup(), setiv(), and _crypt(): rabbit, sober128, sosemanuk
streams combining _setup(),and _crypt(): rc4
streams combining none: chacha, (x)salsa20
...requires calling out what you need that wasn't combined. Confusing.
Implementing the PR as written makes the decision rule consistent, "if you call it, link it".
I see your point but to me this is "over-consistent" for no (or very little) gain.
Anyway, I am strongly against introducing new headers -
<something>_common.h. I suggest either to merge those.cfiles sharing the same<something>_common.hheader (which I prefer) or perhaps to usetomcrypt_private.h(but I somehow feel that @sjaeckel might not like it as it may not comply with the originaltomcrypt_private.hidea).View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.