Which algorithm is used by Daedalus to hash the spendingPassword?

I have created a wallet using the API and used SHA256 on the password, which I encoded to hex. when I try to spend funds from this wallet which was created via API, all is good.

However if I create the wallet in Daedalus UI, and later try to send the password I used to create the wallet (after hashing with SHA256), vi the API, I get an error that the password does not match.

How to resolve this issue?
Basically I am not going to use the UI for creating wallets, but I’m just wondering how to match the hash Daedalus uses for the passwords.

Thanks.

I would think they are using blake2 throughout Daedalus.

1 Like

Questions like this shows the value of python-cardano project.

3 Likes

Thank you guys! I will check the python-cardano project ASAP!

I think it’s a bit more complicated in Daedalus, I meant it was when I created some tool for generating simple cardano wallet address. Check here.
Here comes the relevant part of the output generated by that tool:

#### Step3b	: Spending password to EncryptedPass
Spending pass   :  ""
Serialised      :  40
Generated salt  :  582014c8f070fd924358ddc1b0453144f7f2b67e6fb7fd59bea5c773f5d7439f9d7a
Generated pass  :  e72067ee7e6ac05f94de8d3064e9bfaddcee812c5d0ca348bbcb122caeaf9f82
EncryptePass    :  Xd14|8|1|5yBn7n5qwF+U3o0wZOm/rdzugSxdDKNIu8sSLK6vn4I=|WCAUyPBw/ZJDWN3BsEUxRPfytn5vt/1ZvqXHc/XXQ5+deg==
Base64-ed       :  WGQxNHw4fDF8NXlCbjduNXF3RitVM28wd1pPbS9yZHp1Z1N4ZERLTkl1OHNTTEs2dm40ST18V0NBVXlQQncvWkpEV04zQnNFVXhSUGZ5dG41dnQvMVp2cVhIYy9YWFE1K2RlZz09

I’ve implemented importing wallet from Daedalus secrets, and it’s compatible.

I hashed the password with Blake2b-256, sent a transaction via the API, and it worked.

1 Like