Skip to content

Commit fe20c23

Browse files
authored
preparing release 1.0.6 (#54)
1 parent 6990319 commit fe20c23

File tree

10 files changed

+105
-26
lines changed

10 files changed

+105
-26
lines changed

.codacy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ engines:
22
duplication:
33
enabled: true
44
exclude_paths:
5+
- 'test/**'
56
- '**/test/**'
67
exclude_paths:
78
- '**.md'
89
- '**/examples/**'
910
- '**/libecc.js'
1011
- '**/libecc-post.js'
11-
- '**/libopaque.js'
12-
- '**/libopaque-post.js'
13-
- '**/liboprf.js'
14-
- '**/liboprf-post.js'
12+
- '**/js/dist/*.d.ts'
13+
- '**/libecc.c'
14+
- '**/libecc.java'

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ else()
1616
set(BUILD_SHARED_LIBS ON)
1717
endif()
1818

19-
project(ecc VERSION 1.0.5)
19+
project(ecc VERSION 1.0.6)
2020
project(ecc LANGUAGES C)
2121

2222
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,40 @@ and [blst](https://github.com/supranational/blst).
1313
| Java | [jvm](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) |
1414
| Javascript | [js/ecc](js/ecc) | [![npm](https://img.shields.io/npm/v/@aldenml/ecc)](https://www.npmjs.com/package/@aldenml/ecc) |
1515

16+
### OPRF Oblivious pseudo-random functions using ristretto255
17+
18+
This is an implementation of [draft-irtf-cfrg-voprf-08](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08)
19+
ciphersuite **OPRF(ristretto255, SHA-512)** using `libsodium`.
20+
21+
There are two variants in this protocol: a *base* mode and *verifiable* mode. In the
22+
base mode, a client and server interact to compute `output = F(skS, input, info)`,
23+
where `input` is the client's private input, `skS` is the server's private key, `info`
24+
is the public input, and `output` is the computation output. The client learns `output`
25+
and the server learns nothing. In the verifiable mode, the client also receives proof
26+
that the server used `skS` in computing the function.
27+
28+
The flow is shown below (from the irtf draft):
29+
```
30+
Client(input, info) Server(skS, info)
31+
----------------------------------------------------------------------
32+
blind, blindedElement = Blind(input)
33+
34+
blindedElement
35+
---------->
36+
37+
evaluatedElement = Evaluate(skS, blindedElement, info)
38+
39+
evaluatedElement
40+
<----------
41+
42+
output = Finalize(input, blind, evaluatedElement, blindedElement, info)
43+
```
44+
45+
In the verifiable mode of the protocol, the server additionally
46+
computes a proof in Evaluate. The client verifies this proof using
47+
the server's expected public key before completing the protocol and
48+
producing the protocol output.
49+
1650
### BLS12-381 Pairing
1751

1852
In the context of pairing friendly elliptic curves, a pairing is a map `e: G1xG2 -> GT` such

bindings/js/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,40 @@ This is the javascript version of the [ecc](https://github.com/aldenml/ecc) libr
77
It is a WebAssembly compilation with a thin layer on
88
top to expose the cryptographic primitives.
99

10+
### OPRF Oblivious pseudo-random functions using ristretto255
11+
12+
This is an implementation of [draft-irtf-cfrg-voprf-08](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08)
13+
ciphersuite **OPRF(ristretto255, SHA-512)** using `libsodium`.
14+
15+
There are two variants in this protocol: a *base* mode and *verifiable* mode. In the
16+
base mode, a client and server interact to compute `output = F(skS, input, info)`,
17+
where `input` is the client's private input, `skS` is the server's private key, `info`
18+
is the public input, and `output` is the computation output. The client learns `output`
19+
and the server learns nothing. In the verifiable mode, the client also receives proof
20+
that the server used `skS` in computing the function.
21+
22+
The flow is shown below (from the irtf draft):
23+
```
24+
Client(input, info) Server(skS, info)
25+
----------------------------------------------------------------------
26+
blind, blindedElement = Blind(input)
27+
28+
blindedElement
29+
---------->
30+
31+
evaluatedElement = Evaluate(skS, blindedElement, info)
32+
33+
evaluatedElement
34+
<----------
35+
36+
output = Finalize(input, blind, evaluatedElement, blindedElement, info)
37+
```
38+
39+
In the verifiable mode of the protocol, the server additionally
40+
computes a proof in Evaluate. The client verifies this proof using
41+
the server's expected public key before completing the protocol and
42+
producing the protocol output.
43+
1044
### BLS12-381 Pairing
1145

1246
In the context of pairing friendly elliptic curves, a pairing is a map `e: G1xG2 -> GT` such

bindings/js/dist/ecc.dev.js

Lines changed: 19 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/js/dist/ecc.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/js/dist/oprf.d.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@
22
* Evaluates serialized representations of blinded group elements from the
33
* client as inputs.
44
*
5-
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-07#section-3.3.1.1
5+
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08#section-3.3.1.1
66
*
77
* @param {Uint8Array} skS private key
88
* @param {Uint8Array} blindedElement blinded element
9+
* @param {Uint8Array} info
910
* @return {Promise<Uint8Array>} evaluated element
1011
*/
11-
export function oprf_ristretto255_sha512_Evaluate(skS: Uint8Array, blindedElement: Uint8Array): Promise<Uint8Array>;
12+
export function oprf_ristretto255_sha512_Evaluate(skS: Uint8Array, blindedElement: Uint8Array, info: Uint8Array): Promise<Uint8Array>;
1213
/**
1314
* Same as calling `oprf_ristretto255_sha512_Blind` with an
1415
* specified scalar blind.
1516
*
16-
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-07#section-3.3.3.1
17+
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08#section-3.3.3.1
1718
*
1819
* @param {Uint8Array} input message to blind
1920
* @param {Uint8Array} blind scalar to use in the blind operation
2021
* @return {Uint8Array} blinded element
2122
*/
2223
export function oprf_ristretto255_sha512_BlindWithScalar(input: Uint8Array, blind: Uint8Array): Uint8Array;
2324
/**
24-
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-07#section-3.3.3.1
25+
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08#section-3.3.3.1
2526
*
2627
* @param {Uint8Array} input message to blind
2728
* @return object {blind, blindedElement}
@@ -31,10 +32,11 @@ export function oprf_ristretto255_sha512_Blind(input: Uint8Array): Promise<{
3132
blindedElement: Uint8Array;
3233
}>;
3334
/**
34-
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-07#section-3.3.3.2
35+
* See https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf-08#section-3.3.3.2
3536
*
3637
* @param input the input message
3738
* @param blind
3839
* @param evaluatedElement
40+
* @param {Uint8Array} info
3941
*/
40-
export function oprf_ristretto255_sha512_Finalize(input: any, blind: any, evaluatedElement: any): Promise<Uint8Array>;
42+
export function oprf_ristretto255_sha512_Finalize(input: any, blind: any, evaluatedElement: any, info: Uint8Array): Promise<Uint8Array>;

bindings/js/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aldenml/ecc",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "elliptic curves crypto functions",
55
"main": "index.js",
66
"types": "./dist/index.d.ts",

bindings/jvm/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
}
1313

1414
group = "org.ssohub"
15-
version = "1.0.5"
15+
version = "1.0.6"
1616

1717
java {
1818
sourceCompatibility = JavaVersion.VERSION_1_8

0 commit comments

Comments
 (0)