Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit 068112c

Browse files
committed
Additional documentation cleanup.
PiperOrigin-RevId: 198059513 GitOrigin-RevId: b0d86b91c0a596d6e87d36bdc1e1876b77a23b7f
1 parent d8691d3 commit 068112c

File tree

4 files changed

+41
-32
lines changed

4 files changed

+41
-32
lines changed

docs/PRIMITIVES.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ via the corresponding primitives:
1313
This document describes the main properties of Tink’s primitives.
1414

1515
General properties of all primitives:
16+
1617
- stateless (hence thread-safe)
1718
- copy-safe (for the parameters)
1819
- at least 128-bit security (with an exception for RSA)
@@ -34,9 +35,10 @@ Minimal properties:
3435
(within the range 0..2<sup>32</sup> bytes)
3536
- CCA2 security
3637
- at least 80-bit authentication strength
37-
- there are no secrecy or knowledge guarantees wrt. to the value of _associated data_
38-
- can encrypt at least 2<sup>32</sup> messages with a total of 2<sup>50</sup> bytes so that no
39-
attack has success probability larger than 2<sup>-32</sup>
38+
- there are no secrecy or knowledge guarantees wrt. to the value of _associated
39+
data_
40+
- can encrypt at least 2<sup>32</sup> messages with a total of 2<sup>50</sup>
41+
bytes so that no attack has success probability larger than 2<sup>-32</sup>
4042

4143
## Streaming Authenticated Encryption with Associated Data
4244

@@ -51,11 +53,13 @@ can be obtained fast by decrypting and authenticating just a part of the
5153
ciphertext, without need of processing the entire ciphertext.
5254

5355
Encryption must be done in one session. There is no possibility to modify an
54-
existing ciphertext or to append to it (other than to reencrypt the entire file again).
56+
existing ciphertext or to append to it (other than to reencrypt the entire file
57+
again).
5558

5659
Instances of _Streaming AEAD_ follow the OAE2 definition proposed in the
57-
paper ["_Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance_" by
58-
Hoang, Reyhanitabar, Rogaway and Vizár](https://eprint.iacr.org/2015/189.pdf).
60+
paper [_"Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance"_
61+
by Hoang, Reyhanitabar, Rogaway and
62+
Vizár](https://eprint.iacr.org/2015/189.pdf).
5963

6064
Minimal properties:
6165

@@ -64,7 +68,8 @@ Minimal properties:
6468
0..2<sup>31</sup>-1 bytes
6569
- CCA2 security
6670
- at least 80-bit authentication strength
67-
- there are no secrecy or knowledge guarantees wrt. to the value of _associated data_
71+
- there are no secrecy or knowledge guarantees wrt. to the value of _associated
72+
data_
6873
- can encrypt at least 2<sup>32</sup> messages with a total of 2<sup>68</sup>
6974
bytes so that no attack with up to 2<sup>32</sup> chosen plaintexts/chosen
7075
ciphertexts has success probability larger than 2<sup>-32</sup>.
@@ -97,13 +102,14 @@ Minimal properties:
97102
same message encrypted under 2<sup>32</sup> keys, they need to do
98103
2<sup>128</sup> computations to obtain a single key.
99104
- at least 80-bit authentication strength
100-
- there are no secrecy or knowledge guarantees wrt. to the value of _associated data_
105+
- there are no secrecy or knowledge guarantees wrt. to the value of _associated
106+
data_
101107

102108
## Message Authentication Code
103109

104110
MAC primitive (Message Authentication Code) provides symmetric message
105-
authentication. A sender sharing a _symmetric key_ with a recipient can compute an
106-
_authentication tag_ for a given message, that allows for verifying that the
111+
authentication. A sender sharing a _symmetric key_ with a recipient can compute
112+
an _authentication tag_ for a given message, that allows for verifying that the
107113
message comes from the sender and that it has not been modified. Instances of
108114
MAC primitive are secure against existential forgery under chosen plaintext
109115
attack, and can be deterministic or randomized. This interface should be used
@@ -114,8 +120,9 @@ pseudorandom bytes.
114120
Minimal properties:
115121

116122
- secure against existential forgery under CPA
117-
- at least 128-bit security, also in multi-user scenarios (when an attacker is not
118-
targeting a specific key, but any key from a set of up to 2<sup>32</sup> keys)
123+
- at least 128-bit security, also in multi-user scenarios (when an attacker is
124+
not targeting a specific key, but any key from a set of up to 2<sup>32</sup>
125+
keys)
119126
- at least 80-bit authentication strength
120127

121128
## Hybrid Encryption
@@ -149,10 +156,12 @@ must be provided for decryption operation.
149156

150157
A concrete implementation of hybrid encryption can implement the binding of
151158
_context info_ to the ciphertext in various ways, for example:
152-
- use context_info as "associated data"-input for the employed AEAD symmetric
159+
160+
- use context\_info as "associated data"-input for the employed AEAD symmetric
153161
encryption (cf. [RFC 5116](https://tools.ietf.org/html/rfc5116)).
154-
- use context_info as "CtxInfo"-input for HKDF (if the implementation uses HKDF
155-
as key derivation function, cf. [RFC 5869](https://tools.ietf.org/html/rfc5869)).
162+
- use context\_info as "CtxInfo"-input for HKDF (if the implementation uses HKDF
163+
as key derivation function, cf.
164+
[RFC 5869](https://tools.ietf.org/html/rfc5869)).
156165

157166
Minimal properties:
158167

@@ -176,5 +185,5 @@ against adaptive chosen-message attacks.
176185
Minimal properties:
177186

178187
- data to be signed can have arbitrary length
179-
- 128-bit security for EC based schemes,
180-
112-bit security for RSA based schemes (i.e. allow 2048 bit keys)
188+
- 128-bit security for EC based schemes
189+
- 112-bit security for RSA based schemes (i.e. allow 2048 bit keys)

examples/helloworld/cc/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# C++ Hello World
22

3-
This is a command-line tool that can encrypt and decrypt small files using _authenticated
4-
encryption with associated data_ ([AEAD](https://github.com/google/tink/blob/master/doc/PRIMITIVES.md#authenticated-encryption-with-associated-data)).
3+
This is a command-line tool that can encrypt and decrypt small files using [AEAD
4+
(Authenticated Encryption with Associated
5+
Data)](../../../docs/PRIMITIVES.md#authenticated-encryption-with-associated-data).
56

67
It demonstrates the basic steps of using Tink, namely loading key material,
78
obtaining a primitive, and using the primitive to do crypto.
89

9-
Moreoever, since this app shares the same Bazel's WORKSPACE with Tink, its
10-
BUILD file can directly depend on Tink.
10+
Moreover, since this app shares the same Bazel WORKSPACE with Tink, its BUILD
11+
file can directly depend on Tink.
1112

13+
## Build and Run
1214

13-
## Build and run
14-
15-
**Bazel**
15+
### Bazel
1616

1717
```shell
1818
git clone https://github.com/google/tink

examples/helloworld/java/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ key material, obtaining a primitive, and using the primitive to do crypto.
99
It also shows how to add a dependency on Tink using Maven. Please checkout
1010
the pom.xml file.
1111

12-
Moreoever, since this app shares the same Bazel's WORKSPACE with Tink, its
13-
BUILD file can directly depend on Tink. Note that [a copy of this app]
14-
(https://github.com/thaidn/tink-examples/tree/master/helloworld/java) is
12+
Moreover, since this app shares the same Bazel's WORKSPACE with Tink, its
13+
BUILD file can directly depend on Tink. Note that [a copy of this
14+
app](https://github.com/thaidn/tink-examples/tree/master/helloworld/java) is
1515
hosted in the tink-examples repo, which uses its own Bazel's WORKSAPCE,
16-
and has to add Tink as a dependency using Bazel's maven_jar rule.
16+
and has to add Tink as a dependency using Bazel's maven\_jar rule.
1717

18-
## Build and run
18+
## Build and Run
1919

20-
**Maven**
20+
### Maven
2121

2222
```shell
2323
git clone https://github.com/google/tink
@@ -29,7 +29,7 @@ mvn exec:java -Dexec.args="decrypt --keyset test.cfg --in bar.encrypted --out fo
2929
cat foo2.txt
3030
```
3131

32-
**Bazel**
32+
### Bazel
3333

3434
```shell
3535
git clone https://github.com/google/tink

tools/tinkey/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Moved to https://github.com/google/tink/blob/master/doc/TINKEY.md.
1+
Moved to [TINKEY.md](../../docs/TINKEY.md).

0 commit comments

Comments
 (0)