AlphaWallet / AlphaWallet/alpha-wallet-android

Error when adding a wallet with a BIP39 seed that was previously added as legacy wallet via private key

Abierto
#3,034 1 comentario 0 reacciones 1 asignado Reclamado por @JamesSmartCell Ver en GitHub
Lenguaje dominante
Java
Estrellas
646
Forks
579
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I previously added a wallet with a private key to AlphaWallet and it showed up as legacy wallet. Some time later I decided to add the proper BIP39 seed for this wallet, but I was greeted with a javax.crypto.AEADBadTagException. I then tested to add this same seed to a fresh AlphaWallet on another device and it worked. So finally I tried deleting the legacy wallet and then adding the seed worked.

Steps to reproduce:
- add legacy wallet via private key
- attempt to add the same wallet via BIP39 seed

Relevant logcat output:
> 01-09 22:37:03.348 3734 3734 W System.err: java.io.IOException: javax.crypto.AEADBadTagException
> 01-09 22:37:03.349 3734 3734 W System.err: at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:133)
> 01-09 22:37:03.349 3734 3734 W System.err: at javax.crypto.CipherInputStream.read(CipherInputStream.java:249)
> 01-09 22:37:03.349 3734 3734 W System.err: at javax.crypto.CipherInputStream.read(CipherInputStream.java:225)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.service.KeyService.readBytesFromStream(KeyService.java:1183)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.service.KeyService.unpackMnemonic(KeyService.java:488)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.service.KeyService.importHDKey(KeyService.java:588)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.service.KeyService.authenticatePass(KeyService.java:895)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.ui.BaseActivity.onActivityResult(BaseActivity.java:155)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.alphawallet.app.ui.ImportWalletActivity.onActivityResult(ImportWalletActivity.java:456)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.Activity.dispatchActivityResult(Activity.java:8131)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.os.Looper.loop(Looper.java:214)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
> 01-09 22:37:03.349 3734 3734 W System.err: at java.lang.reflect.Method.invoke(Native Method)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
> 01-09 22:37:03.349 3734 3734 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
> 01-09 22:37:03.349 3734 3734 W System.err: Caused by: javax.crypto.AEADBadTagException
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:517)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:531)
> 01-09 22:37:03.349 3734 3734 W System.err: at javax.crypto.Cipher.doFinal(Cipher.java:2002)
> 01-09 22:37:03.349 3734 3734 W System.err: at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:130)
> 01-09 22:37:03.349 3734 3734 W System.err: ... 21 more
> 01-09 22:37:03.349 3734 3734 W System.err: Caused by: android.security.KeyStoreException: Signature/MAC verification failed
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.KeyStore.getKeyStoreException(KeyStore.java:1303)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:224)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.keystore.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:373)
> 01-09 22:37:03.349 3734 3734 W System.err: at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506)
> 01-09 22:37:03.349 3734 3734 W System.err: ... 24 more

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.