Skip to content

Commit

Permalink
android test and workflow updates
Browse files Browse the repository at this point in the history
Signed-off-by: Curtis Harding <ch@curtish.me>
  • Loading branch information
curtis-h committed May 15, 2024
1 parent 32a4889 commit 0cb9105
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/release-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ jobs:
run: |
brew install autoconf automake libtool
- name: "Install rust toolchain (Linux)"
if: matrix.os-type == 'linux'
run: sudo apt install rustc build-essential -y

- name: "Install rust toolchain (Macos)"
if: matrix.os-type == 'macos'
run: brew install rustup

- name: "Install wasm-pack"
run: cargo install wasm-pack

- name: "Dokka Documentation Generation"
run: |
./gradlew dokkaHtml
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ jobs:
git_user_signingkey: true
git_commit_gpgsign: true

- name: "Install rust toolchain (Linux)"
if: matrix.os-type == 'linux'
run: sudo apt install rustc build-essential -y

- name: "Install rust toolchain (Macos)"
if: matrix.os-type == 'macos'
run: brew install rustup

- name: "Install wasm-pack"
run: cargo install wasm-pack

- name: "Release"
env:
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.iohk.atala.prism.apollo.derivation

import io.iohk.atala.prism.apollo.utils.decodeHex
import io.iohk.atala.prism.apollo.utils.toHexString
import kotlin.test.Test
import kotlin.test.assertEquals

@RunWith(AndroidJUnit4::class)
class EdHDKeyTest {
@Test
fun test_derive_m1() {
val privateKey = "f8a29231ee38d6c5bf715d5bac21c750577aa3798b22d79d65bf97d6fadea15adcd1ee1abdf78bd4be64731a12deb94d3671784112eb6f364b871851fd1c9a24".decodeHex()
val chainCode = "7384db9ad6003bbd08b3b1ddc0d07a597293ff85e961bf252b331262eddfad0d".decodeHex()

val key = EdHDKey(privateKey, chainCode)
val derived = key.derive("m/1'")

assertEquals(derived.privateKey.toHexString(), "4057eb6cab9000e3b6fe7e556341da1ca2f5dde0b689a7b58cb93f1902dfa15a5a10732ff348051c6e0865c62931d4a73fa8050b8ff543b43fc0000a7e2c5700")
assertEquals(derived.chainCode.toHexString(), "9a170f689c8b9b3502ee846f457ab3dd1b017cfb2cd68865c7f24dbabcbc2256")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlin.experimental.and
import kotlin.experimental.or

/**
* This function converts an Ed25519 secret key into a Curve25519 secret key.
* This function converts an Ed25519 secret key into a Curve25519 secret key.
* Curve25519 keys are used in the key exchange process to encrypt communications over networks.
*
* @param secretKey The Ed25519 secret key to be converted into a Curve25519 secret key.
Expand Down

0 comments on commit 0cb9105

Please sign in to comment.