Skip to content

Commit a8aa26d

Browse files
authored
Merge pull request #97 from QryptInc/charles/nvidia-updates
Fix Nvidia docs
2 parents 3ce02f3 + 50b2f24 commit a8aa26d

File tree

30 files changed

+847
-796
lines changed

30 files changed

+847
-796
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Qrypt Docs site
2+
3+
This repo hosts the content for `docs.qrypt.com`.
4+
5+
It's built using a static site generator called [Hugo](https://gohugo.io/)
6+
7+
The site itself is published automatically by GitHub Actions whenever changes are merged into the main branch.
8+
9+
## Updating the docs
10+
11+
1. Open the repo in the devcontainer (needed to get the right version of Hugo)
12+
2. Make any desired changes in the [content](./content) directory.
13+
3. Run `hugo --baseURL="https://QryptInc.github.io" --cleanDestinationDir` to build the site.
14+
4. Commit all changes and make a PR.
15+

content/sdk/nvidia/_index.md

Lines changed: 110 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ OVS is used to facilitate the transfer of plaintext messages between the host an
231231

232232
## Setup East-West Overlay Encryption
233233

234-
Setting up east-west overlay encryption can be done in two steps:
234+
To set up east-west overlay encryption, first ensure that the strongSwan is built on the target machine. Next, complete the following two steps:
235235

236236
1. **Configure the OVS (Open vSwitch):**
237237
- Setup the OVS bridge
238238
- Configure the authentication method
239239
2. **Run the script:** Execute the following command, which runs the *ovs-monitor-ipsec* script and automates the configuration process:
240240

241-
```c
241+
```bash
242242
systemctl start openvswitch-ipsec.service
243243
```
244244

@@ -248,30 +248,40 @@ Setting up east-west overlay encryption can be done in two steps:
248248

249249
- Start Open vSwitch. If your operating system is Ubuntu, run the following on both *Arm_1* and *Arm_2*:
250250

251-
```c
251+
```bash
252252
service openvswitch-switch start
253253
```
254-
255-
If your operating system is CentOS, run the following on both *Arm_1* and *Arm_2*:
256-
257-
```c
258-
service openvswitch restart
259-
```
260-
254+
261255
- Start OVS IPsec service. Run the following on both *Arm_1* and *Arm_2*:
262256

263-
```c
257+
```bash
264258
systemctl start openvswitch-ipsec.service
265259
```
266260

267-
- Set up OVS bridges in both DPUs. Run the following on both *Arm_1* and *Arm_2*:
268-
269-
```c
270-
ovs-vsctl add-br vxlan-br
271-
ovs-vsctl add-port ovs-br $PF_REP
272-
ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
261+
- Before you can set up OVS bridges in both DPUs, and add the physical function (PF) or its associated representor (PF_REP) to a new bridge, they must be detached from any existing OVS bridge they are associated with.
262+
263+
Detach PF_REP and PF from their current bridge:
264+
```bash
265+
sudo ovs-vsctl del-port ovsbr1 $PF_REP
266+
sudo ovs-vsctl del-port ovsbr1 $PF
267+
273268
```
274-
269+
Note that “ovsbr1” is a sample name given in these instructions; the name on your system could be different.
270+
271+
Next, run the following on both Arm_1 and Arm_2:
272+
```bash
273+
sudo ovs-vsctl add-br my-ovs-br
274+
sudo ovs-vsctl add-port my-ovs-br $PF_REP
275+
sudo ovs-vsctl add-port my-ovs-br $PF
276+
sudo ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
277+
```
278+
279+
If your operating system is CentOS, run the following on both *Arm_1* and *Arm_2*:
280+
281+
```bash
282+
service openvswitch restart
283+
```
284+
275285
- Set up IPsec tunnel on the OVS bridge. Three authentication methods are possible. Select your preferred method and follow the steps relevant to it. Note that some authentication methods require you to create certificates (self-signed or certificate authority certificates).
276286

277287
### Authentication Methods
@@ -282,7 +292,7 @@ There are three authentication methods:
282292

283293
On *Arm_1*, run:
284294

285-
```c
295+
```bash
286296
ovs-vsctl add-port vxlan-br tun -- \
287297
set interface tun type=vxlan \
288298
options:local_ip=$ip1 \
@@ -294,8 +304,8 @@ ovs-vsctl add-port vxlan-br tun -- \
294304

295305
On *Arm_2*, run:
296306

297-
```c
298-
ovs-vsctl add-port vxlan-br tun -- \
307+
```bash
308+
sudo ovs-vsctl add-port vxlan-br tun -- \
299309
set interface tun type=vxlan \
300310
options:local_ip=$ip2 \
301311
options:remote_ip=$ip1 \
@@ -314,21 +324,20 @@ Generate self-signed certificate in both *Arm_1*and *Arm_2*. Then copy the cer
314324
On *Arm_1*, run:
315325

316326
Generate self-signed certificates
317-
```c
318-
319-
ovs-pki req -u host_1.
320-
ovs-pki self-sign host_1
321-
ovs-vsctl set Open_vSwitch . other_config:certificate=/etc/swanctl/x509/host_1-cert.pem \
327+
```bash
328+
sudo ovs-pki req -u host_1.
329+
sudo ovs-pki self-sign host_1
330+
sudo ovs-vsctl set Open_vSwitch . other_config:certificate=/etc/swanctl/x509/host_1-cert.pem \
322331
other_config:private_key=/etc/swanctl/private/host_1-privkey.pem
323332
```
324333

325334
On *Arm_2*, run:
326335

327336
Generate self-signed certificates
328-
```c
329-
ovs-pki req -u host_2.
330-
ovs-pki self-sign host_2
331-
ovs-vsctl set Open_vSwitch . other_config:certificate=/etc/swanctl/x509/host_2-cert.pem \
337+
```bash
338+
sudo ovs-pki req -u host_2.
339+
sudo ovs-pki self-sign host_2
340+
sudo ovs-vsctl set Open_vSwitch . other_config:certificate=/etc/swanctl/x509/host_2-cert.pem \
332341
other_config:private_key=/etc/swanctl/private/host_2-privkey.pem
333342
```
334343

@@ -342,23 +351,23 @@ First you need to establish a public key infrastructure (PKI), generate certific
342351

343352
On *Arm_1*, run:
344353

345-
```c
346-
ovs-pki init --force
354+
```bash
355+
sudo ovs-pki init --force
347356
cp /var/lib/openvswitch/pki/controllerca/cacert.pem <path_to>/certsworkspace
348357
cd <path_to>/certsworkspace
349-
ovs-pki req -u host_1
350-
ovs-pki sign host1 switch 
358+
sudo ovs-pki req -u host_1
359+
sudo ovs-pki sign host1 switch 
351360
```
352361
After running this code, you should have host_1-cert.pem, host_1-privkey.pem, and cacert.pm in the certsworkspace folder.
353362

354363
On *Arm_2,* run:
355364

356-
```c
357-
ovs-pki init --force
365+
```bash
366+
sudo ovs-pki init --force
358367
cp /var/lib/openvswitch/pki/controllerca/cacert.pem <path_to>/certsworkspace
359368
cd <path_to>/certsworkspace
360-
ovs-pki req -u host_2
361-
ovs-pki sign host_2 switch
369+
sudo ovs-pki req -u host_2
370+
sudo ovs-pki sign host_2 switch
362371
```
363372
After running this code, you should have host_2-cert.pem, host_2-privkey.pem, and cacert.pm in the certsworkspace folder.
364373

@@ -371,27 +380,29 @@ Configure IPsec tunnel to use CA-signed certificate:
371380

372381
On *Arm_1*, run:
373382

374-
```c
375-
ovs-vsctl set Open_vSwitch . \
383+
```bash
384+
sudo ovs-vsctl set Open_vSwitch . \
376385
other_config:certificate=/etc/strongswan/swanctl/x509/host_1.pem \
377386
other_config:private_key=/etc/strongswan/swanctl/private/host_1-privkey.pem \
378387
other_config:ca_cert=/etc/strongswan/swanctl/x509ca/cacert.pem
379388
```
380389

381390
On *Arm_2*, run:
382391

383-
```c
384-
ovs-vsctl set Open_vSwitch . \
392+
```bash
393+
sudo ovs-vsctl set Open_vSwitch . \
385394
other_config:certificate=/etc/strongswan/swanctl/x509/host_2.pem \
386395
other_config:private_key=/etc/strongswan/swanctl/private/host_2-privkey.pem \
387396
other_config:ca_cert=/etc/strongswan/swanctl/x509ca/cacert.pem
388397
```
389398

390399
## Execute a script
391400

401+
Ensure that the strongSwan has already been built on your system.
402+
392403
After OVS is configured, run the following command:
393404

394-
```c
405+
```bash
395406
systemctl start openvswitch-ipsec.service
396407
```
397408

@@ -401,7 +412,7 @@ This command automatically runs the *ovs-monitor-ipsec* script and generates the
401412

402413
Note that critical information such as key exchange and authentication algorithms to be used for IKE SA and ESP SA are passed in the *ovs-monitor-ipsec* script to later generate a *swanctl.conf* file. Ensure that the script contains all the key exchange algorithms to be used for IKE SA establishment. For instance, parameters *ke1_kyber3-ke2_blast* passed in the *ovs-monitor-ipsec* script
403414

404-
```
415+
```bash
405416
sudo sed -i 's/aes256gcm16-modp2048-esn/aes256gcm16-modp2048-ke1_kyber3-ke2_blast-esn/g' /usr/share/openvswitch/scripts/ovs-monitor-ipsec
406417
```
407418

@@ -416,47 +427,67 @@ esp_proposals = aes128gcm128-x25519-ke1_kyber3-ke2_blast
416427
Here’s a basic structure for the *swanctl.conf* file that includes necessary parameters for both ends of the connection (referred to as Left (BFL) and Right (BFR)):
417428

418429
```
419-
connections {
420-
BFL-BFR {
421-
local_addrs = 192.168.50.1 // Replace with your local IP
422-
remote_addrs = 192.168.50.2 // Replace with your remote IP
423-
local {
424-
auth = psk // Use pre-shared key authentication
425-
id = host1 // Identifier for local machine
426-
}
427-
remote {
428-
auth = psk // Use pre-shared key authentication
429-
id = host2 // Identifier for remote machine
430+
conn-defaults {
431+
unique = replace
432+
reauth_time = 0
433+
version = 2
434+
mobike = no
435+
proposals = aes128-sha256-x25519
430436
}
431-
children {
432-
bf {
433-
local_ts = 192.168.50.1/24 [udp/4789] // Local traffic selectors
434-
remote_ts = 192.168.50.2/24 [udp/4789] // Remote traffic selectors
435-
esp_proposals = aes128gcm128-x25519 // Encryption proposals should include additional key exchanges
436-
mode = transport // Use transport mode
437-
policies_fwd_out = yes // Forward output policies
438-
hw_offload = full // Enable hardware offload
437+
438+
child-defaults {
439+
esp_proposals = aes256gcm16-modp2048-ke1_kyber3-ke2_blast-esn
440+
mode = transport
441+
policies_fwd_out = yes
442+
start_action = start
439443
}
444+
445+
connections {
446+
tun-1 : conn-defaults{
447+
local_addrs = 0.0.0.0/0
448+
remote_addrs = 192.168.50.2
449+
450+
local {
451+
auth = psk
452+
id = 192.168.50.1
453+
}
454+
remote {
455+
auth = psk
456+
id = 192.168.50.2
457+
}
458+
459+
children {
460+
tun-in-1 : child-defaults {
461+
local_ts = 192.168.50.1/32 [udp/4789]
462+
remote_ts = 192.168.50.2/32 [udp]
463+
hw_offload = auto (should be full if supported)
464+
}
465+
tun-out-1 : child-defaults {
466+
local_ts = 192.168.50.1/32 [udp]
467+
remote_ts = 192.168.50.2/32 [udp/4789]
468+
hw_offload = auto (should be full if supported)
469+
}
470+
}
471+
}
440472
}
441-
version = 2 // Specify version
442-
mobike = no / Mobile IP not used
443-
reauth_time = 0 // Re-authentication time
444-
proposals = aes128-sha256-x25519 // IKE proposals
445-
}
473+
474+
secrets {
475+
ike-tun {
476+
id = 192.168.50.1
477+
secret = YOUR PRE-SHARED SECRET
478+
}
446479
}
447480
```
448481
449-
If using pre-shared key (PSK) for authentication, add a section to the *swanctl.conf* file:
450-
482+
If using pre-shared key (PSK) for authentication, add a section to the swanctl.conf file:
451483
```
452484
secrets {
453-
ike-BF {
485+
ike-BF {
454486
id-host1 = host1 // Identifier for Left Arm
455487
id-host2 = host2 // Identifier for Right Arm
456-
secret = 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL // Replace with your actual secret
488+
secret = YOUR PRE-SHARED SECRET // Replace with your actual secret
457489
}
458490
}
459-
460491
```
461492
462493
Ensure that all the data needed to generate the *swanctl.conf* file is correctly passed in the *ovs-monitor-ipsec* script.
@@ -469,6 +500,8 @@ For more information see [ NVIDIA DOCA East-West Overlay Encryption Application]
469500
470501
# Build strongSwan with liboqs and Qrypt's BLAST plugin
471502
503+
Ensure that cmake is installed before completing the steps below.
504+
472505
### Create a directory to clone the repos into
473506
474507
```
@@ -482,24 +515,22 @@ cd qrypt
482515
```
483516
sudo apt -y install astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind
484517
485-
git clone -b main <https://github.com/open-quantum-safe/liboqs.git>
518+
git clone -b main https://github.com/open-quantum-safe/liboqs.git
486519
cd liboqs
487520
488521
mkdir build
489522
cd build
490-
cmake -GNinja -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr \\
523+
cmake -GNinja -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr \
491524
-DCMAKE_BUILD_TYPE=Release -DOQS_BUILD_ONLY_LIB=ON ..
492525
ninja
493526
sudo ninja install
494527
495-
cd ../../
496-
497528
```
498529
499530
### Clone the strongSwan repo
500531
501532
```
502-
git clone <https://github.com/QryptInc/strongswan.git>
533+
git clone https://github.com/QryptInc/strongswan.git
503534
cd strongswan
504535
git checkout BF-6.0.0beta4-qrypt-plugins
505536
@@ -554,24 +585,11 @@ sudo apt-get -y install pkg-config shtool autoconf gperf bison build-essential p
554585
make
555586
sudo make install
556587
557-
cd ..
558-
559588
```
560589
561590
### Build Qrypt's BLAST plugin
562591
563-
Retrieve Qrypt's SDK library from the Qrypt Portal from "Products->Qrypt SDK". Copy the libQryptSecurity.so and
564-
libQryptSecurityC.so libraries to *src/libstrongswan/plugins/blast/*. Then, proceed with the following instructions.
565-
566-
```
567-
cd src/libstrongswan/plugins/blast/
568-
sudo make install-deps
569-
sudo ldconfig
570-
make SWANDIR=../../../..
571-
sudo make install PLUGINCONF=/etc/strongswan.d/charon/
572-
cd ../../../..
573-
574-
```
592+
You should have Qrypt Security libraries, provided directly by Qrypt, along with instructions to build the BLAST IPsec plugin. Please follow the steps outlined in that document to build the plugin.
575593
576594
### Start and stop service
577595

docs/404.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
<title>404 Page not found</title>
1010

1111

12-
<link href="./css/nucleus.css?1734382870" rel="stylesheet">
13-
<link href="./css/fontawesome-all.min.css?1734382870" rel="stylesheet">
14-
<link href="./css/hybrid.css?1734382870" rel="stylesheet">
15-
<link href="./css/featherlight.min.css?1734382870" rel="stylesheet">
16-
<link href="./css/perfect-scrollbar.min.css?1734382870" rel="stylesheet">
17-
<link href="./css/theme.css?1734382870" rel="stylesheet">
18-
<link href="./css/hugo-theme.css?1734382870" rel="stylesheet">
12+
<link href="./css/nucleus.css?1742501324" rel="stylesheet">
13+
<link href="./css/fontawesome-all.min.css?1742501324" rel="stylesheet">
14+
<link href="./css/hybrid.css?1742501324" rel="stylesheet">
15+
<link href="./css/featherlight.min.css?1742501324" rel="stylesheet">
16+
<link href="./css/perfect-scrollbar.min.css?1742501324" rel="stylesheet">
17+
<link href="./css/theme.css?1742501324" rel="stylesheet">
18+
<link href="./css/hugo-theme.css?1742501324" rel="stylesheet">
1919

20-
<link href="./css/theme-mine.css?1734382870" rel="stylesheet">
20+
<link href="./css/theme-mine.css?1742501324" rel="stylesheet">
2121

2222
<style>
2323
:root #header + #content > #left > #rlblock_left {

0 commit comments

Comments
 (0)