Skip to content

Commit 6cd859c

Browse files
committed
Updates tarball README with useful information
Signed-off-by: Dennis Gove <[email protected]>
1 parent 16e1210 commit 6cd859c

File tree

1 file changed

+105
-3
lines changed

1 file changed

+105
-3
lines changed

quickstart/tarball_README.md

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,106 @@
1-
This directory contains the necessary binaries and configuration for a
2-
Parsec quickstart.
1+
# Parsec Quickstart - Tarball
32

4-
See [this page](https://parallaxsecond.github.io/parsec-book/getting_started/linux_x86.html) for more details.
3+
This tarball and content is constructed specifically as an introductory quickstart for the Parsec service and client tool. It is not intended for use in any production system. See [the Getting Started documentation](https://parallaxsecond.github.io/parsec-book/getting_started/installation_options.html#option-2-download-a-quick-start-release) for more details.
4+
5+
These tools were built for a Linux-based `x86_64` system.
6+
7+
## Directory Layout
8+
9+
```
10+
.
11+
├── bin
12+
│ ├── parsec # The parsec binary
13+
│ └── parsec-tool # The parsec client tool
14+
└── quickstart
15+
├── README.md # This README
16+
├── build.txt # Information about the Parsec build environment
17+
├── config.toml # The config file used by parsec
18+
└── parsec-cli-tests.sh # Standard parsec-tool tests
19+
```
20+
21+
## Usage
22+
23+
The following describes standard quickstart usage examples.
24+
25+
Calls to the `parsec-tool` assume that there exists an environment variable `PARSEC_SERVICE_ENDPOINT` set to the path for the socket created by the `parsec` process. By default, that socket is placed in the directory where you've executed the `parsec` command.
26+
27+
It may also be helpful to add the `bin` directory to your path. The examples below assume that this has been done.
28+
29+
```
30+
$ quickstart/ > export PARSEC_SERVICE_ENDPOINT=unix:$(pwd)/parsec.sock
31+
$ quickstart/ > export PATH=${PATH}:$(pwd)/../bin
32+
```
33+
34+
### Start the PARSEC service
35+
36+
```bash
37+
# This will execute the parsec binary using the config file found at quickstart/config.toml.
38+
# The socket path will be placed in the current directory quickstart/parsec.sock
39+
$ quickstart/ > parsec &
40+
[INFO parsec] Parsec started. Configuring the service...
41+
[INFO parsec_service::key_info_managers::sqlite_manager] SQLiteKeyInfoManager - Found 0 key info mapping records
42+
[INFO parsec_service::utils::service_builder] Creating a Mbed Crypto Provider.
43+
[INFO parsec] Parsec is ready.
44+
45+
$ quickstart/ >
46+
```
47+
48+
### Ping Parsec
49+
50+
```bash
51+
# This will execute a ping command using the parsec-tool binary.
52+
$ quickstart/ > parsec-tool ping
53+
[INFO ] Service wire protocol version
54+
1.0
55+
```
56+
57+
### Parsec Tool Examples
58+
59+
```bash
60+
# List Providers
61+
$ quickstart/ > parsec-tool list-providers
62+
[INFO ] Available providers:
63+
ID: 0x01 (Mbed Crypto provider)
64+
Description: User space software provider, based on Mbed Crypto - the reference implementation of the PSA crypto API
65+
Version: 0.1.0
66+
Vendor: Arm
67+
UUID: 1c1139dc-ad7c-47dc-ad6b-db6fdb466552
68+
69+
ID: 0x00 (Core provider)
70+
Description: Software provider that implements only administrative (i.e. no cryptographic) operations
71+
Version: 1.1.0
72+
Vendor: Unspecified
73+
UUID: 47049873-2a43-4845-9d72-831eab668784
74+
75+
# Create RSA Key
76+
$ quickstart/ > parsec-tool create-rsa-key --key-name demo1
77+
[INFO ] Creating RSA encryption key...
78+
[INFO ] Key "demo1" created.
79+
80+
# Encrypt data using the RSA Key
81+
$ quickstart/ > parsec-tool encrypt --key-name demo1 "Super secret data"
82+
[INFO ] Encrypting data with RsaPkcs1v15Crypt...
83+
RuPgZld6....brHqQd7xJg==
84+
85+
# Decrypt ciphertext using the RSA Key
86+
$ quickstart/ > parsec-tool decrypt --key-name demo1 RuPgZld6....brHqQd7xJg==
87+
[INFO ] Decrypting data with RsaPkcs1v15Crypt...
88+
Super secret data
89+
```
90+
91+
### Run the Test Script
92+
93+
```bash
94+
$ quickstart/ > ./parsec-cli-tests.sh
95+
Checking Parsec service...
96+
[INFO ] Service wire protocol version
97+
1.0
98+
99+
Testing Mbed Crypto provider
100+
101+
- Test random number generation
102+
[INFO ] Generating 10 random bytes...
103+
[INFO ] Random bytes:
104+
24 A1 19 DB 3F 3C A0 82 FE 63
105+
....
106+
```

0 commit comments

Comments
 (0)