Skip to content

Commit d68beba

Browse files
author
Marc Odermatt
committed
fabrid demo copy
1 parent 27ef35c commit d68beba

File tree

4 files changed

+552
-0
lines changed

4 files changed

+552
-0
lines changed

demo/fabrid/BUILD.bazel

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
2+
load("//:scion.bzl", "scion_go_binary")
3+
load("//acceptance/common:topogen.bzl", "topogen_test")
4+
load("//tools/lint:go.bzl", "go_library")
5+
6+
topogen_test(
7+
name = "test",
8+
src = "test.py",
9+
args = [
10+
"--executable=drkey-demo:$(location //demo/drkey:drkey-demo)",
11+
],
12+
data = ["//demo/drkey:drkey-demo"],
13+
topo = "//topology:tiny4.topo",
14+
)
15+
16+
go_library(
17+
name = "go_default_library",
18+
srcs = ["main.go"],
19+
importpath = "github.com/scionproto/scion/demo/drkey",
20+
visibility = ["//visibility:private"],
21+
deps = [
22+
"//pkg/addr:go_default_library",
23+
"//pkg/daemon:go_default_library",
24+
"//pkg/drkey:go_default_library",
25+
"//pkg/drkey/generic:go_default_library",
26+
"//pkg/drkey/specific:go_default_library",
27+
"//pkg/private/serrors:go_default_library",
28+
"//pkg/proto/control_plane:go_default_library",
29+
"//pkg/proto/drkey:go_default_library",
30+
"//pkg/scrypto/cppki:go_default_library",
31+
"//pkg/snet:go_default_library",
32+
"//private/app/flag:go_default_library",
33+
"@com_github_spf13_pflag//:go_default_library",
34+
"@org_golang_google_grpc//:go_default_library",
35+
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
36+
],
37+
)
38+
39+
scion_go_binary(
40+
name = "drkey-demo",
41+
embed = [":go_default_library"],
42+
visibility = ["//visibility:public"],
43+
)
44+
45+
go_binary(
46+
name = "drkey",
47+
embed = [":go_default_library"],
48+
visibility = ["//visibility:public"],
49+
)

demo/fabrid/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# DRKey demo
2+
3+
This demo shows how two hosts can obtain a shared key with the DRKey system.
4+
The "server" side host can locally derive keys for any other host.
5+
The slower "client" side host can fetch its corresponding key from
6+
the DRKey infrastructure running in the control services.
7+
8+
Note that in this demo, no data is transmitted between "client" and "server".
9+
In a practical usage, the server would derive the key for the client's address
10+
after receiving a packet from the client.
11+
12+
The demo consists of the following steps:
13+
14+
1. Enable and configure DRKey and start the topology.
15+
1. Demonstrate the server side key derivation
16+
1. Demonstrate the client side key fetching
17+
1. Compare the keys
18+
19+
## Run the demo
20+
21+
1. [set up the development environment](https://docs.scion.org/en/latest/build/setup.html)
22+
1. `bazel test --test_output=streamed --cache_test_results=no //demo/drkey:test`
23+
24+
Note: this demo works on any SCION network topology. To run the demo on a
25+
different network topology, modify the `topo` parameter in `BUILD.bazel` to
26+
point to a different topology file.

0 commit comments

Comments
 (0)