Skip to content

Commit 56bcff7

Browse files
committed
Documentation spelling and textual updates
1 parent e36c65a commit 56bcff7

File tree

9 files changed

+203
-117
lines changed

9 files changed

+203
-117
lines changed

README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Upcoming supported platforms:
3535

3636
== link:docs/cli-usage.adoc[Using CLI tool]
3737

38-
== link:docs/c-usage.adoc[Using RNP’s C API in your projects]
38+
== link:docs/c-usage.adoc[Using the RNP C API in your projects]
3939

4040
== Versioning
4141

cmake/info.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A set of OpenPGP tools for encrypting, decrypting, signing, and \
3434
verifying files.
3535
]=]
3636
)
37-
set(PACKAGE_DESCRIPTION_SHORT "Freely licensed PGP implementation")
37+
set(PACKAGE_DESCRIPTION_SHORT "Freely-licensed OpenPGP PGP implementation")
3838
set(PACKAGE_LICENSE "BSD")
3939

4040
set(RPM_RELEASE_NUM 1)

docs/c-usage.adoc

+82-54
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,129 @@
1-
= Using RNP’s C APIs
1+
= Using the RNP C API
22

3-
If you’re a developer and wish to use the RNP library in your projects,
4-
you can use the examples below to see how it may be done.
3+
This document is for developers who wish to use RNP as a library in C.
54

6-
== Samples
5+
Examples are given below to demonstrate such usage.
6+
7+
== Examples
78

89
[TIP]
9-
.Where to find the examples
10+
.Location of examples
1011
====
11-
Find the source code for these examples
12-
under `https://github.com/rnpgp/rnp/blob/master/src/examples/[src/examples]`.
12+
The source code of these examples can be found under
13+
`https://github.com/rnpgp/rnp/blob/master/src/examples/[src/examples]`.
1314
14-
If you’re building from source, the examples are built together with the RNP library
15-
and are available in `src/examples` directory of your build folder.
15+
If you are planning to build from source, these examples are built
16+
together with the RNP library and will be available under `src/examples`
17+
within your build folder.
1618
====
1719

1820
[TIP]
1921
====
20-
All samples below use APIs exposed via header file
21-
`https://github.com/rnpgp/rnp/blob/master/include/rnp/rnp.h[include/rnp/rnp.h]`,
22-
check it out for more documentation.
22+
All samples below use APIs exposed via the header file
23+
`https://github.com/rnpgp/rnp/blob/master/include/rnp/rnp.h[include/rnp/rnp.h]`.
24+
For further details please refer to the file directly.
2325
====
2426

25-
Following sample applications are available:
27+
The following example applications are available:
28+
29+
`generate`:: Demonstrates generating keys, save/load of keyrings, exporting keys.
2630

27-
`generate`:: Includes code which shows how to generate keys, save/load keyrings, export keys.
31+
`encrypt`:: Demonstrates how to encrypt a file using a password and/or key.
2832

29-
`encrypt`:: Includes code which shows how to encrypt file, using the password and/or key.
33+
`decrypt`:: Demonstrates how to decrypt OpenPGP data using a key and/or password.
3034

31-
`decrypt`:: This one shows how to decrypt OpenPGP data, using the key or password.
35+
`sign`:: Demonstrates how to sign messages, using one or more keys from a loaded keyring.
3236

33-
`sign`:: Shows how to sign messages, using the key(s) from loaded keyring.
37+
`verify`:: Demonstrates how to verify signed messages using dynamic keys fetching
38+
(using a sample key provider implementation).
3439

35-
`verify`:: Shows how to verify signed messages using dynamic keys fetching (sample key provider implementation).
40+
`dump`:: Demonstrates how to dump OpenPGP packet information.
3641

37-
`dump`:: Shows how to dump OpenPGP packet information.
3842

39-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/generate.c[generate.c]
43+
=== generate.c
44+
45+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/generate.c
4046

4147
This example is composed from 2 functions:
4248

43-
* `ffi_generate_keys()`: this shows how to generate and save different key types
44-
(RSA and EDDSA/Curve25519) using the JSON key description.
45-
This also demonstrates the usage of password provider.
49+
* `ffi_generate_keys()`: Demonstrates how to generate and save different key types
50+
(RSA and EDDSA/Curve25519) using JSON key description.
51+
Also demonstrates usage of the password provider.
4652
+
4753
Keyrings will be saved to files `pubring.pgp` and `secring.pgp` in the current directory.
4854
You can use `rnp --list-packets pubring.pgp` to check the properties of the generated key(s).
4955

50-
* `ffi_output_keys()`: This shows how to load keyrings,
51-
search for the keys (in helper functions `ffi_print_key()`/`ffi_export_key()`),
52-
and export them to memory or file in armored format.
56+
* `ffi_output_keys()`: Demonstrates how to load keyrings,
57+
search for keys (in helper functions `ffi_print_key()`/`ffi_export_key()`),
58+
and how to export them to memory or file in armored format.
59+
60+
=== encrypt.c
61+
62+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/encrypt.c
63+
64+
This code example does the following:
65+
66+
* first loads a public keyring (`pubring.pgp`) (created by the `generate.c` example)
67+
* then creates an encryption operation structure and
68+
* configures it with various options (including the setup of password encryption and public-key encryption).
5369

54-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/encrypt.c[encrypt.c]
70+
The result is the encrypted and armored (for easier reading) message
71+
`RNP encryption sample message`.
5572

56-
This code sample first loads public keyring (`pubring.pgp`) (created by the “generate.c” example),
57-
then creates encryption operation structure and configures it with various options
58-
(including the setup of password encryption and public-key encryption).
73+
This message is saved to the file `encrypted.asc` in current directory.
5974

60-
The result is the encrypted and armored (for easier reading) message `RNP encryption sample message`.
61-
It is saved to the file `encrypted.asc` in current directory.
75+
What you can do after:
6276

63-
You can investigate it via the `rnp --list-packets encrypted.asc` command.
64-
Also, you may want to decrypt saved file via `rnp --keyfile secring.pgp -d encrypted.asc`.
77+
* Inspect the message with `rnp --list-packets encrypted.asc`.
78+
* Decrypt the saved file via `rnp --keyfile secring.pgp -d encrypted.asc`.
6579

66-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/decrypt.c[decrypt.c]
80+
=== decrypt.c
6781

68-
This example uses keyrings generated in the “generate.c” sample to decrypt messages
69-
encrypted by the “encrypt.c” sample.
82+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/decrypt.c
7083

71-
It shows how to decrypt message with password or with a key
72-
and implements custom password provider for decryption or key password.
84+
This example uses keyrings generated from the `generate.c` example
85+
to decrypt messages encrypted by the `encrypt.c` example.
7386

74-
Decrypted message is saved to the memory and then printed to the stdout.
87+
This example demonstrates how to decrypt message with a password or with a key,
88+
and implements a custom password provider for decryption via key or key password.
7589

76-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/sign.c[sign.c]
90+
The decrypted message is saved to memory and then printed to the `stdout`.
7791

78-
This sample uses keyrings generated in the preceding “generate.c” sample.
92+
=== sign.c
7993

80-
This sample configures signing context and signs the message, saving it to the `signed.asc` file.
81-
Attached signature is used, i.e. the data is encapsulated into the resulting message.
94+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/sign.c
8295

83-
You can investigate the signed message by issuing `rnp --list-packets signed.asc` command.
84-
To verify message, use `rnp --keyfile pubring.pgp -v signed.asc`.
96+
This example uses keyrings generated in the preceding `generate.c` example.
8597

86-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/verify.c[verify.c]
98+
It demonstrates configuration of a signing context, signing of the message,
99+
and the saving of the detached signature to the `signed.asc` file.
87100

88-
This example uses keyrings generated in the “generate.c” sample.
101+
Then the attached signature is used: i.e. the data is encapsulated into
102+
the resulting message.
103+
104+
What you can do after:
105+
106+
* Inspect the signed message with `rnp --list-packets signed.asc`.
107+
* Verify the message with `rnp --keyfile pubring.pgp -v signed.asc`.
108+
109+
=== verify.c
110+
111+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/verify.c[
112+
113+
This example uses keyrings generated in the `generate.c` example.
89114

90115
However, instead of loading the whole keyring, it implements dynamic key fetching
91116
via custom key provider (see function `example_key_provider`).
92117

93-
After verification this sample outputs the verified embedded message
94-
and all signatures with signing key ids and statuses.
118+
After verification, it outputs the verified embedded message
119+
and all signatures to `stdout` (with signing key IDs and statuses).
120+
121+
=== dump.c
95122

96-
=== https://github.com/rnpgp/rnp/blob/master/src/examples/dump.c[dump.c]
123+
Location: https://github.com/rnpgp/rnp/blob/master/src/examples/dump.c[
97124

98-
This example dumps OpenPGP packet information from the input stream (stdin or filename),
99-
tuned with flags passed via command line interface.
125+
This example dumps OpenPGP packet information from the input stream
126+
(via `stdin` or filename), tuned with flags passed via the
127+
command-line interface.
100128

101-
Resulting human-readable text or JSON is dumped to stdout.
129+
The resulting human-readable text or JSON is printed to `stdout`.

docs/cli-usage.adoc

+30-22
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
= Using the RNP command-line tool
1+
= Using the RNP command-line interface
22

3-
== Generating an RSA Private Key
3+
== Generating an RSA private key
44

5-
By default `rnpkeys --generate-key` will generate 2048-bit RSA key.
5+
By default, `rnpkeys --generate-key` generates a 2048-bit RSA key.
66

77
[source,console]
88
----
@@ -17,9 +17,13 @@ rnpkeys --generate-key --homedir=${keydir}
1717
rnpkeys: generated keys in directory ${keydir}/6ed2d908150b82e7
1818
----
1919

20-
In case you're curious, `6ed2d...` is the key fingerprint.
20+
NOTE: Here `6ed2d...` is the key fingerprint.
2121

22-
In order to use fully featured key pair generation ``--expert`` flag should be used. With this flag added to ``rnpkeys --generate-key`` user has a possibility to generate keypair for any supported algorithm and/or key size.
22+
In order to use fully-featured key-pair generation, the `--expert` flag
23+
should be used.
24+
25+
With this flag added to `rnpkeys --generate-key`, the user will be
26+
able to generate a key-pair for any supported algorithm and/or key size.
2327

2428
Example:
2529

@@ -51,7 +55,7 @@ Repeat password for d45592277b75ada1:
5155
----
5256

5357

54-
== Listing Keys
58+
== Listing keys
5559

5660
[source,console]
5761
----
@@ -69,7 +73,7 @@ rnpkeys --list-keys --homedir=${keyringdir}
6973
----
7074

7175

72-
== Signing a File
76+
== Signing a file
7377

7478

7579
=== Signing in binary format
@@ -84,7 +88,7 @@ rnp --sign --homedir=${keyringdir} ${filename}
8488
Creates `${filename}.gpg` which is an OpenPGP message that includes the
8589
message together with the signature as a 'signed message'.
8690

87-
This type of file can be verified by:
91+
This type of file can be verified with:
8892

8993
* `rnp --verify --homedir=${keyringdir} ${filename}.gpg`
9094

@@ -101,12 +105,12 @@ rnp --sign --detach --homedir=${keyringdir} ${filename}
101105
Creates `${filename}.sig` which is an OpenPGP message in binary
102106
format, that only contains the signature.
103107

104-
This type of file can be verified by:
108+
This type of file can be verified with:
105109

106110
* `rnp --verify --homedir=${keyringdir} ${filename}.sig`
107111

108112

109-
=== Signing in Armored (ASCII-Armored) format
113+
=== Signing in armored ("`ASCII-armored`") format
110114

111115
[source,console]
112116
----
@@ -116,21 +120,23 @@ rnp --sign --armor --homedir=${keyringdir} ${filename}
116120
=>
117121

118122
Creates `${filename}.asc` which is an OpenPGP message in ASCII-armored
119-
format, including the message together with the signature as a 'signed
120-
message'.
123+
format, including the message together with the signature as a
124+
"`signed message`".
121125

122-
This type of file can be verified by:
126+
This type of file can be verified with:
123127

124128
* `rnp --verify --homedir=${keyringdir} ${filename}.asc`
125129

126130

127131
=== Other options
128132

129-
* `--clearsign` option will append a separate PGP Signaure to the end of
130-
the message (the new output)
133+
`--clearsign`::
134+
appends a separate OpenPGP signature to the end of the newly
135+
signed message.
131136

132-
* `--detach` option will append a separate PGP Signaure to the end of
133-
the message (the new output)
137+
`--detach`::
138+
saves the OpenPGP signature in a separate file from the newly
139+
signed message.
134140

135141

136142
== Encrypt
@@ -143,7 +149,7 @@ rnp --encrypt --homedir=${keyringdir} ${filename}
143149

144150
=>
145151

146-
Creates `${filename}.gpg`.
152+
Creates `${filename}.gpg`, which is an encrypted OpenPGP message.
147153

148154

149155
== Decrypt
@@ -155,12 +161,14 @@ rnp --decrypt --homedir=${keyringdir} ${filename}.gpg
155161

156162
=>
157163

158-
Creates `${filename}`.
164+
Creates `${filename}`, the decrypted form of the `${filename}.gpg`
165+
encrypted OpenPGP message.
159166

160167

161-
== Check binary version
168+
== Check version
162169

163170
The output of `rnp --version` contains the `git` hash of the version
164-
the binary was built from, which value is generated when `cmake` runs.
171+
the binary was built from, of which value is generated when `cmake` runs.
165172

166-
Consequently, a release tarball generated with `make dist` will contain this hash version.
173+
Consequently, a release tarball generated with `make dist` will
174+
contain this hash version.

docs/develop.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ A good example of using a branch would be:
5555

5656
Branch names may vary but should be somewhat descriptive, with words
5757
separated by hyphens. It is also helpful to start the branch name with
58-
your github username, to make it clear who created the branch and
58+
your GitHub username, to make it clear who created the branch and
5959
prevent naming conflicts.
6060

6161
Remember that branch names may be preserved permanently in the commit
@@ -459,6 +459,6 @@ Platforms:
459459

460460
* RHEL/CentOS: @dewyatt
461461
* BSD:
462-
* Windows:
463-
* macOS / iOS / homebrew: @ni4
462+
* Windows: @rrrooommmaaa
463+
* macOS / iOS / Homebrew: @ni4
464464
* Debian: @zgyarmati

docs/develop/packaging.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ make package
6161

6262
=== 5. Check and Install the RPM
6363

64-
It may be helpful to run rpmlint on the RPM and note new warnings or errors.
64+
It may be helpful to run `rpmlint` on the RPM and note new warnings or errors.
6565

6666
[source,console]
6767
--

0 commit comments

Comments
 (0)