From d1ee804aa314861e879a576a05426bb98ee2752b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Rib=C3=B3?= Date: Mon, 10 Jun 2024 13:05:27 +0200 Subject: [PATCH] fix: update usage of the bip32ed25519 wrapper. (#174) --- .../org/hyperledger/identus/apollo/derivation/EdHDKey.kt | 4 ++-- .../org/hyperledger/identus/apollo/derivation/EdHDKey.kt | 4 ++-- .../org/hyperledger/identus/apollo/derivation/EdHDKey.kt | 2 +- .../identus/apollo/utils/external/Ed25519_Bip32.kt | 2 +- .../org/hyperledger/identus/apollo/derivation/EdHDKey.kt | 4 ++-- rust-ed25519-bip32 | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apollo/src/androidMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt b/apollo/src/androidMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt index 0c78e8748..8cc513422 100644 --- a/apollo/src/androidMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt +++ b/apollo/src/androidMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt @@ -2,7 +2,7 @@ package org.hyperledger.identus.apollo.derivation import com.ionspin.kotlin.bignum.integer.toBigInteger import ed25519_bip32_wrapper.deriveBytes -import ed25519_bip32_wrapper.fromNonextendedNoforce +import ed25519_bip32_wrapper.fromNonextended import org.hyperledger.identus.apollo.utils.ECConfig /** @@ -83,7 +83,7 @@ actual class EdHDKey actual constructor( val keySlice = seed.sliceArray(0 until 32) val chainCodeSlice = seed.sliceArray(32 until seed.size) - val result = fromNonextendedNoforce(keySlice, chainCodeSlice) + val result = fromNonextended(keySlice, chainCodeSlice) val secretKey = result["secret_key"] val chainCode = result["chain_code"] diff --git a/apollo/src/appleMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt b/apollo/src/appleMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt index 0c78e8748..8cc513422 100644 --- a/apollo/src/appleMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt +++ b/apollo/src/appleMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt @@ -2,7 +2,7 @@ package org.hyperledger.identus.apollo.derivation import com.ionspin.kotlin.bignum.integer.toBigInteger import ed25519_bip32_wrapper.deriveBytes -import ed25519_bip32_wrapper.fromNonextendedNoforce +import ed25519_bip32_wrapper.fromNonextended import org.hyperledger.identus.apollo.utils.ECConfig /** @@ -83,7 +83,7 @@ actual class EdHDKey actual constructor( val keySlice = seed.sliceArray(0 until 32) val chainCodeSlice = seed.sliceArray(32 until seed.size) - val result = fromNonextendedNoforce(keySlice, chainCodeSlice) + val result = fromNonextended(keySlice, chainCodeSlice) val secretKey = result["secret_key"] val chainCode = result["chain_code"] diff --git a/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt b/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt index 7f0101dd1..0b3350699 100644 --- a/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt +++ b/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt @@ -77,7 +77,7 @@ actual class EdHDKey actual constructor( val key = seed.sliceArray(0 until 32) val chainCode = seed.sliceArray(32 until seed.size) - val result = ed25519_bip32.from_nonextended_noforce(key, chainCode) + val result = ed25519_bip32.from_nonextended(key, chainCode) return EdHDKey( privateKey = result[0], diff --git a/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/utils/external/Ed25519_Bip32.kt b/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/utils/external/Ed25519_Bip32.kt index 238b2b0e4..3ab3172ff 100644 --- a/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/utils/external/Ed25519_Bip32.kt +++ b/apollo/src/jsMain/kotlin/org/hyperledger/identus/apollo/utils/external/Ed25519_Bip32.kt @@ -1,7 +1,7 @@ package org.hyperledger.identus.apollo.utils.external external interface ed25519_bip32_export { - fun from_nonextended_noforce(key: ByteArray, chain_code: ByteArray): Array + fun from_nonextended(key: ByteArray, chain_code: ByteArray): Array fun derive_bytes(key: ByteArray, chain_code: ByteArray, index: Any): Array } diff --git a/apollo/src/jvmMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt b/apollo/src/jvmMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt index 0c78e8748..8cc513422 100644 --- a/apollo/src/jvmMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt +++ b/apollo/src/jvmMain/kotlin/org/hyperledger/identus/apollo/derivation/EdHDKey.kt @@ -2,7 +2,7 @@ package org.hyperledger.identus.apollo.derivation import com.ionspin.kotlin.bignum.integer.toBigInteger import ed25519_bip32_wrapper.deriveBytes -import ed25519_bip32_wrapper.fromNonextendedNoforce +import ed25519_bip32_wrapper.fromNonextended import org.hyperledger.identus.apollo.utils.ECConfig /** @@ -83,7 +83,7 @@ actual class EdHDKey actual constructor( val keySlice = seed.sliceArray(0 until 32) val chainCodeSlice = seed.sliceArray(32 until seed.size) - val result = fromNonextendedNoforce(keySlice, chainCodeSlice) + val result = fromNonextended(keySlice, chainCodeSlice) val secretKey = result["secret_key"] val chainCode = result["chain_code"] diff --git a/rust-ed25519-bip32 b/rust-ed25519-bip32 index 8f518942a..ac791dc55 160000 --- a/rust-ed25519-bip32 +++ b/rust-ed25519-bip32 @@ -1 +1 @@ -Subproject commit 8f518942ae95dc6b96bed3a3732161b7980668b1 +Subproject commit ac791dc551c5f7aa6e9ddfc83c32a2629d710ccb