Skip to content

Commit

Permalink
feat(apollo) Implementing Secp256K1 and ECDSA Signatures from 1.4 + I…
Browse files Browse the repository at this point in the history
…mprovements
  • Loading branch information
elribonazo authored Feb 22, 2023
2 parents fe01176 + 4efa5c1 commit b95ea7b
Show file tree
Hide file tree
Showing 156 changed files with 6,014 additions and 546 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ root = true
ktlint_standard_no_semi = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_no-semi = disabled
4 changes: 4 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ da099bd8ef28f323839730a7aa2dd333e0b0a553:JWT/src/jsMain/kotlin/io.iohk.prism.apo
da099bd8ef28f323839730a7aa2dd333e0b0a553:iOSLibs/IOHKCrypto/IOHKCrypto/IOHKCrypto.swift:private-key:20
3511094f0a8ce01ec70b668e342703dc8dd350cc:Apollo/src/commonTest/kotlin/io.iohk.atala.prism.apollo/ECTest.kt:generic-api-key:66
3511094f0a8ce01ec70b668e342703dc8dd350cc:Apollo/src/commonTest/kotlin/io.iohk.atala.prism.apollo/ECTest.kt:generic-api-key:119
8c25089bb50caa22eb0dca700203907b03a95932:base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1KeyPair.kt:generic-api-key:4
a3cb543f5569a83597a4fcada367914beb55ed70:base-asymmetric-encryption/src/commonTest/kotlin/io.iohk.atala.prism.apollo.utils/GenerateECKeyPairTests.kt:generic-api-key:72
a3cb543f5569a83597a4fcada367914beb55ed70:base-asymmetric-encryption/src/commonTest/kotlin/io.iohk.atala.prism.apollo.utils/GenerateECKeyPairTests.kt:generic-api-key:179
8c25089bb50caa22eb0dca700203907b03a95932:ecdsa/src/commonTest/kotlin/io/iohk/atala/prism/apollo/ecdsa/KMMECDSATests.kt:generic-api-key:125
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APPLY_FIXES: none
FILTER_REGEX_EXCLUDE: (karma.config.js|polyfill.js)
FILTER_REGEX_EXCLUDE: (karma.config.js|polyfill.js|timeout.js)
VALIDATE_ALL_CODEBASE: true
REPOSITORY_DEVSKIM_DISABLE_ERRORS: true

Expand Down
2 changes: 1 addition & 1 deletion Apollo/Apollo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pod::Spec.new do |spec|
spec.source = { :http=> ''}
spec.authors = 'IOG'
spec.license = ''
spec.summary = 'Apollo is a collection of the cryptographic methods used all around Atala PRISM'
spec.summary = 'Apollo'
spec.vendored_frameworks = 'build/cocoapods/framework/Apollo.framework'
spec.libraries = 'c++'
spec.ios.deployment_target = '13.0'
Expand Down
80 changes: 16 additions & 64 deletions Apollo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ kotlin {
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// macosX64()
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
// macosArm64()
}
// if (System.getProperty("os.arch") != "x86_64") { // M1Chip
// iosSimulatorArm64()
// }
}
js(IR) {
this.moduleName = currentModuleName
Expand All @@ -60,19 +54,13 @@ kotlin {
}
}
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
}
}
nodejs {
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
Expand All @@ -82,7 +70,7 @@ kotlin {

if (os.isMacOsX) {
cocoapods {
this.summary = "Apollo is a collection of the cryptographic methods used all around Atala PRISM"
this.summary = "Apollo"
this.version = rootProject.version.toString()
this.authors = "IOG"
this.ios.deploymentTarget = "13.0"
Expand All @@ -91,40 +79,31 @@ kotlin {
this.watchos.deploymentTarget = "8.0"
framework {
this.baseName = currentModuleName
export(project(":base16"))
export(project(":base32"))
export(project(":base58"))
export(project(":base64"))
export(project(":hashing"))
export(project(":multibase"))
}
}
}

sourceSets {
val commonMain by getting {
dependencies {
api(project(":base16"))
api(project(":base32"))
api(project(":base58"))
api(project(":base64"))
api(project(":utils"))
api(project(":hashing"))
api(project(":multibase"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting
val jvmTest by getting {
val androidMain by getting
val androidTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
}
val androidMain by getting
val androidTest by getting {
val jvmMain by getting
val jvmTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
Expand All @@ -134,41 +113,14 @@ kotlin {
if (os.isMacOsX) {
val iosMain by getting
val iosTest by getting
// val tvosMain by getting
// val tvosTest by getting
// val watchosMain by getting
// val watchosTest by getting
// val macosX64Main by getting
// val macosX64Test by getting
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
val iosSimulatorArm64Main by getting {
this.dependsOn(iosMain)
}
val iosSimulatorArm64Test by getting {
this.dependsOn(iosTest)
}
// val tvosSimulatorArm64Main by getting {
// this.dependsOn(tvosMain)
// }
// val tvosSimulatorArm64Test by getting {
// this.dependsOn(tvosTest)
// if (System.getProperty("os.arch") != "x86_64") { // M1Chip
// val iosSimulatorArm64Main by getting {
// this.dependsOn(iosMain)
// }
// val watchosSimulatorArm64Main by getting {
// this.dependsOn(watchosMain)
// val iosSimulatorArm64Test by getting {
// this.dependsOn(iosTest)
// }
// val watchosSimulatorArm64Test by getting {
// this.dependsOn(watchosTest)
// }
// val macosArm64Main by getting {
// this.dependsOn(macosX64Main)
// }
// val macosArm64Test by getting {
// this.dependsOn(macosX64Test)
// }
}
}
all {
languageSettings.optIn("kotlin.RequiresOptIn")
// }
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions Apollo/karma.config.d/timeout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
config.set({
browserDisconnectTimeout: 5000,
processKillTimeout: 5000,
client: {
mocha: {
timeout: 5000
}
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package io.iohk.atala.prism.apollo

actual object Platform {
actual val OS: String = "Android ${android.os.Build.VERSION.SDK_INT}"
public actual object Platform {
public actual val OS: String = "Android ${android.os.Build.VERSION.SDK_INT}"
}
2 changes: 0 additions & 2 deletions Apollo/src/androidTest/AndroidManifest.xml

This file was deleted.

This file was deleted.

Loading

0 comments on commit b95ea7b

Please sign in to comment.