aboutsummaryrefslogtreecommitdiff
path: root/src/core/crypto
AgeCommit message (Collapse)Author
2020-07-02Extract extend_info manipulation functions into a new file.Nick Mathewson
2020-02-11Make n_subcredentials a size_t .George Kadianakis
Based on David's review.
2020-01-21Define a variant of hs_ntor that takes multiple subcredentials.Nick Mathewson
2020-01-21Turn hs_subcredential_t into a proper struct.Nick Mathewson
2020-01-13Split core/include.am into per-subdirectory include.am filesNick Mathewson
Closes ticket 32137.
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09hs_circuit: use struct declaration.Nick Mathewson
This frees us from a dependency on include order.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04directory-level doxygen for "src/core"Nick Mathewson
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-26doxygen: add @file declarations for src/core/cryptoNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-08-05Teach include-checker about advisory rulesNick Mathewson
A .may_includes file can be "advisory", which means that some violations of the rules are expected. We will track these violations with practracker, not as automatic errors.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-22sendme: Properly record SENDMEs on both edgesDavid Goulet
Turns out that we were only recording the "b_digest" but to have bidirectionnal authenticated SENDMEs, we need to use the "f_digest" in the forward cell situation. Because of the cpath refactoring, this commit plays with the crypt_path_ and relay_crypto_t API a little bit in order to respect the abstractions. Previously, we would record the cell digest as the SENDME digest in the decrypt cell function but to avoid code duplication (both directions needs to record), we now do that right after iff the cell is recognized (at the edge). It is now done in circuit_receive_relay_cell() instead. We now also record the cell digest as the SENDME digest in both relay cell encryption functions since they are split depending on the direction. relay_encrypt_cell_outbound() and relay_encrypt_cell_inbound() need to consider recording the cell digest depending on their direction (f vs b digest). Fixes #30428 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-03Hiding crypt_path_t: Hide 'crypto' usage in sendme.cGeorge Kadianakis
2019-05-03Hiding crypt_path_t: Start with crypt_path.crypto .George Kadianakis
Create some functions to eventually be able to hide crypt_path_t.crypto.
2019-04-29sendme: Do not poke at crypto.sendme_digest directlyDavid Goulet
As per review from nickm, keep as much as we can the relay_crypto_t object opaque. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29sendme: Better function namesDavid Goulet
From nickm's review, improve the names of some functions. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29sendme: Move note_cell_digest() to relay_crypto moduleDavid Goulet
Because this function is poking within the relay_crypto_t object, move the function to the module so we can keep it opaque as much as possible. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29sendme: Keep cell digest only if a SENDME is nextDavid Goulet
This way, we reduce the load by only hashing when we absolutely must. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29prop289: Keep the digest bytes, not the objectDavid Goulet
The digest object is as large as the entire internal digest object's state, which is often much larger than the actual set of bytes you're transmitting. This commit makes it that we keep the digest itself which is 20 bytes. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29prop289: Remember the last cell digest for v1 SENDMEsDavid Goulet
In order to do so, depending on where the cell is going, we'll keep the last cell digest that is either received inbound or sent outbound. Then it can be used for validation. Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-01-17Use crypto_xof() in hs_ntor.c.Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-21Move the non-crypto parts of onion.c out of src/core/cryptoNick Mathewson
The parts for handling cell formats should be in src/core/or. The parts for handling onionskin queues should be in src/core/or. Only the crypto wrapper belongs in src/core/crypto.
2018-07-11Rename crypto.c to crypto_cipher.c (since that's all it still has.)Nick Mathewson
2018-07-10Rename torlog.[ch] to log.[ch]Nick Mathewson
Fun fact: these files used to be called log.[ch] until we ran into conflicts with systems having a log.h file. But now that we always include "lib/log/log.h", we should be fine.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.