66[ ![ Codacy Badge] ( https://app.codacy.com/project/badge/Grade/5fac0b504c25497ca621938007bc1cf6 )] ( https://app.codacy.com/gh/aldenml/ecc/dashboard )
77[ ![ Codacy Badge] ( https://app.codacy.com/project/badge/Coverage/5fac0b504c25497ca621938007bc1cf6 )] ( https://www.codacy.com/gh/aldenml/ecc/dashboard )
88[ ![ javadoc] ( https://javadoc.io/badge2/org.ssohub/ecc/javadoc.svg )] ( https://javadoc.io/doc/org.ssohub/ecc )
9+ [ ![ Maintainability Rating] ( https://sonarcloud.io/api/project_badges/measure?project=aldenml_ecc&metric=sqale_rating )] ( https://sonarcloud.io/summary/new_code?id=aldenml_ecc )
10+ [ ![ Security Rating] ( https://sonarcloud.io/api/project_badges/measure?project=aldenml_ecc&metric=security_rating )] ( https://sonarcloud.io/summary/new_code?id=aldenml_ecc )
911
1012Library to work with elliptic-curve cryptography based on [ libsodium] ( https://github.com/jedisct1/libsodium )
1113and [ blst] ( https://github.com/supranational/blst ) .
@@ -15,6 +17,13 @@ and [blst](https://github.com/supranational/blst).
1517| Java | [ jvm/ecc] ( bindings/jvm ) | [ ![ maven] ( https://img.shields.io/maven-central/v/org.ssohub/ecc.svg?label=maven )] ( https://search.maven.org/search?q=g:%22org.ssohub%22%20AND%20a:%22ecc%22 ) |
1618| Javascript | [ js/ecc] ( bindings/js ) | [ ![ npm] ( https://img.shields.io/npm/v/@aldenml/ecc )] ( https://www.npmjs.com/package/@aldenml/ecc ) |
1719
20+ ### Features
21+
22+ - [ OPRF] ( #oprf-oblivious-pseudo-random-functions-using-ristretto255 )
23+ - [ OPAQUE] ( #opaque-the-opaque-asymmetric-pake-protocol )
24+ - [ BLS12-381 Pairing] ( #bls12-381-pairing )
25+ - [ Proxy Re-Encryption (PRE)] ( #proxy-re-encryption-pre )
26+
1827### OPRF Oblivious pseudo-random functions using ristretto255
1928
2029This is an implementation of [ draft-irtf-cfrg-voprf-08] ( https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08 )
@@ -49,6 +58,75 @@ computes a proof in Evaluate. The client verifies this proof using
4958the server's expected public key before completing the protocol and
5059producing the protocol output.
5160
61+ ### OPAQUE The OPAQUE Asymmetric PAKE Protocol
62+
63+ This is an implementation of [ draft-irtf-cfrg-opaque-07] ( https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-opaque-07 )
64+ using ` libsodium ` .
65+
66+ OPAQUE consists of two stages: registration and authenticated key
67+ exchange. In the first stage, a client registers its password with
68+ the server and stores its encrypted credentials on the server, but
69+ the server never knows what the password it.
70+
71+ The registration flow is shown below (from the irtf draft):
72+ ```
73+ creds parameters
74+ | |
75+ v v
76+ Client Server
77+ ------------------------------------------------
78+ registration request
79+ ------------------------->
80+ registration response
81+ <-------------------------
82+ record
83+ ------------------------->
84+ ------------------------------------------------
85+ | |
86+ v v
87+ export_key record
88+ ```
89+
90+ In the second stage, the client outputs two values, an "export_key" (matching
91+ that from registration) and a "session_key". The server outputs a single value
92+ "session_key" that matches that of the client.
93+
94+ The authenticated key exchange flow is shown below (from the irtf draft):
95+ ```
96+ creds (parameters, record)
97+ | |
98+ v v
99+ Client Server
100+ ------------------------------------------------
101+ AKE message 1
102+ ------------------------->
103+ AKE message 2
104+ <-------------------------
105+ AKE message 3
106+ ------------------------->
107+ ------------------------------------------------
108+ | |
109+ v v
110+ (export_key, session_key) session_key
111+ ```
112+
113+ The public API for implementing the protocol is:
114+
115+ - Client
116+ ```
117+ opaque_ristretto255_sha512_CreateRegistrationRequest
118+ opaque_ristretto255_sha512_FinalizeRequest
119+ opaque_ristretto255_sha512_3DH_ClientInit
120+ opaque_ristretto255_sha512_3DH_ClientFinish
121+ ```
122+
123+ - Server
124+ ```
125+ opaque_ristretto255_sha512_CreateRegistrationResponse
126+ opaque_ristretto255_sha512_3DH_ServerInit
127+ opaque_ristretto255_sha512_3DH_ServerFinish
128+ ```
129+
52130### BLS12-381 Pairing
53131
54132In the context of pairing friendly elliptic curves, a pairing is a map ` e: G1xG2 -> GT ` such
0 commit comments