Skip to content

Commit 7320178

Browse files
committed
Beta release
0 parents  commit 7320178

File tree

93 files changed

+3263
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3263
-0
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!build/*-runner
3+
!build/*-runner.jar
4+
!build/lib/*
5+
!build/quarkus-app/*

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Gradle
2+
.gradle/
3+
build/
4+
5+
# Eclipse
6+
.project
7+
.classpath
8+
.settings/
9+
bin/
10+
11+
# IntelliJ
12+
.idea
13+
*.ipr
14+
*.iml
15+
*.iws
16+
17+
# NetBeans
18+
nb-configuration.xml
19+
20+
# Visual Studio Code
21+
.vscode
22+
.factorypath
23+
24+
# OSX
25+
.DS_Store
26+
27+
# Vim
28+
*.swp
29+
*.swo
30+
31+
# patch
32+
*.orig
33+
*.rej
34+
35+
# Local environment
36+
.env
37+
38+
# Plugin directory
39+
/.quarkus/cli/plugins/
40+
# TLS Certificates
41+
.certs/

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# BitKeeper
2+
*Threshold Signing Vault*
3+
4+
## Running the application
5+
To run an app in HTTP mode simply run:
6+
7+
```bash
8+
java -jar <runner>.jar
9+
```
10+
11+
To enabld **CLI** mode, run:
12+
13+
```bash
14+
java -Dquarkus.profile=cli -jar <runner>.jar
15+
```
16+
17+
#### NOTE
18+
DON'T CHANGE `%cli` PROFILE CONFIG! HTTP SERVER SHOULD NOT BE ENABLED IN THIS MODE
19+
20+
## Configuration
21+
Configuration example:
22+
23+
```yaml
24+
"%cli":
25+
quarkus:
26+
http:
27+
insecure-requests: disabled
28+
host-enabled: false
29+
ssl-port: -1
30+
31+
keeper:
32+
idx: ${KEEPER_SERVICE_IDX}
33+
threshold: ${KEEPER_SERVICE_THRESHOLD}
34+
parallelism: ${KEEPER_SERVICE_PARALLELISM:4}
35+
database-path: ${KEEPER_DATABASE_PATH}
36+
session:
37+
gg20:
38+
expire: 15m
39+
frost:
40+
expire: 5m
41+
private-key: ${KEEPER_PRIVATE_KEY}
42+
peers:
43+
- idx: 1
44+
public-url: 'https://keeper1.example.com'
45+
public-key: 'NOOP'
46+
```
47+
48+
### Definitions
49+
- `idx` - index of the current keeper in the network
50+
- `threshold` - threshold defined during shamir secret sharing
51+
- `parallelism` - number of parallel threads for keeper while broadcasts
52+
- `database-path` - path to the database file (!file)
53+
- `session` - session settings
54+
- `gg20` - settings for GG20 session
55+
- `expire` - expiration time of the session
56+
- `frost` - settings for FROST session
57+
- `expire` - expiration time of the session
58+
- `private-key` - Ed25519 private key of the keeper
59+
- `peers` - list of peers in the network
60+
- `idx` - index of the peer
61+
- `public-url` - public URL of the peer
62+
- `public-key` - Ed25519 public key of the peer
63+
64+
## CLI commands
65+
66+
### Storing private key share
67+
```bash
68+
store <publicKeyId> <privateKeyShare> <relatedFullPublicKey>
69+
```
70+
71+
### Deleting key share
72+
```bash
73+
delete <publicKeyId>
74+
```
75+
76+
**NOTE**:
77+
All key share data should be specified in **Base64**

build.gradle

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
plugins {
2+
id 'org.jetbrains.kotlin.jvm' version "2.0.21"
3+
id "org.jetbrains.kotlin.plugin.allopen" version "2.0.21"
4+
id 'io.quarkus'
5+
}
6+
7+
repositories {
8+
mavenCentral()
9+
mavenLocal()
10+
11+
maven {
12+
url 'http://maven.hub/'
13+
credentials {
14+
username mavenUsername
15+
password mavenPassword
16+
}
17+
18+
allowInsecureProtocol = true
19+
}
20+
}
21+
22+
dependencies {
23+
implementation("io.quarkus:quarkus-picocli")
24+
implementation 'org.jline:jline:3.29.0'
25+
implementation 'io.quarkiverse.loggingsentry:quarkus-logging-sentry:2.1.3'
26+
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
27+
implementation 'io.quarkus:quarkus-rest'
28+
implementation 'io.quarkus:quarkus-rest-jackson'
29+
implementation 'io.quarkus:quarkus-config-yaml'
30+
implementation 'io.quarkus:quarkus-kotlin'
31+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
32+
implementation 'io.quarkus:quarkus-arc'
33+
implementation 'org.mapdb:mapdb:3.1.0'
34+
35+
implementation 'io.projectreactor:reactor-core:3.7.5'
36+
implementation 'io.smallrye.reactive:mutiny-reactor:2.8.0'
37+
38+
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.18.3'
39+
40+
implementation 'org.exploit.threshield:gg20:0.0.5'
41+
implementation 'org.exploit.threshield:frost:0.0.5'
42+
implementation 'org.exploit.threshield:ed25519:0.0.5'
43+
implementation 'org.exploit.threshield:core:0.0.5'
44+
45+
implementation 'org.exploit:jettyx:0.1.6'
46+
implementation 'org.exploit:jettyx-jackson:0.1.6'
47+
implementation 'org.exploit:jettyx-http2:0.1.6'
48+
49+
implementation 'org.exploit:signalix:0.1.3'
50+
51+
testImplementation 'io.quarkus:quarkus-junit5'
52+
}
53+
54+
group 'org.exploit'
55+
version '1.0-SNAPSHOT'
56+
57+
java {
58+
sourceCompatibility = JavaVersion.VERSION_17
59+
targetCompatibility = JavaVersion.VERSION_17
60+
}
61+
62+
test {
63+
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
64+
}
65+
allOpen {
66+
annotation("jakarta.ws.rs.Path")
67+
annotation("jakarta.enterprise.context.ApplicationScoped")
68+
annotation("jakarta.persistence.Entity")
69+
annotation("io.quarkus.test.junit.QuarkusTest")
70+
}
71+
72+
compileKotlin {
73+
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
74+
kotlinOptions.javaParameters = true
75+
}
76+
77+
compileTestKotlin {
78+
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
79+
}

gradle.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Gradle properties
2+
3+
# Gradle properties
4+
quarkusPluginId=io.quarkus
5+
quarkusPluginVersion=3.21.3
6+
quarkusPlatformGroupId=io.quarkus.platform
7+
quarkusPlatformArtifactId=quarkus-bom
8+
quarkusPlatformVersion=3.21.3

gradle/wrapper/gradle-wrapper.jar

57.5 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)