Skip to content

Commit

Permalink
Release 3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Sep 4, 2024
1 parent 8c71519 commit a6f1d40
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 65 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

## 3.0

### Next
* Remove Swift verifier logic to obtain a general speed-up

### 3.7.0 (Supreme 0.2.0)
* Remove Swift verifier logic to obtain a general speed-up
* Implement supreme signing capabilities
* Introduce Attestation Data Structure
* Dependency Updates:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
[![Kotlin](https://img.shields.io/badge/kotlin-multiplatform-orange.svg?logo=kotlin)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Java](https://img.shields.io/badge/java-17+-blue.svg?logo=OPENJDK)](https://www.oracle.com/java/technologies/downloads/#java11)
[![Maven Central](https://img.shields.io/maven-central/v/at.asitplus.signum/indispensable)](https://mvnrepository.com/artifact/at.asitplus.signum/)
[![Maven Central (indispensable)](https://img.shields.io/maven-central/v/at.asitplus.signum/indispensable?label=maven-central%20%28indispensable%29)](https://mvnrepository.com/artifact/at.asitplus.signum/)
[![Maven Central (Supreme)](https://img.shields.io/maven-central/v/at.asitplus.signum/supreme?label=maven-central%20%28Supreme%29)](https://mvnrepository.com/artifact/at.asitplus.signum/supreme)

</div>

Expand All @@ -24,7 +25,9 @@
This [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) library provides platform-independent data
types and functionality related to crypto and PKI applications:

* **Multiplatform ECDSA and RSA verification**
* **Multiplatform ECDSA and RSA Signer and Verifier** &rarr; Check out the included [CMP demo App](demoapp) to see it in action
* **Supports Attestation on iOS and Android**
* **Biometric Authentication on Android and iOS without Callbacks or Activity Passing** (✨Magic!✨)
* Public Keys (RSA and EC)
* Algorithm Identifiers (Signatures, Hashing)
* X509 Certificate Class (create, encode, decode)
Expand Down Expand Up @@ -520,8 +523,6 @@ SEQUENCE (8 elem)
* No OCSP and CRL Checks (though it is perfectly possible to parse this data from a certificate and implement the checks)
* We do need more comprehensive tests, but we're getting there, mostly thanks to [@iaik-jheher](https://github.com/iaik-jheher)
and [@n0900](https://github.com/n0900).
* We don't yet know how compliant everything really is, but this code has been successfully handling cryptographic material
for a couple of months now and we're improving whenever we hit an issue.
* Number of supported Algorithms is limited to the usual suspects (sorry, no Bernstein curves )-:)


Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask

plugins {
id("at.asitplus.gradle.conventions") version "2.0.20+20240904"
id("at.asitplus.gradle.conventions") version "2.0.20+20240829"
id("com.android.library") version "8.2.2" apply (false)
}
group = "at.asitplus.signum"
Expand Down
18 changes: 12 additions & 6 deletions demoapp/README.MD
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
# Supreme Multiplatform (JVM, Android, iOS) Demo App

<p align="center">

![img.png](img.png)

This app showcases the _Supreme_ KMP Crypto provider on Android and on iOS. Demoing the JVM target would require additional configuration due to limitations of Kotlin.
It was decided to avoid this clutter for the demo app, since the Supreme test suite already showcases the JVM provider usage.
</p>

This app showcases the _Supreme_ KMP Crypto provider on JVM, Android and on iOS.
It is possible to generate key pairs, sign data, and verify the signature.

Generation of attestation statements is also supported, although on iOS, only P-256 keys can be attested due to platform constreaints.
The default JVM provider does not natively support the creation of attestation statements.
Generation of attestation statements is also supported, although on iOS, only P-256 keys can be attested due to platform constraints.
The default JVM provider does not natively support the creation of attestation statements, so it is a NOOP there.

Except for the JVM (because there is no system-wide keystore), the app relies only on multiplatform code.
Hence, everything is located in the common [App.kt](composeApp/src/commonMain/kotlin/at/asitplus/cryptotest/App.kt).
As can be seen, no activity passing and callbacks are required, even for biometric auth! Everything _just works_&copy; automagically…

## Before running!
- check your system with [KDoctor](https://github.com/Kotlin/kdoctor)
- install JDK 17 on your machine
- add `local.properties` file to the project root and set a path to Android SDK there

### Android
## Android
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration

To build the application bundle:
- run `./gradlew :composeApp:assembleDebug`
- find `.apk` file in `composeApp/build/outputs/apk/debug/composeApp-debug.apk`

### iOS
## iOS
To run the application on iPhone device/simulator:
- Open `iosApp/iosApp.xcproject` in Xcode and run standard configuration
- Or use [Kotlin Multiplatform Mobile plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile) for Android Studio

**Attestation and biometric auth is not supported on the simulator!** Only Apple could fix this, but this is unlikely to ever happen.


Original file line number Diff line number Diff line change
Expand Up @@ -73,55 +73,6 @@ import kotlin.random.Random
import kotlin.reflect.KProperty
import kotlin.time.Duration.Companion.seconds

val SAMPLE_CERT_CHAIN = listOf(
"MIIDljCCAxygAwIBAgISBAkE/SHlMi5J8uQGoGCZBnhSMAoGCCqGSM49BAMDMDIx\n" +
"CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF\n" +
"MTAeFw0yNDAzMTMyMDQ2MjZaFw0yNDA2MTEyMDQ2MjVaMBwxGjAYBgNVBAMTEXN0\n" +
"YWNrb3ZlcmZsb3cuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAENMSrkEQf\n" +
"2x8dEAh73snPfgxMIK+VYUyIIYA+NuRhhyZuL2ZV9N4ZUibe/eEad3Y8HND3Kuz/\n" +
"2vxFzJvR8nlKSqOCAiYwggIiMA4GA1UdDwEB/wQEAwIHgDAdBgNVHSUEFjAUBggr\n" +
"BgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUeQJ7DtZq\n" +
"02WUcs0cMmOa/eJEuxcwHwYDVR0jBBgwFoAUWvPtK/w2wjd5uVIw6lRvz1XLL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XNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNSRyBSb290IFgyMHYw\n" +
"EAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0HttwW\n" +
"+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9\n" +
"ItgKbppbd9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T\n" +
"AQH/BAUwAwEB/zAdBgNVHQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZI\n" +
"zj0EAwMDaAAwZQIwe3lORlCEwkSHRhtFcP9Ymd70/aTSVaYgLXTWNLxBo1BfASdW\n" +
"tL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5U6VR5CmD1/iQMVtCnwr1\n" +
"/q4AaOeMSQ+2b1tbFfLn"
).map { X509Certificate.decodeFromDer(it.replace("\n", "").decodeBase64Bytes()) }

/* because we also want it to work on the jvm;
you don't need this workaround for ios/android, just use PlatformSigningProvider directly */
Expand Down
Binary file modified demoapp/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ kotlin.code.style=official
kotlin.js.compiler=ir
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8

artifactVersion = 3.7.0-SNAPSHOT
supremeVersion=0.2.0-SNAPSHOT
artifactVersion=3.7.0
supremeVersion=0.2.0

# This is not a well-defined property, the ASP convention plugin respects it, though
jdk.version=17
Expand Down

0 comments on commit a6f1d40

Please sign in to comment.