Skip to content

Commit

Permalink
fix actions, update
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmgdr committed Sep 29, 2023
1 parent 2e9d74f commit 554e1ad
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 56 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: celo-monorepo
run-name: celo-monorepo tests
name: social connect
run-name: social connect tests

# Dockefile for the self-hosted runner:
# https://github.com/celo-org/infrastructure/blob/master/terraform/root-modules/gcp/integration-tests-gke/files/github-arc/Dockerfile-monorepo

on:
push:
branches:
- master
- main
paths-ignore:
- '**/*.md'
pull_request:
branches:
- master
- main
paths-ignore:
- '**/*.md'

concurrency:
group: circle-ci-${{ github.ref }}
Expand Down
32 changes: 16 additions & 16 deletions docs/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Below describes the steps to derive the *obfuscated identifier*, which is public
|**pepper**| Unique secret, obtained by taking the first 13 characters of the sha256 hash of the *unblinded signature*|
|**obfuscated identifier**| Identifier used for on-chain attestations, obtained by hashing the *plaintext identifier*, *identifier prefix*, and *pepper* using this schema: `sha3(sha3({prefix}://{plaintextIdentifier})__{pepper})`. For backwards compatibility, identifiers that are phone numbers use this schema: `sha3({prefix}://{plaintextIdentifier}__{pepper})`|

You can see these steps implemented in the `@celo/identity` sdk [here](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/identifier.ts).
You can see these steps implemented in the `@celo/identity` sdk [here](https://github.com/celo-org/socialconnect/blob/main/packages/sdk/identity/src/odis/identifier.ts).

Here is a concrete example:

- **Alice's phone number**: `+12345678901`
- The ODIS pepper for Alice's phone number: `SqXDxoTdBpKH2`
- The ODIS pepper for Alice's phone number: `SqXDxoTdBpKH2`
- The obfuscation pattern: `sha3({prefix}://{plaintextIdentifier}__{pepper})`
- The actual obfuscation: `sha3('tel://+123456789__SqXDxoTdBpKH2')` = `0x8b578f2053a41113066b8410ca2d952a27b5f4531838ff54ca68e7c5cc7caf47`
- **Alice's obfuscated phone number**: `0x8b578f2053a41113066b8410ca2d952a27b5f4531838ff54ca68e7c5cc7caf47`
Expand All @@ -47,7 +47,7 @@ Each identifier type has a corresponding prefix that is appended before the blin

These are the prefixes currently defined in the SDK. We are using [DID methods](https://w3c.github.io/did-spec-registries/#did-methods) as prefixes when they exist. We welcome PRs here and [in the SDK](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/identifier.ts#L27-L34) if you'd like to add a new identifier type and prefix! You can also cast an arbitrary string as your prefix if you would like.

| Type | Prefix |
| Type | Prefix |
|---------|--------|
| Phone numbers | `tel` |
| Twitter handles | `twit` |
Expand Down Expand Up @@ -78,11 +78,11 @@ sequenceDiagram
actor user
participant issuer
participant ODIS
user -->> issuer: provide plaintext identifier
issuer -->> issuer: blind plaintext identifier
issuer -->> ODIS: get blinded signature
ODIS -->> issuer:
ODIS -->> issuer:
issuer -->> issuer: unblind signature and derive pepper and obfuscated identifier
```
</details>
Expand All @@ -95,14 +95,14 @@ However, for extra privacy, the user can also blind the identifier before they s
```mermaid
%%{init: { "sequence": { "useMaxWidth": true } } }%%
sequenceDiagram
actor user
participant issuer
participant ODIS
actor user
participant issuer
participant ODIS
user -->> user: blind plaintext identifier
user -->> issuer: provide blinded identifier
user -->> user: blind plaintext identifier
user -->> issuer: provide blinded identifier
issuer -->> ODIS: get blinded signature
ODIS -->> issuer:
ODIS -->> issuer:
issuer -->> user: forward blinded signature
user -->> user: unblind signature and derive pepper and obfuscated identifier
```
Expand Down Expand Up @@ -132,13 +132,13 @@ The most important function is `getObfuscatedIdentifier`, which completes the en
`signer` | AuthSigner | object describing the authentication method and providing authentication key, see [Authentication](#authentication)
`context` | ServiceContext | object providing the ODIS context, see [Service Context](#service-context)
`blindingFactor` (optional) | string | secret seed used for blinding/unblinding the identifier, by default a one-time random seed is used in the blinding client
`clientVersion` (optional) | string |
`clientVersion` (optional) | string |
`blsBlindingClient` (optional) | BlsBlindingClient | the default blinding client used only works server-side, see [Runtime Environments](#runtime-environments) for alternatives
`sessionID` (optional) | string |
`keyVersion` (optional) | number |
`endpoint` (optional) | |
`sessionID` (optional) | string |
`keyVersion` (optional) | number |
`endpoint` (optional) | |

#### Returns:
#### Returns:
`Promise‹IdentifierHashDetails›`

```typescript
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/encrypted-backup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "Celo",
"license": "Apache-2.0",
"homepage": "https://celo-sdk-docs.readthedocs.io/en/latest/encrypted-backup",
"repository": "https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/encrypted-backup",
"repository": "https://github.com/celo-org/social-connect/tree/main/packages/sdk/encrypted-backup",
"keywords": [
"celo",
"blockchain",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "Celo",
"license": "Apache-2.0",
"homepage": "https://celo-sdk-docs.readthedocs.io/en/latest/identity",
"repository": "https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/identity",
"repository": "https://github.com/celo-org/social-connect/tree/main/packages/sdk/identity",
"keywords": [
"celo",
"blockchain",
Expand Down
34 changes: 0 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4667,40 +4667,13 @@
dependencies:
"@types/superagent" "*"

"@types/tar-fs@*":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/tar-fs/-/tar-fs-2.0.2.tgz#d10b844cc1fcfa87de990a7cec350ee3d168c48b"
integrity sha512-XuZRAvdo7FbDfgQCNkc8NOdSae5XtG+of2mTSgJ85G4OG0miN4E8BTGT+JBTLO87RQ7iCwsIDCqCsHnf2IaSXA==
dependencies:
"@types/node" "*"
"@types/tar-stream" "*"

"@types/tar-stream@*":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@types/tar-stream/-/tar-stream-3.1.0.tgz#b67783c27135d21ed6a29e1f9e4a49f32debf741"
integrity sha512-U05c7l6K5VdO1ZV+j3E0NJOX1hfJB497M1+QT2rXx2QqyMbEQJqBw3Utk9eUVnWPyLLqYKt5Ja1kPV1ejm6cZw==
dependencies:
"@types/node" "*"

"@types/targz@^1.0.0":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@types/targz/-/targz-1.0.2.tgz#485b00f5bcbc0f0d878862e0f0bdcd293bd4610f"
integrity sha512-dp4IVKAWNbwG6y/qGlphwq6cd5S1f6BTc95TIRZrvJ8grsDnreKicfil5DvY7LRXAjD2ZR3uvXS2TLfHOC+NcQ==
dependencies:
"@types/tar-fs" "*"

"@types/tedious@^4.0.6":
version "4.0.9"
resolved "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.9.tgz"
integrity sha512-ipwFvfy9b2m0gjHsIX0D6NAAwGCKokzf5zJqUZHUGt+7uWVlBIy6n2eyMgiKQ8ChLFVxic/zwQUhjLYNzbHDRA==
dependencies:
"@types/node" "*"

"@types/tmp@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.1.0.tgz#19cf73a7bcf641965485119726397a096f0049bd"
integrity sha512-6IwZ9HzWbCq6XoQWhxLpDjuADodH/MKXRUIDFudvgjcVdjFknvmR+DNsoUeer4XPrEnrZs04Jj+kfV9pFsrhmA==

"@types/triple-beam@^1.3.2":
version "1.3.3"
resolved "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.3.tgz"
Expand All @@ -4721,13 +4694,6 @@
resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz"
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==

"@types/yargs@^13.0.2":
version "13.0.12"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.12.tgz#d895a88c703b78af0465a9de88aa92c61430b092"
integrity sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==
dependencies:
"@types/yargs-parser" "*"

"@types/yargs@^17.0.8":
version "17.0.24"
resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz"
Expand Down

0 comments on commit 554e1ad

Please sign in to comment.