%% Copyright (c) 2025 The Tor Project, inc. All rights reserved.
%% Use of this source code is governed by a BSD-style
%% license that can be found in the LICENSE file.

\begin{frame}{Development Process}

Development work takes place via IRC/Matrix on various public channels on the
OFTC IRC network.

All development happens in our self-hosted Gitlab instance at
\href{https://gitlab.torproject.org}{gitlab.torproject.org}.

Anonymous ticket interaction is available via
\href{https://anonticket.torproject.org/}{anonticket.torproject.org}.

Effective collaboration tooling, such as audio/video meetings, was adopted
during the 2020-2022 period.

\end{frame}

\begin{frame}{Protocol Specification Process}

We have our own process for handling protocol changes over time. Work begins as
a proposal and ends as part of a specification.

Specification work largely happens in
\href{https://gitlab.torproject.org/tpo/core/torspec}{gitlab.torproject.org/tpo/core/torspec}.

Protocol specifications can be found on
\href{https://spec.torproject.org/}{spec.torproject.org}, but discussions often
take place on the tor-dev mailing list.

We heavily depend upon feedback from both community and the greater Tor
research community.

\end{frame}

\begin{frame}{Reproducible Builds}
\phantomsection\label{reproducible-builds}
\vspace*{0.9cm}
\centering
\tikzset{external/export next=false}
\begin{tikzpicture}[overlay,scale=1.32]
    %% Clip everything that is outside of our "viewport"
    \clip (-7, -3) rectangle (7, 3);

    \node[] (source) at (-2.5, 1) {
        \Large Source
    };

    \node[] (binary) at (2.5, 1) {
        \Large Binary
    };

    %% Arrow.
    \draw[OONIBlue, ultra thick, ->] (source) -- (binary) node[pos=0.5, below, black] {Build Step};

    %% Helper lines for debugging.
    % \node[] at (0.0, 0.0) {X};
    % \draw[help lines] (-7, -3) grid (7, 3);
\end{tikzpicture}
\end{frame}

\begin{frame}{Reproducible Builds}
\phantomsection\label{reproducible-builds-3}
\vspace*{0.9cm}
\centering
\tikzset{external/export next=false}
\begin{tikzpicture}[overlay,scale=1.32]
    %% Clip everything that is outside of our "viewport"
    \clip (-7, -3) rectangle (7, 3);

    \node[] (source) at (-2.5, 1) {
        \Large Source
    };

    \node[] (binary) at (2.5, 1) {
        \Large Binary
    };

    \node[text=OnionDarkGray] (verifiable) at (-4.0, -1) {
        Verifiable
    };

    \node[text=OnionDarkGray] (usable) at (4.0, -1) {
        Usable
    };

    \node[text=OnionPurple] (question) at (0, -1) {
       \Huge ?
    };

    %% Arrow.
    \draw[OONIBlue, ultra thick, ->] (source) -- (binary) node[pos=0.5, below, black] {Build Step};

    \draw[OnionGreen, ultra thick, ->, ] (verifiable) to [out=90, in=180] (source);
    \draw[OnionGreen, ultra thick, ->] (usable) to [out=90, in=0] (binary);

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.3cm, shorten <= 0.3cm] (question) -- (0, 0.5);

    %% Helper lines for debugging.
    % \node[] at (0.0, 0.0) {X};
    % \draw[help lines] (-7, -3) grid (7, 3);
\end{tikzpicture}
\end{frame}

\begin{frame}[t]{Build Process}
\phantomsection\label{build-process}
\centering
\begin{tikzpicture}
    \tikzstyle{build step}=[rectangle, minimum height=0.8cm, minimum width=2cm, draw, thin, fill=OnionDarkPurple!80, text=white, font=\small, scale=0.8]

    %% Alice.
    \node[alice, monitor, minimum size=1.25cm] (alice) at (-6.5, 0.5) {};

    \node[build step, minimum width=2cm, rounded corners] (fetch step) at (-4, 0)   { Fetch };
    \node[build step, minimum width=2cm, rounded corners] (verify step) at (-2, 0)  { Verify };
    \node[build step, minimum width=2cm, rounded corners] (build step) at (0, 0)    { Build };
    \node[build step, minimum width=2cm, rounded corners] (sign step) at (2, 0)     { Sign };
    \node[build step, minimum width=2cm, rounded corners] (publish step) at (4, 0)  { Publish };

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (alice.south east) to [out=270, in=270] (fetch step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (fetch step) to [out=90, in=90] (verify step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (verify step) to [out=270, in=270] (build step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (build step) to [out=90, in=90] (sign step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (sign step) to [out=270, in=270] (publish step);

    %% Helper lines for debugging.
    %% \draw[help lines] (-7,-3) grid (7,3);
\end{tikzpicture}
\end{frame}

\begin{frame}[t]{Build Process}
\phantomsection\label{build-process-1}
\centering
\begin{tikzpicture}
    \tikzstyle{build step}=[rectangle, minimum height=0.8cm, minimum width=2cm, draw, thin, fill=OnionDarkPurple!80, text=white, font=\small, scale=0.8]

    %% Alice.
    \node[alice, monitor, minimum size=1.25cm] (alice) at (-6.5, 0.5) {};

    %% Adversary.
    \node[maninblack, monitor, minimum size=1.25cm] (adversary) at (1.5, -2.5) {};

    \node[build step, minimum width=2cm, rounded corners] (fetch step) at (-4, 0)   { Fetch };
    \node[build step, minimum width=2cm, rounded corners] (verify step) at (-2, 0)  { Verify };
    \node[build step, minimum width=2cm, rounded corners, fill=red!50, text=black] (build step) at (0, 0)    { Build };
    \node[build step, minimum width=2cm, rounded corners] (sign step) at (2, 0)     { Sign };
    \node[build step, minimum width=2cm, rounded corners] (publish step) at (4, 0)  { Publish };

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (alice.south east) to [out=270, in=270] (fetch step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (fetch step) to [out=90, in=90] (verify step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (verify step) to [out=270, in=270] (build step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (build step) to [out=90, in=90] (sign step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (sign step) to [out=270, in=270] (publish step);

    \path[ultra thick, ->, red!50, bend right, shorten >= 0.1cm, shorten <= 0.1cm] (adversary.north) edge (build step);

    %% Helper lines for debugging.
    %% \draw[help lines] (-7,-3) grid (7,3);
\end{tikzpicture}
\end{frame}

\begin{frame}[t]{Build Process}
\phantomsection\label{build-process-2}
\centering
\begin{tikzpicture}
    \tikzstyle{build step}=[rectangle, minimum height=0.8cm, minimum width=2cm, draw, thin, fill=OnionDarkPurple!80, text=white, font=\small, scale=0.8]

    %% Alice.
    \node[alice, monitor, minimum size=1.25cm] (alice) at (-6.5, 0.0) {};

    \node[build step, rounded corners] (alice fetch step) at (-4, -0.5)   { Fetch };
    \node[build step, rounded corners] (alice verify step) at (-2, -0.5)  { Verify };
    \node[build step, rounded corners] (alice build step) at (0, -0.5)    { Build };

    \node[bob, monitor, minimum size=1.25cm] (bob) at (-6.5, -2.5) {};
    \node[build step, rounded corners] (bob fetch step) at (-4, -3)   { Fetch };
    \node[build step, rounded corners] (bob verify step) at (-2, -3)  { Verify };
    \node[build step, rounded corners] (bob build step) at (0, -3)    { Build };

    \node[builder, female, monitor, minimum size=1.25cm] (builder) at (-6.5, -5.0) {};
    \node[build step, rounded corners] (builder fetch step) at (-4, -5.5)   { Fetch };
    \node[build step, rounded corners] (builder verify step) at (-2, -5.5)  { Verify };
    \node[build step, rounded corners] (builder build step) at (0, -5.5)    { Build };

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (alice.south east) to [out=270, in=270] (alice fetch step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (alice fetch step) to [out=90, in=90] (alice verify step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (alice verify step) to [out=270, in=270] (alice build step);

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (bob.south east) to [out=270, in=270] (bob fetch step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (bob fetch step) to [out=90, in=90] (bob verify step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (bob verify step) to [out=270, in=270] (bob build step);

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (builder.south east) to [out=270, in=270] (builder fetch step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (builder fetch step) to [out=90, in=90] (builder verify step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.1cm, shorten <= 0.1cm] (builder verify step) to [out=270, in=270] (builder build step);

    \node[build step, minimum width=2cm, rounded corners] (verify build step) at (4, -3)     { Verify };

    \draw[OnionGreen, ultra thick, ->, shorten >= 0.3cm, shorten <= 0.3cm] (alice build step) to (verify build step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.3cm, shorten <= 0.3cm] (bob build step) to (verify build step);
    \draw[OnionGreen, ultra thick, ->, shorten >= 0.3cm, shorten <= 0.3cm] (builder build step) to (verify build step);

    %% Helper lines for debugging.
    %% \draw[help lines] (-7,-3) grid (7,3);
\end{tikzpicture}
\end{frame}

\begin{frame}{Reproducible Releases}

For the Tor component of our software stack,
we also build our source tarballs
reproducibly.

Requires at least 2 out of 3 release
engineers + CI to be able to do a release.

Same hash generated from multiple people
allows us to have multiple people signing our
releases using PGP.

\end{frame}
