Skip to content

Commit aef0954

Browse files
committed
Update README.md: formatting and add missing links
1 parent d8fe143 commit aef0954

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# separate terms of service, privacy policy, and support
77
# documentation.
88

9-
name: Java CI with Maven
9+
name: Build cdoc2-java-ref-impl with CI
1010

1111
on:
1212
push:

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22

33
[CDOC2](https://installer.id.ee/media/cdoc/cdoc_2_0_spetsifikatsioon_d-19-12_v1.9.pdf) reference implementation (Java)
44

5-
Crypto Digidoc, encrypted file transmission format used in the [Estonian eID](https://github.com/open-eid) ecosystem
5+
CDOC stands for 'Crypto Digidoc', encrypted file transmission format used in the [Estonian eID](https://github.com/open-eid) ecosystem
66

77
CDOC2 is a new version of [CDOC](https://www.id.ee/wp-content/uploads/2020/06/sk-cdoc-1.0-20120625_en.pdf) (CDOC lib [cdoc4j](https://github.com/open-eid/cdoc4j)), featuring additional security
88
measures with optional server backend. CDOC version are not compatible.
99
Additional background info can be found in [why CDOC2](https://www.youtube.com/watch?v=otrO2A6TuGQ).
1010

11+
End-user software to create/decrypt CDOC2: https://github.com/open-eid/DigiDoc4-Client
12+
13+
## Implemented scenarios
14+
1115
**Warning**: Following scenario descriptions are simplification to give general idea, details and **final truth is in
1216
[CDOC2 specification](https://open-eid.github.io/CDOC2/)**.
1317

14-
## CDOC2 ECDH scenario
18+
### CDOC2 ECDH scenario
1519

1620
1. Sender downloads recipient's certificate from SK LDAP using recipient id (isikukood). Recipient certificate contains
1721
EC public key.
@@ -37,7 +41,7 @@ Additional background info can be found in [why CDOC2](https://www.youtube.com/w
3741

3842
[^3]: Content is zlib compressed tar archive
3943

40-
## CDOC2 ECDH server scenario
44+
### CDOC2 ECDH server scenario
4145

4246
1. *Follow steps from previous scenario 1-6*
4347
2. Sender chooses key transaction server (preconfigured list)
@@ -58,7 +62,7 @@ Key transfer server benefits:
5862

5963
[^4]: key transfer server protocol is defined in cdoc2-openapi module
6064

61-
## CDOC2 RSA-OAEP
65+
### CDOC2 RSA-OAEP
6266

6367
RSA-OAEP is similar to ECDH scenario, with difference that KEK is generated from secure random (not ECDH) and
6468
KEK is encrypted with recipient RSA public key and included into CDOC header (instead of
@@ -82,7 +86,7 @@ sender public key).
8286
15. Recipient calculates hmac and checks it against hmac in CDoc.
8387
16. Recipient decrypts content using CEK.
8488

85-
## CDOC2 RSA-OAEP with server scenario
89+
### CDOC2 RSA-OAEP with server scenario
8690

8791
1. *Follow steps from RSA-OAEP scenario 1-6*
8892
2. Sender chooses key capsule server (by providing server configuration)
@@ -97,7 +101,7 @@ sender public key).
97101
capsule that contains encrypted KEK
98102
11. *Follow steps from RSA-OAEP scenario steps 12-15*
99103

100-
## CDOC2 with symmetric key from password
104+
### CDOC2 with symmetric key from password
101105

102106
Similar to Symmetric Key scenario, but symmetric key is derived from password and salt using PBKDF2 algorithm.
103107

@@ -115,7 +119,7 @@ Similar to Symmetric Key scenario, but symmetric key is derived from password an
115119
cdoc2-java-ref-impl does not provide solution for securely storing the password, but most password managers
116120
can do that.
117121

118-
## CDOC2 with symmetric key from secret
122+
### CDOC2 with symmetric key from secret
119123

120124
Similar to ECDH scenario, but KEK is derived from symmetric key (secret) identified by key_label using HKDF algorithm.
121125

@@ -139,6 +143,7 @@ cdoc2-java-ref-impl does not provide solution for securely storing the secret, b
139143

140144
- cdoc2-schema - flatbuffers schemas and code generation
141145
- cdoc2-lib - CDOC2 creation and processing library
146+
- cdoc2-client - client for communicating with [cdoc2-capsule-server](https://github.com/open-eid/cdoc2-capsule-server)
142147
- cdoc2-cli - Command line utility to create/process CDOC2 files
143148
- test - Sample CDOC2 containers (with script to create and decrypt them)
144149
and automated tests for CLI
@@ -154,7 +159,7 @@ Server related components are in separate https://github.com/open-eid/cdoc2-caps
154159
## Maven dependencies
155160

156161
Depends on:
157-
* https://github.com/open-eid/cdoc2-openapi OpenAPI specifications for server stub generation
162+
https://github.com/open-eid/cdoc2-openapi OpenAPI specifications for client stub generation
158163

159164
Configure github package repo access
160165
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token
@@ -183,6 +188,8 @@ So defining any Maven package repo from `open-eid` is enough for pulling cdoc2-*
183188
All packages published under `open-eid` can be found https://github.com/orgs/open-eid/packages
184189

185190
## Building
191+
[![Java CI with Maven](https://github.com/open-eid/cdoc2-java-ref-impl/actions/workflows/maven.yml/badge.svg)](https://github.com/open-eid/cdoc2-java-ref-impl/actions/workflows/maven.yml)
192+
186193
CDOC2 has been tested with JDK 17 and Maven 3.8.8
187194

188195
```
@@ -217,6 +224,11 @@ mvn test -Dtests=pkcs11 -Dcdoc2.pkcs11.conf-file=pkcs11-test-safenet.properties
217224

218225
By default, the pkcs11 configuration is read from the file `pkcs11-test-idcard.properties`.
219226

227+
### Bats tests
228+
229+
Additional tests using [Bats](https://github.com/bats-core/bats-core) and `cdoc2-cli`.
230+
Refer [test/README.md](test/README.md)
231+
220232
### Entropy
221233
In case the tests run slowly (probably due to waiting on entropy generation),
222234
using an entropy source (e.g `haveged`) may help on Linux:

0 commit comments

Comments
 (0)