Skip to content

Commit c46c3f9

Browse files
committed
documentation, refactoring
1 parent 1b16c59 commit c46c3f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+742
-312
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ set(SCL_SOURCE_FILES
7575

7676
src/scl/coro/runtime.cc
7777

78-
src/scl/net/config.cc
79-
78+
src/scl/net/tcp/config.cc
8079
src/scl/net/tcp/utils.cc
8180
src/scl/net/tcp/channel.cc
8281
src/scl/net/tcp/network.cc

doc/DoxyConf

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
DOXYFILE_ENCODING = UTF-8
22
PROJECT_NAME = "Secure Computation Library"
33
PROJECT_NUMBER = 0.1
4-
PROJECT_BRIEF = "Utility library for common Secure Computation primitives."
4+
PROJECT_BRIEF = "Utility library for Secure Computation Protocols."
55

66
OUTPUT_DIRECTORY = ./doc
77

8-
WARN_AS_ERROR = YES
8+
WARN_AS_ERROR = NO
99

1010
INPUT = doc/mainpage.md \
11+
doc/docs.h \
1112
include/scl/ \
1213
include/scl/primitives \
1314
include/scl/math \
@@ -18,7 +19,7 @@ INPUT = doc/mainpage.md \
1819
include/scl/coro
1920

2021
FILE_PATTERNS = *.h
21-
EXCLUDE_SYMBOLS = SCL_*
22+
EXCLUDE_SYMBOLS = SCL_*,details::*,*::details::*
2223

2324
REPEAT_BRIEF = NO
2425

@@ -31,11 +32,16 @@ SHOW_FILES = NO
3132

3233
USE_MDFILE_AS_MAINPAGE = doc/mainpage.md
3334
HTML_EXTRA_STYLESHEET = doc/styling.css
35+
LAYOUT_FILE = doc/layout.xml
3436

35-
GENERATE_TREEVIEW = YES
37+
INLINE_INHERITED_MEMB = YES
38+
HTML_CODE_FOLDING = NO
39+
40+
DISABLE_INDEX = NO
41+
GENERATE_TREEVIEW = NO
3642

3743
USE_MATHJAX = YES
3844

3945
HAVE_DOT = NO
4046
GENERATE_LATEX = NO
41-
GENERATE_LEGEND = NO
47+
GENERATE_LEGEND = NO

doc/docs.h

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* SCL --- Secure Computation Library
2+
* Copyright (C) 2025 Anders Dalskov
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Affero General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Affero General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Affero General Public License
15+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
*/
17+
18+
/*
19+
* This file serves only to add documentation to the different namespaces used
20+
* within SCL. It is also here that the different groups are defined.
21+
*
22+
* Documentation is structed according to the principle that, in order to run a
23+
* protocol, we need:
24+
*
25+
* 0. Some way to write a protocol.
26+
* 1. Some sort of network setup.
27+
* 2. Some sort of way to execute the protocol (given a network setup).
28+
*
29+
* Point (0) is all the boiler-plate functionality that is found in
30+
* - math/
31+
* - primitives/
32+
* - ss/
33+
* - bitmap, cmdline, hex, serialization and time
34+
*
35+
* Point (1) is anything related to networking.
36+
* - net/
37+
* - net/tcp/channel.h
38+
* - simulation/channel.h
39+
*
40+
* Point (2) is the simulation stuff, and the eval functions
41+
*/
42+
43+
/**
44+
* @defgroup util Utilities
45+
* @brief Functionality that makes it easier to write MPC code
46+
*/
47+
48+
/**
49+
* @defgroup ss Secret-sharing
50+
* @ingroup util
51+
* @brief Secret-sharing functionality
52+
*/
53+
54+
/**
55+
* @defgroup math Maths
56+
* @ingroup util
57+
* @brief Math related utilities
58+
*/
59+
60+
/**
61+
* @defgroup prim Cryptographic primitives
62+
* @ingroup util
63+
* @brief Cryptographic primitives
64+
*/
65+
66+
/**
67+
* @defgroup net Networking
68+
* @brief Abstract network functionality.
69+
*
70+
* This group contains all SCL functionality related to networking, but which is
71+
* independent of the underlying transport protocol.
72+
*/
73+
74+
/**
75+
* @defgroup net-tcp TCP
76+
* @ingroup net
77+
* @brief Networking functionality for working with TCP connections.
78+
*/
79+
80+
/**
81+
* @defgroup net-sim Simulated
82+
* @ingroup net
83+
* @brief Networking functionality related to simulations.
84+
*/
85+
86+
/**
87+
* @defgroup eval Protocols
88+
* @brief Utilities related to writing and running protocols.
89+
*/
90+
91+
/**
92+
* @defgroup eval-real Real
93+
* @ingroup eval
94+
* @brief Evaluation of protocols with a real network.
95+
*/
96+
97+
/**
98+
* @defgroup eval-sim Simulation
99+
* @ingroup eval
100+
* @brief Evaution of protocols in a simulated network environment.
101+
*/
102+
103+
/**
104+
* @brief The main namespace.
105+
*/
106+
namespace scl {
107+
108+
/**
109+
* @brief Internal/low level namespace.
110+
*/
111+
namespace details {}
112+
113+
} // namespace scl

0 commit comments

Comments
 (0)